Skip to content

Commit

Permalink
Built artifacts of c6ddcee [ci skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
mhammond committed Nov 13, 2023
1 parent 15d9329 commit c9cf1b8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions internals/api/src/uniffi_bindgen/lib.rs.html
Original file line number Diff line number Diff line change
Expand Up @@ -660,9 +660,8 @@
//!
//! ### 3) Generate and include component scaffolding from the UDL file
//!
//! First you will need to install `uniffi-bindgen` on your system using `cargo install uniffi_bindgen`.
//! Then add to your crate `uniffi_build` under `[build-dependencies]`.
//! Finally, add a `build.rs` script to your crate and have it call `uniffi_build::generate_scaffolding`
//! Add to your crate `uniffi_build` under `[build-dependencies]`,
//! then add a `build.rs` script to your crate and have it call `uniffi_build::generate_scaffolding`
//! to process your `.udl` file. This will generate some Rust code to be included in the top-level source
//! code of your crate. If your UDL file is named `example.udl`, then your build script would call:
//!
Expand All @@ -679,12 +678,13 @@
//!
//! ### 4) Generate foreign language bindings for the library
//!
//! The `uniffi-bindgen` utility provides a command-line tool that can produce code to
//! You will need ensure a local `uniffi-bindgen` - see <https://mozilla.github.io/uniffi-rs/tutorial/foreign_language_bindings.html>
//! This utility provides a command-line tool that can produce code to
//! consume the Rust library in any of several supported languages.
//! It is done by calling (in kotlin for example):
//!
//! ```text
//! uniffi-bindgen --language kotlin ./src/example.udl
//! cargo run --bin -p uniffi-bindgen --language kotlin ./src/example.udl
//! ```
//!
//! This will produce a file `example.kt` in the same directory as the .udl file, containing kotlin bindings
Expand Down
10 changes: 5 additions & 5 deletions internals/api/uniffi_bindgen/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,8 @@ <h4 id="1-specify-your-component-interface"><a href="#1-specify-your-component-i
has_a_bar: bool
}
</code></pre></div><h4 id="3-generate-and-include-component-scaffolding-from-the-udl-file"><a href="#3-generate-and-include-component-scaffolding-from-the-udl-file">3) Generate and include component scaffolding from the UDL file</a></h4>
<p>First you will need to install <code>uniffi-bindgen</code> on your system using <code>cargo install uniffi_bindgen</code>.
Then add to your crate <code>uniffi_build</code> under <code>[build-dependencies]</code>.
Finally, add a <code>build.rs</code> script to your crate and have it call <code>uniffi_build::generate_scaffolding</code>
<p>Add to your crate <code>uniffi_build</code> under <code>[build-dependencies]</code>,
then add a <code>build.rs</code> script to your crate and have it call <code>uniffi_build::generate_scaffolding</code>
to process your <code>.udl</code> file. This will generate some Rust code to be included in the top-level source
code of your crate. If your UDL file is named <code>example.udl</code>, then your build script would call:</p>
<div class="example-wrap"><pre class="language-text"><code>uniffi_build::generate_scaffolding(&quot;src/example.udl&quot;)
Expand All @@ -48,10 +47,11 @@ <h4 id="1-specify-your-component-interface"><a href="#1-specify-your-component-i
included into the code of your rust crate like this:</p>
<div class="example-wrap"><pre class="language-text"><code>include_scaffolding!(&quot;example&quot;);
</code></pre></div><h4 id="4-generate-foreign-language-bindings-for-the-library"><a href="#4-generate-foreign-language-bindings-for-the-library">4) Generate foreign language bindings for the library</a></h4>
<p>The <code>uniffi-bindgen</code> utility provides a command-line tool that can produce code to
<p>You will need ensure a local <code>uniffi-bindgen</code> - see <a href="https://mozilla.github.io/uniffi-rs/tutorial/foreign_language_bindings.html">https://mozilla.github.io/uniffi-rs/tutorial/foreign_language_bindings.html</a>
This utility provides a command-line tool that can produce code to
consume the Rust library in any of several supported languages.
It is done by calling (in kotlin for example):</p>
<div class="example-wrap"><pre class="language-text"><code>uniffi-bindgen --language kotlin ./src/example.udl
<div class="example-wrap"><pre class="language-text"><code>cargo run --bin -p uniffi-bindgen --language kotlin ./src/example.udl
</code></pre></div>
<p>This will produce a file <code>example.kt</code> in the same directory as the .udl file, containing kotlin bindings
to load and use the compiled rust code via its C-compatible FFI.</p>
Expand Down

0 comments on commit c9cf1b8

Please sign in to comment.