Compile wasm module successfully
This commit is contained in:
parent
c20d2f3085
commit
3b1d67f7d7
19
Cargo.lock
generated
19
Cargo.lock
generated
@ -26,7 +26,6 @@ dependencies = [
|
||||
"num-bigint",
|
||||
"num-integer",
|
||||
"num-traits",
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -85,15 +84,6 @@ dependencies = [
|
||||
"memchr",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "float_extras"
|
||||
version = "0.1.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b22b70f8649ea2315955f1a36d964b0e4da482dfaa5f0d04df0d1fb7c338ab7a"
|
||||
dependencies = [
|
||||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "itoa"
|
||||
version = "0.4.8"
|
||||
@ -106,12 +96,6 @@ version = "1.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
|
||||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
version = "0.2.139"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "201de327520df007757c1f0adce6e827fe8562fbc28bfd9c15571c66ca1f5f79"
|
||||
|
||||
[[package]]
|
||||
name = "libm"
|
||||
version = "0.2.6"
|
||||
@ -260,10 +244,8 @@ checksum = "cc7fbc04bb52c40b5f48c9bb2d2961375301916e0c25d9f373750654d588cd5c"
|
||||
dependencies = [
|
||||
"bigdecimal",
|
||||
"cgmath",
|
||||
"float_extras",
|
||||
"lazy_static",
|
||||
"libm",
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -318,6 +300,7 @@ dependencies = [
|
||||
name = "this_algorithm-wasm"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"this_algorithm",
|
||||
"wasm-bindgen",
|
||||
]
|
||||
|
||||
|
@ -13,7 +13,7 @@ members = [
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
s2 = "0.0.12"
|
||||
s2 = {version="0.0.12", default-features=false}
|
||||
thiserror = "1.0.38"
|
||||
words = {path="./words"}
|
||||
|
||||
|
@ -10,4 +10,4 @@ crate-type = ["cdylib"]
|
||||
|
||||
[dependencies]
|
||||
wasm-bindgen = "0.2"
|
||||
# this_algorithm = {path=".."}
|
||||
this_algorithm = {path=".."}
|
||||
|
15
this_algorithm-wasm/index.html
Normal file
15
this_algorithm-wasm/index.html
Normal file
@ -0,0 +1,15 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en-US">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>hello-wasm example</title>
|
||||
</head>
|
||||
<body>
|
||||
<script type="module">
|
||||
import init, { greet } from "./pkg/this_algorithm_wasm.js";
|
||||
init().then(() => {
|
||||
greet("WebAssembly");
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue
Block a user