Home
last modified time | relevance | path

Searched refs:bindgen (Results 1 – 25 of 79) sorted by relevance

1234

/third_party/rust/crates/bindgen/
DREADME.md1 [![crates.io](https://img.shields.io/crates/v/bindgen.svg)](https://crates.io/crates/bindgen)
2 [![docs.rs](https://docs.rs/bindgen/badge.svg)](https://docs.rs/bindgen/)
4 # `bindgen`
6 **`bindgen` automatically generates Rust FFI bindings to C (and some C++) libraries.**
19 `bindgen` produces Rust FFI code allowing you to call into the `doggo` library's
23 /* automatically generated by rust-bindgen 0.99.9 */
38 [�� Read the `bindgen` users guide here! ��](https://rust-lang.github.io/rust-bindgen)
46 The MSRV is the minimum Rust version that can be used to *compile* `bindgen`. However, `bindgen` ca…
50 [API reference documentation is on docs.rs](https://docs.rs/bindgen)
54 In addition to the [library API](https://docs.rs/bindgen) and [executable command-line API][bindgen
[all …]
DCargo.toml3 "bindgen",
4 "bindgen-cli",
5 "bindgen-integration",
6 "bindgen-tests",
7 "bindgen-tests/tests/quickchecking",
8 "bindgen-tests/tests/expectations",
12 "bindgen",
13 "bindgen-cli",
14 "bindgen-tests",
DREADME_zh.md1 [![crates.io](https://img.shields.io/crates/v/bindgen.svg)](https://crates.io/crates/bindgen)
2 [![docs.rs](https://docs.rs/bindgen/badge.svg)](https://docs.rs/bindgen/)
6 `bindgen` 自动生成Rust与C(和一些C++)库的FFI绑定。
19 `bindgen`产生Rust FFI代码,允许调用`doggo`库的函数并使用其类型:
22 /* automatically generated by rust-bindgen 0.99.9 */
36 bindgen的目录树结构如下:
40 ├── bindgen
56 ├── bindgen-cli
62 ├── bindgen-integration
68 ├── bindgen-tests
[all …]
DCONTRIBUTING.md1 # Contributing to `bindgen`
13 - [Looking to Start Contributing to `bindgen`?](#looking-to-start-contributing-to-bindgen)
23 - [Fuzzing `bindgen` with `csmith`](#fuzzing-bindgen-with-csmith)
24 …- [Property tests for `bindgen` with `quickchecking`](#property-tests-for-bindgen-with-quickchecki…
34 - [Cutting a new bindgen release](#cutting-a-new-bindgen-release)
54 * The `bindgen` flags used to reproduce the issue with the header file
55 * The expected `bindgen` output
56 * The actual `bindgen` output
57 * The [debugging logs](#logs) generated when running `bindgen` on this testcase
59 ## Looking to Start Contributing to `bindgen`?
[all …]
/third_party/rust/crates/bindgen/bindgen-tests/
DCargo.toml2 name = "bindgen-tests"
8 bindgen = { path = "../bindgen", features = ["cli", "experimental"] }
15 logging = ["bindgen/logging"]
16 static = ["bindgen/static"]
17 runtime = ["bindgen/runtime"]
18 which-rustfmt = ["bindgen/which-rustfmt"]
20 testing_only_docs = ["bindgen/testing_only_docs"]
21 testing_only_extra_assertions = ["bindgen/testing_only_extra_assertions"]
22 testing_only_libclang_9 = ["bindgen/testing_only_libclang_9"]
23 testing_only_libclang_5 = ["bindgen/testing_only_libclang_5"]
/third_party/rust/crates/bindgen/bindgen-cli/
DCargo.toml3 "The rust-bindgen project contributors",
9 name = "bindgen-cli"
11 repository = "https://github.com/rust-lang/rust-bindgen"
12 documentation = "https://docs.rs/bindgen"
13 homepage = "https://rust-lang.github.io/rust-bindgen/"
16 # If you change this, also update README.md and msrv in .github/workflows/bindgen.yml
21 name = "bindgen"
24 bindgen = { path = "../bindgen", version = "=0.64.0", features = ["cli", "experimental"] }
32 logging = ["bindgen/logging", "env_logger", "log"]
33 static = ["bindgen/static"]
[all …]
DBUILD.gn16 ohos_cargo_crate("bindgen") {
23 cargo_pkg_authors = "The rust-bindgen project contributors"
24 cargo_pkg_name = "bindgen-cli"
28 "//third_party/rust/crates/bindgen/bindgen:lib",
/third_party/rust/crates/bindgen/book/src/
Dallowlisting.md4 variable definitions `bindgen` generates bindings for. By default, if we don't
13 If we specify allowlisting rules, then `bindgen` will only generate bindings to
19 * [`bindgen::Builder::allowlist_type`](https://docs.rs/bindgen/latest/bindgen/struct.Builder.html#m…
20 * [`bindgen::Builder::allowlist_function`](https://docs.rs/bindgen/latest/bindgen/struct.Builder.ht…
21 * [`bindgen::Builder::allowlist_var`](https://docs.rs/bindgen/latest/bindgen/struct.Builder.html#me…
22 * [`bindgen::Builder::allowlist_file`](https://docs.rs/bindgen/latest/bindgen/struct.Builder.html#m…
Dfaq.md6 - [Why isn't `bindgen` generating methods for this allowlisted class?](#why-isnt-bindgen-generating…
7 - [Why isn't `bindgen` generating bindings to inline functions?](#why-isnt-bindgen-generating-bindi…
8 - [Does `bindgen` support the C++ Standard Template Library (STL)?](#does-bindgen-support-the-c-sta…
9 - [How to deal with bindgen generated padding fields?](#how-to-deal-with-bindgen-generated-padding-…
15 ### Why isn't `bindgen` generating methods for this allowlisted class?
36 ["Why isn't `bindgen` generating bindings to inline functions?"](#why-isnt-bindgen-generating-bindi…
40 ### Why isn't `bindgen` generating bindings to inline functions?
49 `-fno-inline-functions` to `gcc` or `clang`, and invoke `bindgen` with either
50 the `bindgen::Builder::generate_inline_functions` method or the
57 ### Does `bindgen` support the C++ Standard Template Library (STL)?
[all …]
Dblocklisting.md21 * [`bindgen::Builder::blocklist_file`](https://docs.rs/bindgen/latest/bindgen/struct.Builder.html#m…
22 * [`bindgen::Builder::blocklist_function`](https://docs.rs/bindgen/latest/bindgen/struct.Builder.ht…
23 * [`bindgen::Builder::blocklist_item`](https://docs.rs/bindgen/latest/bindgen/struct.Builder.html#m…
24 * [`bindgen::Builder::blocklist_type`](https://docs.rs/bindgen/latest/bindgen/struct.Builder.html#m…
Dcode-formatting.md3 `bindgen` uses `rustfmt` to format the emitted bindings. This section describes
4 how to adjust the `rustfmt` behavior when being used from `bindgen`.
9 the directory from where `bindgen` will be run. If you want to use a
12 [`Builder::rustfmt_configuration_file`](https://docs.rs/bindgen/latest/bindgen/struct.Builder.html#…
21 ### When using `bindgen` as a CLI application
23 Use `rustup run` to run `bindgen`:
26 $ rustup run nightly bindgen [ARGS]
29 ### When using `bindgen` as a library
36 [`Builder::with_rustfmt`](https://docs.rs/bindgen/latest/bindgen/struct.Builder.html#method.with_ru…
39 use bindgen::Builder;
Dcommand-line-usage.md3 Install the `bindgen` executable with `cargo`:
6 $ cargo install bindgen-cli
9 The `bindgen` executable is installed to `~/.cargo/bin`. You have to add that
10 directory to your `$PATH` to use `bindgen`.
12 `bindgen` takes the path to an input C or C++ header file, and optionally an
17 put them in the `bindings.rs` file, we would invoke `bindgen` like this:
20 $ bindgen input.h -o bindings.rs
26 $ bindgen --help
Dtutorial-1.md1 # Add `bindgen` as a Build Dependency
3 First we need to declare a build-time dependency on `bindgen` by adding it to
6 Please always use the latest version of `bindgen`, it has the most fixes and
7 best compatibility. At the time of writing the latest bindgen is `0.53.1`, but
8 you can always check [the bindgen page of
9 crates.io](https://crates.io/crates/bindgen) to verify the latest version if
14 bindgen = "0.53.1"
Dnocopy.md3 `bindgen` will attempt to derive the `Copy` and `Clone` traits on a best-effort
7 used to prevent bindgen to autoderive the `Copy` and `Clone` traits for a type.
11 * [`bindgen::Builder::no_copy`](https://docs.rs/bindgen/latest/bindgen/struct.Builder.html#method.n…
21 * Although bindgen can't know, this struct is not safe to move because pthread
Dnodebug.md3 `bindgen` will attempt to derive the `Debug` traits on a best-effort
6 used to prevent bindgen to autoderive the `Debug` traits for a type.
10 * [`bindgen::Builder::no_debug`](https://docs.rs/bindgen/latest/bindgen/struct.Builder.html#method.…
20 * Although bindgen can't know, this enum is not safe to format the output.
Dcpp.md3 `bindgen` can handle some C++ features, but not all of them. To set
4 expectations: `bindgen` will give you the type definitions and FFI declarations
15 with C++ to avoid pulling in all of the `std::.*` types, many of which `bindgen`
17 [opaque](./opaque.md) that `bindgen` stumbles on. It is recommended to mark
26 [some outstanding bugs](https://github.com/rust-lang/rust-bindgen/issues/380))
40 When `bindgen` finds a type that is too difficult or impossible to translate
46 2. just because one type uses specialization, that shouldn't cause `bindgen` to
49 Without further ado, here are C++ features that `bindgen` does not support or
53 ["Why isn't `bindgen` generating bindings to inline functions?"](./faq.md#why-isnt-bindgen-generati…
69 * Exceptions: if a function called through a `bindgen`-generated interface
[all …]
Dcustomizing-generated-bindings.md6 1. By using the `bindgen::Builder`'s configuration methods, when using `bindgen`
9 2. By passing extra flags and options to the `bindgen` executable.
27 the [docs.rs API reference](https://docs.rs/bindgen) and `bindgen --help`, but
Dnodefault.md3 `bindgen` will attempt to derive/impl the `Default` traits on a best-effort basis.
5 In these cases, the `nodefault` annotation can be used to prevent bindgen
10 * [`bindgen::Builder::no_default`](https://docs.rs/bindgen/latest/bindgen/struct.Builder.html#metho…
Dusing-unions.md5 You can pass the `--rust-target` option to tell `bindgen` to target a specific version of Rust.
6 By default, `bindgen` will target the latest stable Rust.
38 * [`bindgen::Builder::rust_target()`](https://docs.rs/bindgen/latest/bindgen/struct.Builder.html#me…
39 * [`bindgen::Builder::derive_default()`](https://docs.rs/bindgen/latest/bindgen/struct.Builder.html…
93 …the new `union` type or there is a field that cannot derive `Copy`, then bindgen will provide unio…
Dlibrary-usage.md3 �� This is the recommended way to use `bindgen`. ��
7 interface Rust code with the outside world. By using `bindgen` as a library
13 `libclang` available to run `bindgen`.
17 [�� There is complete API reference documentation on docs.rs ��](https://docs.rs/bindgen)
21 The next section contains a detailed, step-by-step tutorial for using `bindgen`
/third_party/rust/crates/bindgen/bindgen-integration/
DCargo.toml2 name = "bindgen-integration"
3 description = "A package to test various bindgen features"
10 bindgen = { path = "../bindgen", features = ["experimental"] }
14 static = ["bindgen/static"]
15 runtime = ["bindgen/runtime"]
17 testing_only_docs = ["bindgen/testing_only_docs"]
18 testing_only_extra_assertions = ["bindgen/testing_only_extra_assertions"]
19 testing_only_libclang_9 = ["bindgen/testing_only_libclang_9"]
20 testing_only_libclang_5 = ["bindgen/testing_only_libclang_5"]
/third_party/rust/crates/bindgen/releases/
Drelease-announcement-template.md1 # Announcing `bindgen` $TODO_VERSION
3 `bindgen` automatically generates Rust FFI bindings to C and C++ libraries.
8 bindgen = "$TODO_VERSION"
38 Found a bug with `bindgen`? [File an issue here.][file-issue]
40 [GitHub]: https://github.com/rust-lang/rust-bindgen
41 [crates.io]: https://crates.io/crates/bindgen
42 [guide]: https://rust-lang.github.io/rust-bindgen
43 [docs]: https://docs.rs/bindgen
44 [contributing]: https://github.com/rust-lang/rust-bindgen/blob/main/CONTRIBUTING.md
45 [easy]: https://github.com/rust-lang/rust-bindgen/issues?q=is%3Aopen+is%3Aissue+label%3AE-easy
[all …]
/third_party/rust/crates/cxx/book/src/
Dcontext.md14 - Build a C wrapper around the C++ code and use **[bindgen]** to translate that
23 covered.** You should use bindgen or cbindgen, or manually translated C
26 [bindgen]: https://github.com/rust-lang/rust-bindgen
35 implemented will cause a crash if you are lucky ([bindgen#388]) or more likely
36 silently emit an incompatible signature ([bindgen#380], [bindgen#607],
37 [bindgen#652], [bindgen#778], [bindgen#1194]) which will do arbitrary
40 [bindgen#388]: https://github.com/rust-lang/rust-bindgen/issues/388
41 [bindgen#380]: https://github.com/rust-lang/rust-bindgen/issues/380
42 [bindgen#607]: https://github.com/rust-lang/rust-bindgen/issues/607
43 [bindgen#652]: https://github.com/rust-lang/rust-bindgen/issues/652
[all …]
/third_party/rust/crates/bindgen/bindgen/
DCargo.toml12 name = "bindgen"
14 repository = "https://github.com/rust-lang/rust-bindgen"
15 documentation = "https://docs.rs/bindgen"
16 homepage = "https://rust-lang.github.io/rust-bindgen/"
20 # If you change this, also update README.md and msrv in .github/workflows/bindgen.yml
24 name = "bindgen"
54 # on bindgen!
/third_party/rust/crates/bindgen/csmith-fuzzing/
DREADME.md1 # Fuzzing `bindgen` with `csmith`
4 cases for compilers. When testing `bindgen` with `csmith`, we interpret the
5 generated programs as header files, and emit Rust bindings to them. If `bindgen`
33 Run `csmith` and test `bindgen` on the generated test cases with this command:
39 The driver will keep running until it encounters an error in `bindgen`.
46 bodies as simple as possible as `bindgen` does not care about them, but they
53 `bindgen` or its emitted bindings, it is helpful to
65 [csmith-issues]: https://github.com/rust-lang/rust-bindgen/issues?q=label%3AA-csmith

1234