| /external/rust/cxx/book/src/build/ |
| D | bazel.md | 4 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 …]
|
| D | other.md | 6 - 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 …]
|
| /external/rust/cxx/demo/ |
| D | Android.bp | 2 // See: http://go/android-license-faq 3 // A large-scale-change added 'default_applicable_licenses' to import 6 // SPDX-license-identifier-Apache-2.0 7 // SPDX-license-identifier-MIT 12 name: "cxx-demo-bridge-header", 13 tools: ["cxxbridge"], 14 cmd: "$(location cxxbridge) $(in) --header > $(out)", 20 name: "cxx-demo-bridge-code", 21 tools: ["cxxbridge"], 22 cmd: "$(location cxxbridge) $(in) >> $(out)", [all …]
|
| /external/rust/cxx/ |
| D | BUCK | 5 ":cxx-build", 15 ":cxxbridge-macro", 21 actual = ":cxxbridge", 26 name = "cxxbridge", 27 srcs = glob(["gen/cmd/src/**/*.rs"]) + [ 28 "gen/cmd/src/gen", 29 "gen/cmd/src/syntax", 33 "//third-party:clap", 34 "//third-party:codespan-reporting", 35 "//third-party:proc-macro2", [all …]
|
| D | BUILD | 13 ":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 …]
|
| D | Cargo.toml | 5 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.119", path = "macro" } 27 link-cplusplus = "1.0.9" [all …]
|
| D | Android.bp | 5 // Added automatically by a large-scale-change that took the approach of 19 // large-scale-change included anything that looked like it might be a license 23 // See: http://go/android-license-faq 28 "SPDX-license-identifier-Apache-2.0", 29 "SPDX-license-identifier-MIT", 32 "LICENSE-APACHE", 33 "LICENSE-MIT", 70 cflags: ["-DRUST_CXX_NO_EXCEPTIONS"], 84 name: "libcxx-demo-blobstore", 87 "cxx-demo-bridge-header", [all …]
|
| D | cargo_embargo.json | 4 "cxxbridge-cmd": { "device_supported": false, "host_first_multilib": true }, object 5 "cxx-gen": {"device_supported": false, "host_first_multilib": true}
|
| D | README.md | 4 [<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 …]
|
| /external/bazelbuild-rules_rust/examples/crate_universe/using_cxx/ |
| D | rust_cxx_bridge.bzl | 1 # buildifier: disable=module-docstring 32 "-o", 34 "-o", 37 tool = "@cxxbridge-cmd//:cxxbridge-cmd",
|
| D | cxxbridge-cmd.Cargo.Bazel.lock | 7 "package_url": "https://github.com/rust-cli/anstyle.git", 43 "license": "MIT OR Apache-2.0", 45 "Apache-2.0", 53 "package_url": "https://github.com/clap-rs/clap", 81 "error-context", 101 "license": "MIT OR Apache-2.0", 103 "Apache-2.0", 111 "package_url": "https://github.com/clap-rs/clap", 139 "error-context", 167 "license": "MIT OR Apache-2.0", [all …]
|
| D | cxxbridge-cmd.Cargo.lock | 8 source = "registry+https://github.com/rust-lang/crates.io-index" 14 source = "registry+https://github.com/rust-lang/crates.io-index" 23 source = "registry+https://github.com/rust-lang/crates.io-index" 34 source = "registry+https://github.com/rust-lang/crates.io-index" 38 name = "codespan-reporting" 40 source = "registry+https://github.com/rust-lang/crates.io-index" 44 "unicode-width", 48 name = "cxxbridge-cmd" 52 "codespan-reporting", 53 "proc-macro2", [all …]
|
| /external/rust/cxx/gen/build/src/ |
| D | lib.rs | 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 [all …]
|
| /external/rust/cxx/syntax/ |
| D | mod.rs | 1 // Functionality that is shared between the cxxbridge macro and the cmd. 52 #[allow(dead_code)] // only used by cxx-build, not cxxbridge-macro 68 #[allow(dead_code)] // only used by cxx-build, not cxxbridge-macro 70 #[allow(dead_code)] // only used by cxx-build, not cxxbridge-macro 84 #[allow(dead_code)] // only used by cxx-build, not cxxbridge-macro 89 #[allow(dead_code)] // only used by cxxbridge-macro, not cxx-build 91 #[allow(dead_code)] // only used by cxxbridge-macro, not cxx-build 99 #[allow(dead_code)] // only used by cxxbridge-macro, not cxx-build 105 #[allow(dead_code)] // only used by cxx-build, not cxxbridge-macro 109 #[allow(dead_code)] // only used by cxxbridge-macro, not cxx-build [all …]
|
| D | set.rs | 20 pub(crate) fn new() -> Self { in new() 27 pub(crate) fn insert(&mut self, value: &'a T) -> bool { in insert() 37 pub(crate) fn is_empty(&self) -> bool { in is_empty() 41 pub(crate) fn iter(&self) -> Iter<'_, 'a, T> { in iter() 49 fn into_iter(self) -> Self::IntoIter { in into_iter() 68 pub(crate) fn new() -> Self { in new() 72 pub(crate) fn insert(&mut self, value: T) -> bool { in insert() 76 pub(crate) fn contains<Q>(&self, value: &Q) -> bool in contains() 84 #[allow(dead_code)] // only used by cxx-build, not cxxbridge-cmd 85 pub(crate) fn get<Q>(&self, value: &Q) -> Option<&T> in get() [all …]
|
| /external/rust/cxx/gen/cmd/ |
| D | Cargo.toml | 2 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.3.11", default-features = false, features = ["error-context", "help", "std", … 25 codespan-reporting = "0.11.1" 26 proc-macro2 = { version = "1.0.74", default-features = false, features = ["span-locations"] } [all …]
|
| /external/bazelbuild-rules_rust/examples/crate_universe/ |
| D | WORKSPACE.bazel | 36 generator = "@cargo_bazel_bootstrap//:cargo-bazel", 37 lockfile = "//alias_rule:cargo-bazel-lock_global_alias_annotation_none.json", 65 generator = "@cargo_bazel_bootstrap//:cargo-bazel", 66 lockfile = "//alias_rule:cargo-bazel-lock_global_alias_annotation_opt.json", 94 generator = "@cargo_bazel_bootstrap//:cargo-bazel", 95 lockfile = "//alias_rule:cargo-bazel-lock_global_opt_annotation_none.json", 123 generator = "@cargo_bazel_bootstrap//:cargo-bazel", 124 lockfile = "//alias_rule:cargo-bazel-lock_global_opt_annotation_alias.json", 152 generator = "@cargo_bazel_bootstrap//:cargo-bazel", 153 lockfile = "//alias_rule:cargo-bazel-lock_global_opt_annotation_dbg.json", [all …]
|
| /external/rust/cxx/.github/workflows/ |
| D | install.yml | 11 RUSTFLAGS: -Dwarnings 18 crate: cxxbridge-cmd
|
| D | ci.yml | 20 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.70.0 30 - rust: 1.74.0 31 - name: Cargo on macOS 34 - name: Cargo on Windows (msvc) [all …]
|
| /external/rust/cxx/tools/buck/ |
| D | rust_cxx_bridge.bzl | 24 cmd = "$(exe //:codegen) ${SRCS} -o ${OUT}/generated.h -o ${OUT}/generated.cc", 25 type = "cxxbridge",
|
| /external/rust/cxx/src/ |
| D | lib.rs | 1 …hub]](https://github.com/dtolnay/cxx) [![crates-io]](https://crates.io/crates/cxx) [![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 …]
|
| /external/rust/cxx/book/src/ |
| D | tutorial.md | 22 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 — 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 …]
|
| /external/skia/bazel/external/cxxbridge_cmd/ |
| D | Cargo.lock | 8 source = "registry+https://github.com/rust-lang/crates.io-index" 14 source = "registry+https://github.com/rust-lang/crates.io-index" 23 source = "registry+https://github.com/rust-lang/crates.io-index" 34 source = "registry+https://github.com/rust-lang/crates.io-index" 38 name = "codespan-reporting" 40 source = "registry+https://github.com/rust-lang/crates.io-index" 44 "unicode-width", 48 name = "cxxbridge-cmd" 52 "codespan-reporting", 53 "proc-macro2", [all …]
|
| /external/skia/ |
| D | WORKSPACE.bazel | 14 # See https://github.com/emscripten-core/emsdk/tree/85d27a4a2a60d591613a305b14ae438c2bb3ce11/bazel#… 18 strip_prefix = "emsdk-3.1.44/bazel", 21 url = "https://github.com/emscripten-core/emsdk/archive/refs/tags/3.1.44.tar.gz", 44 … url = "https://github.com/bazelbuild/rules_pkg/releases/download/0.9.1/rules_pkg-0.9.1.tar.gz", 60 strip_prefix = "rules_python-0.9.0", 93 strip_prefix = "rules_jvm_external-4.2", 112 # The version released after this one (1.6.0-rc1) did not resolve unknown symbol errors when 131 …/mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.42.0/rules_go-v0.42.0.zip", 132 "https://github.com/bazelbuild/rules_go/releases/download/v0.42.0/rules_go-v0.42.0.zip", 140 …tps://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.33.0/bazel-gazel… [all …]
|