• Home
  • Raw
  • Download

Lines Matching +full:cxxbridge +full:- +full:cmd

19 //!         .flag_if_supported("-std=c++11")
20 //! .compile("cxxbridge-demo");
22 //! println!("cargo:rerun-if-changed=src/main.rs");
23 //! println!("cargo:rerun-if-changed=src/demo.cc");
24 //! println!("cargo:rerun-if-changed=include/demo.h");
37 //! For use in non-Cargo builds like Bazel or Buck, CXX provides an
39 //! line tool. The tool is packaged as the `cxxbridge-cmd` crate.
42 //! $ cargo install cxxbridge-cmd # or build it from the repo
44 //! $ cxxbridge src/main.rs --header > path/to/mybridge.h
45 //! $ cxxbridge src/main.rs > path/to/mybridge.cc
48 #![doc(html_root_url = "https://docs.rs/cxx-build/1.0.119")]
79 …clippy::unconditional_recursion, // clippy bug: https://github.com/rust-lang/rust-clippy/issues/12…
121 pub fn bridge(rust_source_file: impl AsRef<Path>) -> Build { in bridge()
132 /// .flag_if_supported("-std=c++11")
133 /// .compile("cxxbridge-demo");
136 pub fn bridges(rust_source_files: impl IntoIterator<Item = impl AsRef<Path>>) -> Build { in bridges()
154 // Normally available at target/cxxbridge/ if we are able to know where the
167 fn init() -> Result<Self> { in init()
178 TargetDir::Path(target_dir) => target_dir.join("cxxbridge"), in init()
179 TargetDir::Unknown => scratch::path("cxxbridge"), in init()
192 // We lay out the OUT_DIR as follows. Everything is namespaced under a cxxbridge
197 // cxxbridge/
199 // $CARGO_PKG_NAME -> $CARGO_MANIFEST_DIR
214 fn build(rust_source_files: &mut dyn Iterator<Item = impl AsRef<Path>>) -> Result<Build> { in build()
221 build.cpp_link_stdlib(None); // linked via link-cplusplus crate in build()
241 fn validate_cfg(prj: &Project) -> Result<()> { in validate_cfg()
269 fn make_this_crate(prj: &Project) -> Result<Crate> { in make_this_crate()
365 fn make_crate_dir(prj: &Project) -> PathBuf { in make_crate_dir()
369 let crate_dir = prj.out_dir.join("cxxbridge").join("crate"); in make_crate_dir()
384 fn make_include_dir(prj: &Project) -> Result<PathBuf> { in make_include_dir()
385 let include_dir = prj.out_dir.join("cxxbridge").join("include"); in make_include_dir()
398 fn generate_bridge(prj: &Project, build: &mut Build, rust_source_file: &Path) -> Result<()> { in generate_bridge()
408 let cxxbridge = prj.out_dir.join("cxxbridge"); in generate_bridge() localVariable
409 let include_dir = cxxbridge.join("include").join(&prj.include_prefix); in generate_bridge()
410 let sources_dir = cxxbridge.join("sources").join(&prj.include_prefix); in generate_bridge()
453 best_effort_copy_headers(&src, &dst, max_depth - 1); in best_effort_copy_headers()
474 fn env_os(key: impl AsRef<OsStr>) -> Result<OsString> { in env_os()