Cleans up the WASM environment handling.

Instead of passing the entire script resolver as a pointer to the WebAssemblyEnv, we now have split off the data actually relevant to the environment into it's own class, which is stored inside of an Arc.
This commit is contained in:
2022-07-18 13:18:11 +02:00
parent 9472c1cec2
commit 0961b199ff
9 changed files with 178 additions and 121 deletions

View File

@@ -281,6 +281,7 @@ fn load_wasm(path: &String, library: &mut WebAssemblyScriptResolver) {
let mut buffer = Vec::new();
reader.read_to_end(&mut buffer).unwrap();
library.load_wasm_from_bytes(&buffer);
library.finalize();
}
fn parse_form(name: StringKey, value: &Value, library: &mut StaticData) -> Form {