mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 14:24:45 +00:00
Wasm: Serialize WasmModule without linking info
This commit is contained in:
parent
b8ab6af203
commit
5a39002e8b
6 changed files with 75 additions and 5 deletions
|
@ -40,9 +40,9 @@ pub fn build_module<'a>(
|
|||
interns: &'a mut Interns,
|
||||
procedures: MutMap<(Symbol, ProcLayout<'a>), Proc<'a>>,
|
||||
) -> Result<std::vec::Vec<u8>, String> {
|
||||
let (mut wasm_module, _) = build_module_help(env, interns, procedures)?;
|
||||
let (wasm_module, _) = build_module_help(env, interns, procedures)?;
|
||||
let mut buffer = std::vec::Vec::with_capacity(4096);
|
||||
wasm_module.serialize_mut(&mut buffer);
|
||||
wasm_module.serialize(&mut buffer);
|
||||
Ok(buffer)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue