Home
last modified time | relevance | path

Searched +full:cxxbridge +full:- +full:cmd (Results 1 – 16 of 16) sorted by relevance

/third_party/rust/crates/cxx/book/src/build/
Dbazel.md4 Starlark-based build systems with the ability to compile a code generator and
5 invoke it as a `genrule` will run CXX's C++ code generator via its `cxxbridge`
8 The tool is packaged as the `cxxbridge-cmd` crate on crates.io or can be built
9 from the *gen/cmd/* directory of the CXX GitHub repo.
12 $ cargo install cxxbridge-cmd
14 $ cxxbridge src/bridge.rs --header > path/to/bridge.rs.h
15 $ cxxbridge src/bridge.rs > path/to/bridge.rs.cc
52 "-o",
54 "-o",
83 ":blobstore-sys",
[all …]
Dother.md6 - Produce the CXX-generated C++ bindings code.
7 - Compile the generated C++ code.
8 - Link the resulting objects together with your other C++ and Rust objects.
24 - Use the `cxxbridge` command, which is a standalone command line interface to
29 $ cxxbridge src/bridge.rs --header > path/to/bridge.rs.h
30 $ cxxbridge src/bridge.rs > path/to/bridge.rs.cc
33 It's packaged as the `cxxbridge-cmd` crate on crates.io or can be built from
34 the *gen/cmd/* directory of the CXX GitHub repo.
36 - Or, build your own code generator frontend on top of the [cxx-gen] crate. This
39 [cxx-gen]: https://docs.rs/cxx-gen
[all …]
/third_party/rust/crates/cxx/
DBUCK10 ":cxx-build",
20 ":cxxbridge-macro",
26 actual = ":cxxbridge",
31 name = "cxxbridge",
32 srcs = glob(["gen/cmd/src/**/*.rs"]) + [
33 "gen/cmd/src/gen",
34 "gen/cmd/src/syntax",
38 "//third-party:clap",
39 "//third-party:codespan-reporting",
40 "//third-party:proc-macro2",
[all …]
DBUILD13 ":cxxbridge-macro",
16 deps = [":core-lib"],
21 actual = ":cxxbridge",
26 name = "cxxbridge",
27 srcs = glob(["gen/cmd/src/**/*.rs"]),
28 data = ["gen/cmd/src/gen/include/cxx.h"],
31 "//third-party:clap",
32 "//third-party:codespan-reporting",
33 "//third-party:proc-macro2",
34 "//third-party:quote",
[all …]
DCargo.toml5 categories = ["development-tools::ffi", "api-bindings", "no-std"]
9 exclude = ["/demo", "/gen", "/syntax", "/third-party", "/tools/buck/prelude"]
12 license = "MIT OR Apache-2.0"
15 rust-version = "1.60"
18 default = ["std", "cxxbridge-flags/default"] # c++11
19 "c++14" = ["cxxbridge-flags/c++14"]
20 "c++17" = ["cxxbridge-flags/c++17"]
21 "c++20" = ["cxxbridge-flags/c++20"]
26 cxxbridge-macro = { version = "=1.0.97", path = "macro" }
27 link-cplusplus = "1.0"
[all …]
Dbundle.json6 "publishAs": "code-segment",
38 "name": "//third_party/rust/crates/cxx/gen/cmd:cxxbridge"
DREADME.md4 [<img alt="github" src="https://img.shields.io/badge/github-dtolnay/cxx-8da0cb?style=for-the-badge&…
5 [<img alt="crates.io" src="https://img.shields.io/crates/v/cxx.svg?style=for-the-badge&color=fc8d62…
6 [<img alt="docs.rs" src="https://img.shields.io/badge/docs.rs-cxx-66c2a5?style=for-the-badge&labelC…
7 …/github/actions/workflow/status/dtolnay/cxx/ci.yml?branch=master&style=for-the-badge" height="20">…
11 using bindgen or cbindgen to generate unsafe C-style bindings.
23 [build-dependencies]
24 cxx-build = "1.0"
62 CXX guarantees an ABI-compatible signature that both sides understand, based on
74 of an existing C++ client for a large-file blobstore service. The blobstore
97 fn next_chunk(buf: &mut MultiBuf) -> &[u8];
[all …]
DREADME_zh.md4 [<img alt="github" src="https://img.shields.io/badge/github-dtolnay/CXX-8da0cb?style=for-the-badge&…
5 [<img alt="crates.io" src="https://img.shields.io/crates/v/CXX.svg?style=for-the-badge&color=fc8d62…
6 [<img alt="docs.rs" src="https://img.shields.io/badge/docs.rs-CXX-66c2a5?style=for-the-badge&labelC…
36 fn r_return_primitive() -> usize;
37 fn r_return_shared() -> Shared;
38 fn r_return_rust_string() -> String;
39 fn r_return_sum(_: usize, _: usize) -> usize;
46 fn r_return_shared() -> ffi::Shared {
50 fn r_return_primitive() -> usize {
54 fn r_return_rust_string() -> String {
[all …]
/third_party/rust/crates/cxx/gen/build/src/
Dlib.rs19 //! .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
[all …]
/third_party/rust/crates/cxx/gen/cmd/
DCargo.toml2 name = "cxxbridge-cmd"
5 categories = ["development-tools::build-utils", "development-tools::ffi"]
6 description = "C++ code generator for integrating `cxx` crate into a non-Cargo build."
11 license = "MIT OR Apache-2.0"
13 rust-version = "1.56"
16 name = "cxxbridge"
21 experimental-async-fn = []
24 clap = { version = "4", default-features = false, features = ["error-context", "help", "std", "sugg…
25 codespan-reporting = "0.11"
26 proc-macro2 = { version = "1.0.58", default-features = false, features = ["span-locations"] }
[all …]
DBUILD.gn6 # http://www.apache.org/licenses/LICENSE-2.0
17 ohos_cargo_crate("cxxbridge") {
25 cargo_pkg_name = "cxxbridge-cmd"
27 "C++ code generator for integrating `cxx` crate into a non-Cargo build."
30 "//third_party/rust/crates/codespan/codespan-reporting:lib",
31 "//third_party/rust/crates/proc-macro2:lib",
/third_party/rust/crates/cxx/tools/buck/
Drust_cxx_bridge.bzl24 cmd = "$(exe //:codegen) ${SRCS} -o ${OUT}/generated.h -o ${OUT}/generated.cc",
25 type = "cxxbridge",
/third_party/rust/crates/cxx/src/
Dlib.rs1 …hub]](https://github.com/dtolnay/cxx)&ensp;[![crates-io]](https://crates.io/crates/cxx)&ensp;[![do…
3 //! [github]: https://img.shields.io/badge/github-8da0cb?style=for-the-badge&labelColor=555555&logo…
4 //! [crates-io]: https://img.shields.io/badge/crates.io-fc8d62?style=for-the-badge&labelColor=55555…
5 //! [docs-rs]: https://img.shields.io/badge/docs.rs-66c2a5?style=for-the-badge&labelColor=555555&lo…
11 //! wrong when using bindgen or cbindgen to generate unsafe C-style bindings.
56 //! combination. CXX guarantees an ABI-compatible signature that both sides
68 //! advantage of an existing C++ client for a large-file blobstore service. The
93 //! fn next_chunk(buf: &mut MultiBuf) -> &[u8];
107 //! fn new_blobstore_client() -> UniquePtr<BlobstoreClient>;
108 //! fn put(&self, parts: &mut MultiBuf) -> u64;
[all …]
/third_party/rust/crates/cxx/book/src/
Dtutorial.md22 Create a blank Cargo project: `mkdir cxx-demo`; `cd cxx-demo`; `cargo init`.
29 # name = "cxx-demo"
69 its size or alignment. In general, a C++ type might have a move-constructor
86 include!("cxx-demo/include/blobstore.h");
90 fn new_blobstore_client() -> UniquePtr<BlobstoreClient>;
100 [*extern "C++"*](extern-c++.md) chapter. In brief: the programmer is **not**
120 …= /bin/ld: target/debug/deps/cxx-demo-7cb7fddf3d67d880.rcgu.o: in function `cxx_demo::ffi::new_blo…
130 `include!("cxx-demo/include/blobstore.h")` above &mdash; we'll be putting the
132 crate is named something other than `cxx-demo` according to the `name` field in
133 Cargo.toml, you will need to use that name everywhere in place of `cxx-demo`
[all …]
/third_party/rust/crates/cxx/.github/workflows/
Dci.yml20 runs-on: ${{matrix.os || 'ubuntu'}}-latest
22 fail-fast: false
25 - rust: nightly
26 - rust: beta
27 - rust: stable
28 - rust: 1.60.0
29 - rust: 1.64.0
30 - name: Cargo on macOS
33 - name: Cargo on Windows (msvc)
34 rust: nightly-x86_64-pc-windows-msvc
[all …]
/third_party/rust/crates/cxx/syntax/
Dmod.rs1 // Functionality that is shared between the cxxbridge macro and the cmd.
131 #[cfg(feature = "experimental-enum-variants-from-header")]