Skip to content

Commit

Permalink
Simplify no_std implementation (rustwasm#4347)
Browse files Browse the repository at this point in the history
  • Loading branch information
daxpedda committed Dec 19, 2024
1 parent 065b845 commit 84e0d6b
Show file tree
Hide file tree
Showing 23 changed files with 136 additions and 290 deletions.
1 change: 0 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,6 @@ jobs:
run: |
cargo update -p bumpalo --precise 3.12.0
cargo update -p log --precise 0.4.18
cargo update -p scoped-tls --precise 1.0.0
- run: cargo build --target ${{ matrix.target }} ${{ matrix.features }}

msrv-lib:
Expand Down
5 changes: 3 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ default = ["std", "msrv"]
enable-interning = ["std"]
serde-serialize = ["serde", "serde_json", "std"]
spans = []
std = ["wasm-bindgen-macro/std", "once_cell/std"]
std = []

# Opt-in for Rust language features that require a higher MSRV.
#
Expand All @@ -53,9 +53,10 @@ once_cell = { version = "1.12", default-features = false }
rustversion = { version = "1.0", optional = true }
serde = { version = "1.0", optional = true }
serde_json = { version = "1.0", optional = true }
wasm-bindgen-macro = { path = "crates/macro", version = "=0.2.99", default-features = false }
wasm-bindgen-macro = { path = "crates/macro", version = "=0.2.99" }

[dev-dependencies]
once_cell = "1"
wasm-bindgen-test = { path = 'crates/test' }

[target.'cfg(target_arch = "wasm32")'.dev-dependencies]
Expand Down
2 changes: 0 additions & 2 deletions crates/backend/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ rust-version = "1.57"
version = "0.2.99"

[features]
default = ["std"]
extra-traits = ["syn/extra-traits"]
std = []

[dependencies]
bumpalo = "3.0.0"
Expand Down
14 changes: 1 addition & 13 deletions crates/backend/src/codegen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1803,24 +1803,12 @@ fn thread_local_import(
}
},
ast::ThreadLocal::V2 => {
#[cfg(feature = "std")]
let inner = quote! {
#wasm_bindgen::__rt::std::thread_local!(static _VAL: #actual_ty = init(););
#wasm_bindgen::JsThreadLocal {
__inner: &_VAL,
}
};
#[cfg(not(feature = "std"))]
let inner = quote! {
#wasm_bindgen::__wbindgen_thread_local!(#wasm_bindgen, #actual_ty)
};

quote! {
#vis static #name: #wasm_bindgen::JsThreadLocal<#actual_ty> = {
fn init() -> #actual_ty {
#init
}
#inner
#wasm_bindgen::__wbindgen_thread_local!(#wasm_bindgen, #actual_ty)
};
}
}
Expand Down
4 changes: 2 additions & 2 deletions crates/cli/tests/reference/anyref-import-catch.wat
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
(import "./reference_test_bg.js" "__wbindgen_init_externref_table" (func (;0;) (type 0)))
(func $__wbindgen_exn_store (;1;) (type 3) (param i32))
(func $__externref_table_dealloc (;2;) (type 3) (param i32))
(func $__externref_table_alloc (;3;) (type 1) (result i32))
(func $"exported multivalue shim" (;4;) (type 2) (result i32 i32))
(func $"exported multivalue shim" (;3;) (type 2) (result i32 i32))
(func $__externref_table_alloc (;4;) (type 1) (result i32))
(table (;0;) 128 externref)
(memory (;0;) 17)
(export "memory" (memory 0))
Expand Down
94 changes: 47 additions & 47 deletions crates/cli/tests/reference/echo.wat
Original file line number Diff line number Diff line change
Expand Up @@ -46,53 +46,53 @@
(func $echo_i64 (;29;) (type 11) (param i64) (result i64))
(func $echo_f64 (;30;) (type 14) (param f64) (result f64))
(func $__wbindgen_free (;31;) (type 6) (param i32 i32 i32))
(func $__externref_table_alloc (;32;) (type 1) (result i32))
(func $__wbg_foo_free (;33;) (type 3) (param i32 i32))
(func $"echo_option_u128 multivalue shim" (;34;) (type 9) (param i32 i64 i64) (result i32 i64 i64))
(func $"echo_option_i128 multivalue shim" (;35;) (type 9) (param i32 i64 i64) (result i32 i64 i64))
(func $"echo_u128 multivalue shim" (;36;) (type 12) (param i64 i64) (result i64 i64))
(func $"echo_i128 multivalue shim" (;37;) (type 12) (param i64 i64) (result i64 i64))
(func $"echo_string multivalue shim" (;38;) (type 5) (param i32 i32) (result i32 i32))
(func $"echo_vec_u8 multivalue shim" (;39;) (type 5) (param i32 i32) (result i32 i32))
(func $"echo_vec_i8 multivalue shim" (;40;) (type 5) (param i32 i32) (result i32 i32))
(func $"echo_vec_u16 multivalue shim" (;41;) (type 5) (param i32 i32) (result i32 i32))
(func $"echo_vec_i16 multivalue shim" (;42;) (type 5) (param i32 i32) (result i32 i32))
(func $"echo_vec_u32 multivalue shim" (;43;) (type 5) (param i32 i32) (result i32 i32))
(func $"echo_vec_i32 multivalue shim" (;44;) (type 5) (param i32 i32) (result i32 i32))
(func $"echo_vec_u64 multivalue shim" (;45;) (type 5) (param i32 i32) (result i32 i32))
(func $"echo_vec_i64 multivalue shim" (;46;) (type 5) (param i32 i32) (result i32 i32))
(func $"echo_vec_uninit_u8 multivalue shim" (;47;) (type 5) (param i32 i32) (result i32 i32))
(func $"echo_vec_uninit_i8 multivalue shim" (;48;) (type 5) (param i32 i32) (result i32 i32))
(func $"echo_vec_uninit_u16 multivalue shim" (;49;) (type 5) (param i32 i32) (result i32 i32))
(func $"echo_vec_uninit_i16 multivalue shim" (;50;) (type 5) (param i32 i32) (result i32 i32))
(func $"echo_vec_uninit_u32 multivalue shim" (;51;) (type 5) (param i32 i32) (result i32 i32))
(func $"echo_vec_uninit_i32 multivalue shim" (;52;) (type 5) (param i32 i32) (result i32 i32))
(func $"echo_vec_uninit_u64 multivalue shim" (;53;) (type 5) (param i32 i32) (result i32 i32))
(func $"echo_vec_uninit_i64 multivalue shim" (;54;) (type 5) (param i32 i32) (result i32 i32))
(func $"echo_vec_string multivalue shim" (;55;) (type 5) (param i32 i32) (result i32 i32))
(func $"echo_vec_struct multivalue shim" (;56;) (type 5) (param i32 i32) (result i32 i32))
(func $"echo_option_u64 multivalue shim" (;57;) (type 8) (param i32 i64) (result i32 i64))
(func $"echo_option_i64 multivalue shim" (;58;) (type 8) (param i32 i64) (result i32 i64))
(func $"echo_option_f64 multivalue shim" (;59;) (type 10) (param i32 f64) (result i32 f64))
(func $"echo_option_string multivalue shim" (;60;) (type 5) (param i32 i32) (result i32 i32))
(func $"echo_option_vec_u8 multivalue shim" (;61;) (type 5) (param i32 i32) (result i32 i32))
(func $"echo_option_vec_i8 multivalue shim" (;62;) (type 5) (param i32 i32) (result i32 i32))
(func $"echo_option_vec_u16 multivalue shim" (;63;) (type 5) (param i32 i32) (result i32 i32))
(func $"echo_option_vec_i16 multivalue shim" (;64;) (type 5) (param i32 i32) (result i32 i32))
(func $"echo_option_vec_u32 multivalue shim" (;65;) (type 5) (param i32 i32) (result i32 i32))
(func $"echo_option_vec_i32 multivalue shim" (;66;) (type 5) (param i32 i32) (result i32 i32))
(func $"echo_option_vec_u64 multivalue shim" (;67;) (type 5) (param i32 i32) (result i32 i32))
(func $"echo_option_vec_i64 multivalue shim" (;68;) (type 5) (param i32 i32) (result i32 i32))
(func $"echo_option_vec_uninit_u8 multivalue shim" (;69;) (type 5) (param i32 i32) (result i32 i32))
(func $"echo_option_vec_uninit_i8 multivalue shim" (;70;) (type 5) (param i32 i32) (result i32 i32))
(func $"echo_option_vec_uninit_u16 multivalue shim" (;71;) (type 5) (param i32 i32) (result i32 i32))
(func $"echo_option_vec_uninit_i16 multivalue shim" (;72;) (type 5) (param i32 i32) (result i32 i32))
(func $"echo_option_vec_uninit_u32 multivalue shim" (;73;) (type 5) (param i32 i32) (result i32 i32))
(func $"echo_option_vec_uninit_i32 multivalue shim" (;74;) (type 5) (param i32 i32) (result i32 i32))
(func $"echo_option_vec_uninit_u64 multivalue shim" (;75;) (type 5) (param i32 i32) (result i32 i32))
(func $"echo_option_vec_uninit_i64 multivalue shim" (;76;) (type 5) (param i32 i32) (result i32 i32))
(func $"echo_option_vec_string multivalue shim" (;77;) (type 5) (param i32 i32) (result i32 i32))
(func $"echo_option_vec_struct multivalue shim" (;78;) (type 5) (param i32 i32) (result i32 i32))
(func $__wbg_foo_free (;32;) (type 3) (param i32 i32))
(func $"echo_option_u128 multivalue shim" (;33;) (type 9) (param i32 i64 i64) (result i32 i64 i64))
(func $"echo_option_i128 multivalue shim" (;34;) (type 9) (param i32 i64 i64) (result i32 i64 i64))
(func $"echo_u128 multivalue shim" (;35;) (type 12) (param i64 i64) (result i64 i64))
(func $"echo_i128 multivalue shim" (;36;) (type 12) (param i64 i64) (result i64 i64))
(func $"echo_string multivalue shim" (;37;) (type 5) (param i32 i32) (result i32 i32))
(func $"echo_vec_u8 multivalue shim" (;38;) (type 5) (param i32 i32) (result i32 i32))
(func $"echo_vec_i8 multivalue shim" (;39;) (type 5) (param i32 i32) (result i32 i32))
(func $"echo_vec_u16 multivalue shim" (;40;) (type 5) (param i32 i32) (result i32 i32))
(func $"echo_vec_i16 multivalue shim" (;41;) (type 5) (param i32 i32) (result i32 i32))
(func $"echo_vec_u32 multivalue shim" (;42;) (type 5) (param i32 i32) (result i32 i32))
(func $"echo_vec_i32 multivalue shim" (;43;) (type 5) (param i32 i32) (result i32 i32))
(func $"echo_vec_u64 multivalue shim" (;44;) (type 5) (param i32 i32) (result i32 i32))
(func $"echo_vec_i64 multivalue shim" (;45;) (type 5) (param i32 i32) (result i32 i32))
(func $"echo_vec_uninit_u8 multivalue shim" (;46;) (type 5) (param i32 i32) (result i32 i32))
(func $"echo_vec_uninit_i8 multivalue shim" (;47;) (type 5) (param i32 i32) (result i32 i32))
(func $"echo_vec_uninit_u16 multivalue shim" (;48;) (type 5) (param i32 i32) (result i32 i32))
(func $"echo_vec_uninit_i16 multivalue shim" (;49;) (type 5) (param i32 i32) (result i32 i32))
(func $"echo_vec_uninit_u32 multivalue shim" (;50;) (type 5) (param i32 i32) (result i32 i32))
(func $"echo_vec_uninit_i32 multivalue shim" (;51;) (type 5) (param i32 i32) (result i32 i32))
(func $"echo_vec_uninit_u64 multivalue shim" (;52;) (type 5) (param i32 i32) (result i32 i32))
(func $"echo_vec_uninit_i64 multivalue shim" (;53;) (type 5) (param i32 i32) (result i32 i32))
(func $"echo_vec_string multivalue shim" (;54;) (type 5) (param i32 i32) (result i32 i32))
(func $"echo_vec_struct multivalue shim" (;55;) (type 5) (param i32 i32) (result i32 i32))
(func $"echo_option_u64 multivalue shim" (;56;) (type 8) (param i32 i64) (result i32 i64))
(func $"echo_option_i64 multivalue shim" (;57;) (type 8) (param i32 i64) (result i32 i64))
(func $"echo_option_f64 multivalue shim" (;58;) (type 10) (param i32 f64) (result i32 f64))
(func $"echo_option_string multivalue shim" (;59;) (type 5) (param i32 i32) (result i32 i32))
(func $"echo_option_vec_u8 multivalue shim" (;60;) (type 5) (param i32 i32) (result i32 i32))
(func $"echo_option_vec_i8 multivalue shim" (;61;) (type 5) (param i32 i32) (result i32 i32))
(func $"echo_option_vec_u16 multivalue shim" (;62;) (type 5) (param i32 i32) (result i32 i32))
(func $"echo_option_vec_i16 multivalue shim" (;63;) (type 5) (param i32 i32) (result i32 i32))
(func $"echo_option_vec_u32 multivalue shim" (;64;) (type 5) (param i32 i32) (result i32 i32))
(func $"echo_option_vec_i32 multivalue shim" (;65;) (type 5) (param i32 i32) (result i32 i32))
(func $"echo_option_vec_u64 multivalue shim" (;66;) (type 5) (param i32 i32) (result i32 i32))
(func $"echo_option_vec_i64 multivalue shim" (;67;) (type 5) (param i32 i32) (result i32 i32))
(func $"echo_option_vec_uninit_u8 multivalue shim" (;68;) (type 5) (param i32 i32) (result i32 i32))
(func $"echo_option_vec_uninit_i8 multivalue shim" (;69;) (type 5) (param i32 i32) (result i32 i32))
(func $"echo_option_vec_uninit_u16 multivalue shim" (;70;) (type 5) (param i32 i32) (result i32 i32))
(func $"echo_option_vec_uninit_i16 multivalue shim" (;71;) (type 5) (param i32 i32) (result i32 i32))
(func $"echo_option_vec_uninit_u32 multivalue shim" (;72;) (type 5) (param i32 i32) (result i32 i32))
(func $"echo_option_vec_uninit_i32 multivalue shim" (;73;) (type 5) (param i32 i32) (result i32 i32))
(func $"echo_option_vec_uninit_u64 multivalue shim" (;74;) (type 5) (param i32 i32) (result i32 i32))
(func $"echo_option_vec_uninit_i64 multivalue shim" (;75;) (type 5) (param i32 i32) (result i32 i32))
(func $"echo_option_vec_string multivalue shim" (;76;) (type 5) (param i32 i32) (result i32 i32))
(func $"echo_option_vec_struct multivalue shim" (;77;) (type 5) (param i32 i32) (result i32 i32))
(func $__externref_table_alloc (;78;) (type 1) (result i32))
(table (;0;) 128 externref)
(memory (;0;) 17)
(export "memory" (memory 0))
Expand Down
4 changes: 2 additions & 2 deletions crates/cli/tests/reference/import.wat
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
(import "./reference_test_bg.js" "__wbindgen_init_externref_table" (func (;0;) (type 0)))
(func $__wbindgen_exn_store (;1;) (type 3) (param i32))
(func $__externref_table_dealloc (;2;) (type 3) (param i32))
(func $__externref_table_alloc (;3;) (type 1) (result i32))
(func $"exported multivalue shim" (;4;) (type 2) (result i32 i32))
(func $"exported multivalue shim" (;3;) (type 2) (result i32 i32))
(func $__externref_table_alloc (;4;) (type 1) (result i32))
(table (;0;) 128 externref)
(memory (;0;) 17)
(export "memory" (memory 0))
Expand Down
4 changes: 2 additions & 2 deletions crates/cli/tests/reference/static.wat
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
(type (;0;) (func))
(type (;1;) (func (result i32)))
(import "./reference_test_bg.js" "__wbindgen_init_externref_table" (func (;0;) (type 0)))
(func $__externref_table_alloc (;1;) (type 1) (result i32))
(func $exported (;2;) (type 0))
(func $exported (;1;) (type 0))
(func $__externref_table_alloc (;2;) (type 1) (result i32))
(table (;0;) 128 externref)
(memory (;0;) 17)
(export "memory" (memory 0))
Expand Down
2 changes: 1 addition & 1 deletion crates/futures/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ wasm-bindgen = { path = "../..", version = '=0.2.99', default-features = false }
[features]
default = ["std"]
futures-core-03-stream = ['futures-core']
std = ["wasm-bindgen/std", "js-sys/std", "web-sys/std", "once_cell/std"]
std = ["wasm-bindgen/std", "js-sys/std", "web-sys/std"]

[target.'cfg(target_feature = "atomics")'.dependencies]
web-sys = { path = "../web-sys", version = "=0.3.76", default-features = false, features = [
Expand Down
5 changes: 2 additions & 3 deletions crates/futures/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,9 @@
//! asynchronous and I/O work.
#![cfg_attr(not(feature = "std"), no_std)]
#![cfg_attr(target_feature = "atomics", feature(stdarch_wasm_atomic_wait))]
#![cfg_attr(
all(not(feature = "std"), target_feature = "atomics"),
feature(thread_local)
target_feature = "atomics",
feature(thread_local, stdarch_wasm_atomic_wait)
)]
#![deny(missing_docs)]
#![cfg_attr(docsrs, feature(doc_cfg))]
Expand Down
10 changes: 0 additions & 10 deletions crates/futures/src/queue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,16 +107,6 @@ impl Queue {
}
}

#[cfg(feature = "std")]
pub(crate) fn with<R>(f: impl FnOnce(&Self) -> R) -> R {
thread_local! {
static QUEUE: Queue = Queue::new();
}

QUEUE.with(f)
}

#[cfg(not(feature = "std"))]
pub(crate) fn with<R>(f: impl FnOnce(&Self) -> R) -> R {
use once_cell::unsync::Lazy;

Expand Down
42 changes: 10 additions & 32 deletions crates/futures/src/task/wait_async_polyfill.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,44 +46,22 @@ use js_sys::{Array, Promise};
use wasm_bindgen::prelude::*;
use web_sys::{MessageEvent, Worker};

struct Helpers;

impl Helpers {
#[cfg(feature = "std")]
pub(crate) fn with<R>(f: impl FnOnce(&RefCell<Vec<Worker>>) -> R) -> R {
thread_local! {
static HELPERS: RefCell<Vec<Worker>> = RefCell::new(vec![]);
}

HELPERS.with(f)
}

#[cfg(not(feature = "std"))]
pub(crate) fn with<R>(f: impl FnOnce(&RefCell<Vec<Worker>>) -> R) -> R {
#[thread_local]
static HELPERS: RefCell<Vec<Worker>> = RefCell::new(vec![]);

f(&HELPERS)
}
}
#[thread_local]
static HELPERS: RefCell<Vec<Worker>> = RefCell::new(vec![]);

fn alloc_helper() -> Worker {
Helpers::with(|helpers| {
if let Some(helper) = helpers.borrow_mut().pop() {
return helper;
}
if let Some(helper) = HELPERS.borrow_mut().pop() {
return helper;
}

let worker_url = wasm_bindgen::link_to!(module = "/src/task/worker.js");
Worker::new(&worker_url).unwrap_or_else(|js| wasm_bindgen::throw_val(js))
})
let worker_url = wasm_bindgen::link_to!(module = "/src/task/worker.js");
Worker::new(&worker_url).unwrap_or_else(|js| wasm_bindgen::throw_val(js))
}

fn free_helper(helper: Worker) {
Helpers::with(move |helpers| {
let mut helpers = helpers.borrow_mut();
helpers.push(helper.clone());
helpers.truncate(10); // random arbitrary limit chosen here
});
let mut helpers = HELPERS.borrow_mut();
helpers.push(helper.clone());
helpers.truncate(10); // random arbitrary limit chosen here
}

pub fn wait_async(ptr: &AtomicI32, value: i32) -> Promise {
Expand Down
31 changes: 10 additions & 21 deletions crates/js-sys/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,7 @@
#![doc(html_root_url = "https://docs.rs/js-sys/0.2")]
#![cfg_attr(not(feature = "std"), no_std)]
#![cfg_attr(
all(not(feature = "std"), target_feature = "atomics"),
feature(thread_local)
)]
#![cfg_attr(target_feature = "atomics", feature(thread_local))]

extern crate alloc;

Expand Down Expand Up @@ -6031,28 +6028,20 @@ extern "C" {
/// This allows access to the global properties and global names by accessing
/// the `Object` returned.
pub fn global() -> Object {
#[cfg(feature = "std")]
{
thread_local!(static GLOBAL: Object = get_global_object());
return GLOBAL.with(|g| g.clone());
}
#[cfg(not(feature = "std"))]
{
use once_cell::unsync::Lazy;
use once_cell::unsync::Lazy;

struct Wrapper<T>(Lazy<T>);
struct Wrapper<T>(Lazy<T>);

#[cfg(not(target_feature = "atomics"))]
unsafe impl<T> Sync for Wrapper<T> {}
#[cfg(not(target_feature = "atomics"))]
unsafe impl<T> Sync for Wrapper<T> {}

#[cfg(not(target_feature = "atomics"))]
unsafe impl<T> Send for Wrapper<T> {}
#[cfg(not(target_feature = "atomics"))]
unsafe impl<T> Send for Wrapper<T> {}

#[cfg_attr(target_feature = "atomics", thread_local)]
static GLOBAL: Wrapper<Object> = Wrapper(Lazy::new(get_global_object));
#[cfg_attr(target_feature = "atomics", thread_local)]
static GLOBAL: Wrapper<Object> = Wrapper(Lazy::new(get_global_object));

return GLOBAL.0.clone();
}
return GLOBAL.0.clone();

fn get_global_object() -> Object {
// Accessing the global object is not an easy thing to do, and what we
Expand Down
4 changes: 1 addition & 3 deletions crates/macro-support/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,14 @@ rust-version = "1.57"
version = "0.2.99"

[features]
default = ["std"]
extra-traits = ["syn/extra-traits"]
std = ["wasm-bindgen-backend/std"]
strict-macro = []

[dependencies]
proc-macro2 = "1.0"
quote = '1.0'
syn = { version = '2.0', features = ['visit', 'visit-mut', 'full'] }
wasm-bindgen-backend = { path = "../backend", version = "=0.2.99", default-features = false }
wasm-bindgen-backend = { path = "../backend", version = "=0.2.99" }
wasm-bindgen-shared = { path = "../shared", version = "=0.2.99" }

[lints]
Expand Down
4 changes: 1 addition & 3 deletions crates/macro/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,12 @@ version = "0.2.99"
proc-macro = true

[features]
default = ["std"]
std = ["wasm-bindgen-macro-support/std"]
strict-macro = ["wasm-bindgen-macro-support/strict-macro"]
xxx_debug_only_print_generated_code = []

[dependencies]
quote = "1.0"
wasm-bindgen-macro-support = { path = "../macro-support", version = "=0.2.99", default-features = false }
wasm-bindgen-macro-support = { path = "../macro-support", version = "=0.2.99" }

[dev-dependencies]
js-sys = { path = "../js-sys" }
Expand Down
1 change: 0 additions & 1 deletion crates/msrv/lib/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,3 @@ web-sys = { path = "../../web-sys", default-features = false }
# Pinned sub-dependencies for MSRV
bumpalo = "=3.12.0"
log = "=0.4.18"
scoped-tls = { version = "=1.0.0", optional = false }
3 changes: 1 addition & 2 deletions crates/test/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,11 @@ version = "0.3.49"

[features]
default = ["std"]
std = ["wasm-bindgen/std", "js-sys/std", "wasm-bindgen-futures/std", "scoped-tls"]
std = ["wasm-bindgen/std", "js-sys/std", "wasm-bindgen-futures/std"]

[dependencies]
gg-alloc = { version = "1.0", optional = true }
js-sys = { path = '../js-sys', version = '=0.3.76', default-features = false }
scoped-tls = { version = "1.0", optional = true }
wasm-bindgen = { path = '../..', version = '=0.2.99', default-features = false }
wasm-bindgen-futures = { path = '../futures', version = '=0.4.49', default-features = false }
wasm-bindgen-test-macro = { path = '../test-macro', version = '=0.3.49' }
Expand Down
Loading

0 comments on commit 84e0d6b

Please sign in to comment.