When structuring your crate, you can create an examples directory to house various example programs that someone can build / run using the --example X flag. All of the examples I've found are single file examples which rely on the parent crate's Cargo.toml, build.rs, .cargo/config, rust-toolchain.toml, etc. Is there a way to treat the example separately so it can have its own build script, dependencies, etc?
The main one I care about is the build.rs build script. Each example needs to build & link different files (e.g. using a C library that requires the user to select a different implementation of the same file depending on what behavior they want).