Skip to content

Commit

Permalink
napi: Regenerate bindings
Browse files Browse the repository at this point in the history
The napi bindings were the only bindings that were not ported
to the new generator script yet.
This is now resolved.

Signed-off-by: Jonathan Schwender <[email protected]>
  • Loading branch information
jschwe committed Jan 5, 2025
1 parent 9d403ed commit e0ea9f5
Show file tree
Hide file tree
Showing 6 changed files with 484 additions and 1,104 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# unreleased

## Breaking

- napi: `napi_property_descriptor`, `napi_node_version`, `napi_extended_error_info` no longer derive Copy/Clone.

# v0.5.0 (2025-01-04)

## Breaking
Expand Down
16 changes: 16 additions & 0 deletions scripts/generator/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,22 @@ fn get_bindings_config(api_version: u32) -> Vec<BindingConf> {
.blocklist_var("LOG_DOMAIN")
}),
},
BindingConf {
include_filename: "napi/native_api.h".to_string(),
output_prefix: "src/napi/napi".to_string(),
set_builder_opts: Box::new(|builder| {
builder
.default_enum_style(EnumVariation::NewType {
is_bitfield: false,
is_global: false,
})
.prepend_enum_name(false)
.no_copy("napi_property_descriptor")
.no_copy("napi_extended_error_info")
.no_copy("napi_node_version")
.no_copy("napi_module")
}),
},
BindingConf {
include_filename: "hitrace/trace.h".to_string(),
output_prefix: "components/hitrace/src/hitrace".to_string(),
Expand Down
11 changes: 2 additions & 9 deletions src/napi.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
#[link(name = "ace_napi.z")]
extern "C" {}

mod napi_api10;
pub use napi_api10::*;

#[cfg(feature = "api-11")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-11")))]
mod api11_additions;
#[cfg(feature = "api-11")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-11")))]
pub use api11_additions::*;
mod napi_ffi;
pub use napi_ffi::*;
52 changes: 0 additions & 52 deletions src/napi/api11_additions.rs

This file was deleted.

Loading

0 comments on commit e0ea9f5

Please sign in to comment.