Skip to content

Commit 990b96d

Browse files
authored
chore(napi): make napi binary smaller with minimal tracing features (#213)
1 parent 09da311 commit 990b96d

File tree

3 files changed

+10
-70
lines changed

3 files changed

+10
-70
lines changed

Cargo.lock

Lines changed: 0 additions & 65 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

napi/Cargo.toml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,13 @@ test = false
1111
doctest = false
1212

1313
[dependencies]
14-
oxc_resolver = { path = ".." }
15-
napi = { version = "2.16.7", default-features = false, features = ["napi3", "serde-json"] }
16-
napi-derive = { version = "2.16.6" }
17-
tracing-subscriber = { version = "0.3.18", features = [] } # Omit the `regex` feature
14+
oxc_resolver = { path = ".." }
15+
napi = { version = "2.16.7", default-features = false, features = ["napi3", "serde-json"] }
16+
napi-derive = { version = "2.16.6" }
17+
tracing-subscriber = { version = "0.3.18", default-features = false, features = [
18+
"std",
19+
"fmt",
20+
] } # Omit the `regex` feature
1821

1922
[build-dependencies]
2023
napi-build = "2.1.3"

napi/src/tracing.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
use std::sync::OnceLock;
22

3-
use tracing_subscriber::{filter::Targets, prelude::*};
3+
use tracing_subscriber::filter::Targets;
4+
use tracing_subscriber::prelude::__tracing_subscriber_SubscriberExt;
5+
use tracing_subscriber::util::SubscriberInitExt;
46

57
/// To debug `oxc_resolver`:
68
/// `OXC_LOG=DEBUG your program`

0 commit comments

Comments
 (0)