diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2022-11-17 11:09:29 -0800 |
---|---|---|
committer | Eli Schwartz <eschwartz93@gmail.com> | 2022-12-05 15:20:09 -0500 |
commit | bb875280b695b8d0435833c192f99233e74a522a (patch) | |
tree | 126ed98c4bd7bd1019502e838f9a1212f958b355 /docs | |
parent | 3a0d6f65b037ad60fd66e5c459297f7f6fe33c4b (diff) | |
download | meson-bb875280b695b8d0435833c192f99233e74a522a.zip meson-bb875280b695b8d0435833c192f99233e74a522a.tar.gz meson-bb875280b695b8d0435833c192f99233e74a522a.tar.bz2 |
modules/rust: Add support for string include_directories
Which we support for basically every other case, but not this one.
Diffstat (limited to 'docs')
-rw-r--r-- | docs/markdown/Rust-module.md | 8 | ||||
-rw-r--r-- | docs/markdown/snippets/rust_bindgen_str_include.md | 4 |
2 files changed, 8 insertions, 4 deletions
diff --git a/docs/markdown/Rust-module.md b/docs/markdown/Rust-module.md index 3ca5302..e2c455e 100644 --- a/docs/markdown/Rust-module.md +++ b/docs/markdown/Rust-module.md @@ -3,7 +3,7 @@ short-description: Rust language integration module authors: - name: Dylan Baker email: dylan@pnwbakers.com - years: [2020, 2021] + years: [2020, 2021, 2022] ... # Rust module @@ -35,7 +35,7 @@ that automatically. Additional, test only dependencies may be passed via the dependencies argument. -### bindgen(*, input: string | BuildTarget | [](string | BuildTarget), output: string, include_directories: []include_directories, c_args: []string, args: []string) +### bindgen(*, input: string | BuildTarget | [](string | BuildTarget), output: string, include_directories: [](include_directories | string), c_args: []string, args: []string) This function wraps bindgen to simplify creating rust bindings around C libraries. This has two advantages over hand-rolling ones own with a @@ -50,8 +50,8 @@ It takes the following keyword arguments - input — A list of Files, Strings, or CustomTargets. The first element is the header bindgen will parse, additional elements are dependencies. - output — the name of the output rust file -- include_directories — A list of `include_directories` objects, these are - passed to clang as `-I` arguments +- include_directories — A list of `include_directories` or `string` objects, + these are passed to clang as `-I` arguments *(string since 1.0.0)* - c_args — A list of string arguments to pass to clang untouched - args — A list of string arguments to pass to `bindgen` untouched. diff --git a/docs/markdown/snippets/rust_bindgen_str_include.md b/docs/markdown/snippets/rust_bindgen_str_include.md new file mode 100644 index 0000000..aad5da9 --- /dev/null +++ b/docs/markdown/snippets/rust_bindgen_str_include.md @@ -0,0 +1,4 @@ +## String arguments to the rust.bindgen include_directories argument + +Most other cases of include_directories accept strings as well as +`IncludeDirectory` objects, so lets do that here too for consistancy. |