From e77582b251080a1170582e2591f3c36738806ff1 Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Mon, 10 Jan 2022 10:14:53 -0800 Subject: [PATCH] docs: fix rust module bindgen arguments Fixes: 9795 --- docs/markdown/Rust-module.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/markdown/Rust-module.md b/docs/markdown/Rust-module.md index 9f8b09b57..54834b7b5 100644 --- a/docs/markdown/Rust-module.md +++ b/docs/markdown/Rust-module.md @@ -34,7 +34,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, 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 @@ -60,8 +60,8 @@ rust = import('unstable-rust') inc = include_directories('..'ΒΈ '../../foo') generated = rust.bindgen( - 'myheader.h', - 'generated.rs', + input : 'myheader.h', + output : 'generated.rs', include_directories : [inc, include_directories('foo')], args : ['--no-rustfmt-bindings'], c_args : ['-DFOO=1'], @@ -77,7 +77,7 @@ h1 = custom_target(...) h2 = custom_target(...) r1 = rust.bindgen( - [h1, h2], # h1 includes h2, - 'out.rs', + input : [h1, h2], # h1 includes h2, + output : 'out.rs', ) ```