diff --git a/Cargo.toml b/Cargo.toml index 7a211258..ca4359d1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,7 +17,8 @@ test = false doctest = false [features] -default = ["std"] +default = ["spans", "std"] +spans = ["wasm-bindgen-macro/spans"] std = [] [dependencies] diff --git a/crates/backend/Cargo.toml b/crates/backend/Cargo.toml index a8b78e5a..9db98563 100644 --- a/crates/backend/Cargo.toml +++ b/crates/backend/Cargo.toml @@ -10,9 +10,12 @@ description = """ Backend code generation of the wasm-bindgen tool """ +[features] +spans = ["proc-macro2/nightly"] + [dependencies] quote = '0.5' -proc-macro2 = { version = "0.3", features = ["nightly"] } +proc-macro2 = "0.3" wasm-bindgen-shared = { path = "../shared", version = "=0.2.5" } syn = { version = '0.13', features = ['full', 'visit-mut'] } serde_json = "1.0" diff --git a/crates/macro/Cargo.toml b/crates/macro/Cargo.toml index 7d378796..b78ed2ca 100644 --- a/crates/macro/Cargo.toml +++ b/crates/macro/Cargo.toml @@ -13,10 +13,13 @@ Definition of the `#[wasm_bindgen]` attribute, an internal dependency [lib] proc-macro = true +[features] +spans = ["proc-macro2/nightly", "wasm-bindgen-backend/spans"] + [dependencies] syn = { version = '0.13', features = ['full'] } quote = '0.5' -proc-macro2 = { version = "0.3", features = ["nightly"] } +proc-macro2 = "0.3" serde_json = "1" wasm-bindgen-shared = { path = "../shared", version = "=0.2.5" } wasm-bindgen-backend = { path = "../backend", version = "=0.2.5" }