Skip to content

Commit 27258ab

Browse files
authored
build(edr_napi): move dyn-symbols to dev-dependencies (#1533) (#1534)
1 parent 99e2d33 commit 27258ab

2 files changed

Lines changed: 13 additions & 8 deletions

File tree

crates/edr_napi/Cargo.toml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,8 @@ mimalloc = { version = "0.1.39", default-features = false, features = [
4646
"local_dynamic_tls",
4747
] }
4848
# The `async` feature ensures that a tokio runtime is available.
49-
# `dyn-symbols` lets test binaries that keep napi code alive link outside a Node host.
50-
# TODO(#1533): gate `dyn-symbols` behind a non-default feature so it stays out of the published addon.
5149
napi = { version = "3", default-features = false, features = [
5250
"async",
53-
"dyn-symbols",
5451
"error_anyhow",
5552
"napi8",
5653
"serde-json",
@@ -95,6 +92,12 @@ openssl-sys = { version = "0.9.93", features = ["vendored"] }
9592
# napi-build has no v3 release; 2.x is current for napi 3.
9693
napi-build = "2.3"
9794

95+
[dev-dependencies]
96+
# `dyn-symbols` resolves N-API symbols at runtime so standalone test binaries
97+
# link without a Node host. Kept out of [dependencies] so the published addon
98+
# links against Node's symbols directly and doesn't ship libloading resolution.
99+
napi = { version = "3", default-features = false, features = ["dyn-symbols"] }
100+
98101
[features]
99102
op = ["dep:edr_op"]
100103
scenarios = ["dep:edr_scenarios", "dep:rand"]

crates/edr_napi_core/Cargo.toml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,8 @@ edr_solidity_tests.workspace = true
2727
edr_transaction.workspace = true
2828
foundry-cheatcodes.workspace = true
2929
itertools = { version = "0.15.0", default-features = false }
30-
# `dyn-symbols` (an upstream default) resolves N-API symbols at runtime via
31-
# libloading instead of link-time externs. Without it, this crate's unit-test
32-
# binary fails to link: the tests keep `napi::Error` paths alive, and its Drop
33-
# references N-API symbols that only a Node host provides.
3430
napi = { version = "3", default-features = false, features = [
3531
"async",
36-
"dyn-symbols",
3732
"error_anyhow",
3833
"napi8",
3934
"serde-json",
@@ -44,6 +39,13 @@ serde_json.workspace = true
4439
thiserror.workspace = true
4540
tokio.workspace = true
4641

42+
[dev-dependencies]
43+
# `dyn-symbols` resolves N-API symbols at runtime so this crate's unit-test
44+
# binary links without a Node host: the tests keep `napi::Error` Drop paths
45+
# alive, which reference N-API symbols only a Node host provides. Kept out of
46+
# [dependencies] so nothing downstream ships libloading resolution.
47+
napi = { version = "3", default-features = false, features = ["dyn-symbols"] }
48+
4749
[features]
4850
tracing = [
4951
"edr_chain_l1/tracing",

0 commit comments

Comments
 (0)