Packaging a sibling directory with a crate

I have a repository that’s structured like this.

rust/
    Cargo.toml
    build.rs
    src/main.rs
    ...
native/
    ...
...

The build script build.rs runs make in ../native, so how can I tell Cargo that native also needs to be included in the package?

There’s no way to do that for a crate published to crates.io. You’ll have to move the files into the crate directory (symlink or git submodule will work) or add it as a dependent crate.

See https://kornel.ski/rust-sys-crate

1 Like

Thanks, submodules look like the way to go.