Skip to content

Commit

Permalink
Simply the options used with wit-bindgen-rust. (#354)
Browse files Browse the repository at this point in the history
Use the default `bitflags_path`, because it's now the same as what we
were overriding it to be. And add a comment to the `runtime_path`
option, to explain why we override it.
  • Loading branch information
sunfishcode authored Nov 18, 2024
1 parent 0186a82 commit 1e58afa
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/bindings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,13 @@ impl<'a> BindingsGenerator<'a> {
},
additional_derive_attributes: settings.derives.clone(),
std_feature: settings.std_feature,
// We use pregenerated bindings, rather than the `generate!` macro
// from the `wit-bindgen` crate, so instead of getting the runtime
// from the default path of `wit_bindgen::rt`, which is a re-export
// of the `wit-bindgen-rt` API, we just use the `wit-bindgen-rt`
// crate directly.
runtime_path: Some("wit_bindgen_rt".to_string()),
bitflags_path: Some("wit_bindgen_rt::bitflags".to_string()),
bitflags_path: None,
raw_strings: settings.raw_strings,
skip: settings.skip.clone(),
stubs: settings.stubs,
Expand Down

0 comments on commit 1e58afa

Please sign in to comment.