Skip to content

Commit 56abfc0

Browse files
Shalev GoodmanShalev Goodman
authored andcommitted
Changed orca_wasm to latest version of wirm with parallel feature turned on
1 parent 811dcf8 commit 56abfc0

File tree

8 files changed

+462
-75
lines changed

8 files changed

+462
-75
lines changed

Cargo.lock

Lines changed: 89 additions & 24 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,11 @@ too_many_arguments = 'allow'
1414
anyhow = { version = "1.0.95", default-features = false }
1515
heck = { version = "0.5", default-features = false }
1616
js-component-bindgen = { version = "1.11.0" }
17-
orca-wasm = { version = "0.9.2", default-features = false }
17+
#orca-wasm = { version = "0.9.2", default-features = false }
18+
wirm = { version = "2.1.0", features = ["parallel"] }
1819
rand = { version = "0.8", default-features = false }
1920
wasm-encoder = { version = "0.227.1", features = [ "component-model", "std" ] }
20-
wasmparser = { version = "0.227.1", features = ["features",
21+
wasmparser = { version = "0.239.0", features = ["features",
2122
"component-model",
2223
"hash-collections",
2324
"serde",

crates/spidermonkey-embedding-splicer/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ anyhow = { workspace = true }
1616
clap = { version = "4.5.31", features = ["suggestions", "color", "derive"] }
1717
heck = { workspace = true }
1818
js-component-bindgen = { workspace = true, features = [ "transpile-bindgen" ] }
19-
orca-wasm = { workspace = true }
19+
#orca-wasm = { workspace = true }
20+
wirm = { workspace = true }
2021
rand = { workspace = true }
2122
wasm-encoder = { workspace = true }
2223
wasmparser = { workspace = true }

crates/spidermonkey-embedding-splicer/src/bindgen.rs

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ use std::collections::{BTreeMap, BTreeSet, HashMap};
22
use std::fmt::Write;
33

44
use anyhow::Result;
5+
use std::time::Instant;
56
use heck::*;
67
use js_component_bindgen::function_bindgen::{
78
ErrHandling, FunctionBindgen, ResourceData, ResourceMap, ResourceTable,
@@ -141,6 +142,8 @@ pub fn componentize_bindgen(
141142
wid: WorldId,
142143
features: &Vec<Feature>,
143144
) -> Result<Componentization> {
145+
let t_total = Instant::now();
146+
let mut t_stage = Instant::now();
144147
let mut bindgen = JsBindgen {
145148
src: Source::default(),
146149
esm_bindgen: EsmBindgen::default(),
@@ -164,9 +167,19 @@ pub fn componentize_bindgen(
164167
.local_names
165168
.exclude_globals(Intrinsic::get_global_names());
166169

170+
t_stage = Instant::now();
167171
bindgen.imports_bindgen();
172+
eprintln!(
173+
"trace(bindgen:imports): {} ms",
174+
t_stage.elapsed().as_millis()
175+
);
168176

177+
t_stage = Instant::now();
169178
bindgen.exports_bindgen()?;
179+
eprintln!(
180+
"trace(bindgen:exports): {} ms",
181+
t_stage.elapsed().as_millis()
182+
);
170183
bindgen.esm_bindgen.populate_export_aliases();
171184

172185
// consolidate import specifiers and generate wrappers
@@ -374,18 +387,32 @@ pub fn componentize_bindgen(
374387
.concat(),
375388
);
376389

390+
t_stage = Instant::now();
377391
let js_intrinsics = render_intrinsics(&mut bindgen.all_intrinsics, false, true);
378392
output.push_str(&js_intrinsics);
379393
output.push_str(&bindgen.src);
394+
eprintln!(
395+
"trace(bindgen:intrinsics+emit): {} ms",
396+
t_stage.elapsed().as_millis()
397+
);
380398

381399
import_wrappers
382400
.iter()
383401
.for_each(|(_, src)| output.push_str(&format!("\n\n{src}")));
384402

403+
t_stage = Instant::now();
385404
bindgen
386405
.esm_bindgen
387406
.render_export_imports(&mut output, "$source_mod", &mut bindgen.local_names);
407+
eprintln!(
408+
"trace(bindgen:render-exports-imports): {} ms",
409+
t_stage.elapsed().as_millis()
410+
);
388411

412+
eprintln!(
413+
"trace(bindgen:total): {} ms",
414+
t_total.elapsed().as_millis()
415+
);
389416
Ok(Componentization {
390417
js_bindings: output.to_string(),
391418
exports: bindgen.exports,

0 commit comments

Comments
 (0)