mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-06-15 05:51:23 +00:00
Update dependencies and use new walrus custom sections APIs
This commit is contained in:
@ -13,4 +13,4 @@ edition = '2018'
|
|||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
failure = "0.1"
|
failure = "0.1"
|
||||||
walrus = "0.6"
|
walrus = "0.7.0"
|
||||||
|
@ -18,7 +18,7 @@ log = "0.4"
|
|||||||
rustc-demangle = "0.1.13"
|
rustc-demangle = "0.1.13"
|
||||||
serde_json = "1.0"
|
serde_json = "1.0"
|
||||||
tempfile = "3.0"
|
tempfile = "3.0"
|
||||||
walrus = "0.6.0"
|
walrus = "0.7.0"
|
||||||
wasm-bindgen-anyref-xform = { path = '../anyref-xform', version = '=0.2.44' }
|
wasm-bindgen-anyref-xform = { path = '../anyref-xform', version = '=0.2.44' }
|
||||||
wasm-bindgen-shared = { path = "../shared", version = '=0.2.44' }
|
wasm-bindgen-shared = { path = "../shared", version = '=0.2.44' }
|
||||||
wasm-bindgen-threads-xform = { path = '../threads-xform', version = '=0.2.44' }
|
wasm-bindgen-threads-xform = { path = '../threads-xform', version = '=0.2.44' }
|
||||||
|
@ -508,20 +508,14 @@ fn extract_programs<'a>(
|
|||||||
program_storage: &'a mut Vec<Vec<u8>>,
|
program_storage: &'a mut Vec<Vec<u8>>,
|
||||||
) -> Result<Vec<decode::Program<'a>>, Error> {
|
) -> Result<Vec<decode::Program<'a>>, Error> {
|
||||||
let my_version = wasm_bindgen_shared::version();
|
let my_version = wasm_bindgen_shared::version();
|
||||||
let mut to_remove = Vec::new();
|
|
||||||
assert!(program_storage.is_empty());
|
assert!(program_storage.is_empty());
|
||||||
|
|
||||||
for (i, custom) in module.custom.iter_mut().enumerate() {
|
while let Some(raw) = module.customs.remove_raw("__wasm_bindgen_unstable") {
|
||||||
if custom.name != "__wasm_bindgen_unstable" {
|
log::debug!(
|
||||||
continue;
|
"custom section '{}' looks like a wasm bindgen section",
|
||||||
}
|
raw.name
|
||||||
to_remove.push(i);
|
);
|
||||||
log::debug!("custom section {} looks like a wasm bindgen section", i);
|
program_storage.push(raw.data);
|
||||||
program_storage.push(mem::replace(&mut custom.value, Vec::new()));
|
|
||||||
}
|
|
||||||
|
|
||||||
for i in to_remove.into_iter().rev() {
|
|
||||||
module.custom.remove(i);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
let mut ret = Vec::new();
|
let mut ret = Vec::new();
|
||||||
|
@ -24,7 +24,7 @@ rouille = { version = "3.0.0", default-features = false }
|
|||||||
serde = { version = "1.0", features = ['derive'] }
|
serde = { version = "1.0", features = ['derive'] }
|
||||||
serde_derive = "1.0"
|
serde_derive = "1.0"
|
||||||
serde_json = "1.0"
|
serde_json = "1.0"
|
||||||
walrus = "0.6"
|
walrus = "0.7.0"
|
||||||
wasm-bindgen-cli-support = { path = "../cli-support", version = "=0.2.44" }
|
wasm-bindgen-cli-support = { path = "../cli-support", version = "=0.2.44" }
|
||||||
wasm-bindgen-shared = { path = "../shared", version = "=0.2.44" }
|
wasm-bindgen-shared = { path = "../shared", version = "=0.2.44" }
|
||||||
|
|
||||||
|
@ -94,11 +94,11 @@ fn rmain() -> Result<(), Error> {
|
|||||||
// `wasm_bindgen_test_configure` macro, which emits a custom section for us
|
// `wasm_bindgen_test_configure` macro, which emits a custom section for us
|
||||||
// to read later on.
|
// to read later on.
|
||||||
let mut node = true;
|
let mut node = true;
|
||||||
for custom in wasm.custom.iter() {
|
for (_id, custom) in wasm.customs.iter() {
|
||||||
if custom.name != "__wasm_bindgen_test_unstable" {
|
if custom.name() != "__wasm_bindgen_test_unstable" {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
node = !custom.value.contains(&0x01);
|
node = !custom.data().contains(&0x01);
|
||||||
}
|
}
|
||||||
let headless = env::var("NO_HEADLESS").is_err();
|
let headless = env::var("NO_HEADLESS").is_err();
|
||||||
let debug = env::var("WASM_BINDGEN_NO_DEBUG").is_err();
|
let debug = env::var("WASM_BINDGEN_NO_DEBUG").is_err();
|
||||||
|
@ -13,4 +13,4 @@ edition = "2018"
|
|||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
failure = "0.1"
|
failure = "0.1"
|
||||||
walrus = "0.6"
|
walrus = "0.7.0"
|
||||||
|
@ -14,7 +14,7 @@ edition = '2018'
|
|||||||
[dependencies]
|
[dependencies]
|
||||||
failure = "0.1"
|
failure = "0.1"
|
||||||
log = "0.4"
|
log = "0.4"
|
||||||
walrus = "0.6"
|
walrus = "0.7.0"
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
tempfile = "3"
|
tempfile = "3"
|
||||||
|
Reference in New Issue
Block a user