mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-06-28 12:11:34 +00:00
Merge pull request #1063 from alexcrichton/wasm2es6js-start
wasm2es6js: Fix handling of start function
This commit is contained in:
@ -68,8 +68,10 @@ pub fn spawn(
|
||||
let output = Config::new()
|
||||
.fetch(Some(format!("/{}", wasm_name)))
|
||||
.generate(&wasm)?;
|
||||
let js = output.js()?;
|
||||
let (js, wasm) = output.js_and_wasm()?;
|
||||
let wasm = wasm.unwrap();
|
||||
fs::write(tmpdir.join(format!("{}_bg.js", module)), js).context("failed to write JS file")?;
|
||||
fs::write(tmpdir.join(format!("{}_bg.wasm", module)), wasm).context("failed to write wasm file")?;
|
||||
|
||||
// For now, always run forever on this port. We may update this later!
|
||||
let tmpdir = tmpdir.to_path_buf();
|
||||
|
Reference in New Issue
Block a user