chore (backend-rs): update build script

This commit is contained in:
naskya 2024-06-06 17:10:41 +09:00
parent 8fd3f82d0b
commit 64088819be
No known key found for this signature in database
GPG key ID: 712D413B3A9FED5C
2 changed files with 3 additions and 4 deletions

View file

@ -6,7 +6,7 @@ rust-version = "1.74"
[features]
default = []
napi = ["dep:napi", "dep:napi-derive"]
napi = ["dep:napi", "dep:napi-derive", "dep:napi-build"]
[lib]
crate-type = ["cdylib", "lib"]
@ -53,4 +53,4 @@ pretty_assertions = { workspace = true, features = ["std"] }
tokio-test = { workspace = true }
[build-dependencies]
napi-build = { workspace = true }
napi-build = { workspace = true, optional = true }

View file

@ -1,9 +1,8 @@
extern crate napi_build;
fn main() {
// watch the version in the project root package.json
println!("cargo:rerun-if-changed=../../package.json");
// napi
#[cfg(feature = "napi")]
napi_build::setup();
}