mirror of
https://github.com/rustwasm/wasm-bindgen.git
synced 2024-12-15 04:23:12 +03:00
Merge pull request #1542 from fitzgen/update-walrus
Update dependencies and use new walrus custom sections APIs
This commit is contained in:
commit
0cbdea5fa9
@ -13,4 +13,4 @@ edition = '2018'
|
||||
|
||||
[dependencies]
|
||||
failure = "0.1"
|
||||
walrus = "0.6"
|
||||
walrus = "0.7.0"
|
||||
|
@ -18,7 +18,7 @@ log = "0.4"
|
||||
rustc-demangle = "0.1.13"
|
||||
serde_json = "1.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-shared = { path = "../shared", 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>>,
|
||||
) -> Result<Vec<decode::Program<'a>>, Error> {
|
||||
let my_version = wasm_bindgen_shared::version();
|
||||
let mut to_remove = Vec::new();
|
||||
assert!(program_storage.is_empty());
|
||||
|
||||
for (i, custom) in module.custom.iter_mut().enumerate() {
|
||||
if custom.name != "__wasm_bindgen_unstable" {
|
||||
continue;
|
||||
}
|
||||
to_remove.push(i);
|
||||
log::debug!("custom section {} looks like a wasm bindgen section", i);
|
||||
program_storage.push(mem::replace(&mut custom.value, Vec::new()));
|
||||
}
|
||||
|
||||
for i in to_remove.into_iter().rev() {
|
||||
module.custom.remove(i);
|
||||
while let Some(raw) = module.customs.remove_raw("__wasm_bindgen_unstable") {
|
||||
log::debug!(
|
||||
"custom section '{}' looks like a wasm bindgen section",
|
||||
raw.name
|
||||
);
|
||||
program_storage.push(raw.data);
|
||||
}
|
||||
|
||||
let mut ret = Vec::new();
|
||||
|
@ -24,7 +24,7 @@ rouille = { version = "3.0.0", default-features = false }
|
||||
serde = { version = "1.0", features = ['derive'] }
|
||||
serde_derive = "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-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
|
||||
// to read later on.
|
||||
let mut node = true;
|
||||
for custom in wasm.custom.iter() {
|
||||
if custom.name != "__wasm_bindgen_test_unstable" {
|
||||
for (_id, custom) in wasm.customs.iter() {
|
||||
if custom.name() != "__wasm_bindgen_test_unstable" {
|
||||
continue;
|
||||
}
|
||||
node = !custom.value.contains(&0x01);
|
||||
node = !custom.data().contains(&0x01);
|
||||
}
|
||||
let headless = env::var("NO_HEADLESS").is_err();
|
||||
let debug = env::var("WASM_BINDGEN_NO_DEBUG").is_err();
|
||||
|
@ -13,4 +13,4 @@ edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
failure = "0.1"
|
||||
walrus = "0.6"
|
||||
walrus = "0.7.0"
|
||||
|
@ -14,7 +14,7 @@ edition = '2018'
|
||||
[dependencies]
|
||||
failure = "0.1"
|
||||
log = "0.4"
|
||||
walrus = "0.6"
|
||||
walrus = "0.7.0"
|
||||
|
||||
[dev-dependencies]
|
||||
tempfile = "3"
|
||||
|
Loading…
Reference in New Issue
Block a user