fn main() {
let mut cfg = cpp_build::Config::new();
cfg.build("src/main.rs");
}
This does not compile. I do not know the name of this feature in new Rust versions, but it should probably work.
error: failed to run custom build command for `cpp-build-modules v0.1.0 (/tmp/cpp-build-modules)`
Caused by:
process didn't exit successfully: `/tmp/cpp-build-modules/target/debug/build/cpp-build-modules-015f8b4ab4e5a60a/build-script-build` (exit code: 101)
--- stderr
thread 'main' panicked at 'No file with module definition for `mod bar` in file "src/foo.rs"', /home/rsmet/.cargo/registry/src/github.com-1ecc6299db9ec823/cpp_build-0.5.5/src/parser.rs:643:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: build failed
Consider:
src/main.rs
:src/foo.rs
:src/foo/bar/mod.rs
(empty)The above compiles with just
cargo build
. Now addbuild.rs
:This does not compile. I do not know the name of this feature in new Rust versions, but it should probably work.