add deno wasm

This commit is contained in:
2020-05-21 00:54:05 +08:00
parent 6e11724316
commit c205ccd1b2
4 changed files with 8 additions and 2 deletions

1
.gitignore vendored
View File

@@ -4,6 +4,7 @@
.AppleDouble .AppleDouble
.LSOverride .LSOverride
target/
# Icon must end with two \r # Icon must end with two \r
Icon Icon

View File

@@ -1,4 +1,4 @@
const wasmCode = await Deno.readFile("./target/wasm32-unknown-unknown/debug/wasm_deno_example.wasm"); const wasmCode = await Deno.readFile("./wasm_sample/target/wasm32-unknown-unknown/debug/wasm_sample.wasm");
const wasmModule = new WebAssembly.Module(wasmCode); const wasmModule = new WebAssembly.Module(wasmCode);
const wasmInstance = new WebAssembly.Instance(wasmModule); const wasmInstance = new WebAssembly.Instance(wasmModule);
const { const {

View File

@@ -1,5 +1,6 @@
# This file is automatically @generated by Cargo. # This file is automatically @generated by Cargo.
# It is not intended for manual editing. # It is not intended for manual editing.
[[package]] [[package]]
name = "warsam_sample" name = "wasm_sample"
version = "0.1.0" version = "0.1.0"

View File

@@ -10,3 +10,7 @@ edition = "2018"
crate-type =["cdylib"] crate-type =["cdylib"]
[dependencies] [dependencies]
[profile.release]
lto = true
opt-level = 'z'