summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/release.yaml2
-rw-r--r--.github/workflows/test.yaml4
-rw-r--r--Cargo.lock28
-rw-r--r--Cargo.toml115
-rw-r--r--crates/cli/Cargo.toml83
-rw-r--r--crates/parser/Cargo.toml35
-rw-r--r--crates/tinywasm/Cargo.toml253
-rw-r--r--crates/types/Cargo.toml37
-rw-r--r--examples/doom/Cargo.toml38
-rw-r--r--examples/rust/Cargo.toml71
10 files changed, 342 insertions, 324 deletions
diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml
index 986f2eb..ae4bb2d 100644
--- a/.github/workflows/release.yaml
+++ b/.github/workflows/release.yaml
@@ -11,7 +11,7 @@ jobs:
id-token: write
contents: read
steps:
- - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: rust-lang/crates-io-auth-action@c6f97d42243bad5fab37ca0427f495c86d5b1a18 # v1.0.5
diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml
index 1566cac..e950c47 100644
--- a/.github/workflows/test.yaml
+++ b/.github/workflows/test.yaml
@@ -13,7 +13,7 @@ jobs:
name: Build wasm
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
submodules: true
persist-credentials: false
@@ -78,7 +78,7 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
+ uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
submodules: true
persist-credentials: false
diff --git a/Cargo.lock b/Cargo.lock
index 004bf84..43c750f 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -128,9 +128,9 @@ checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5"
[[package]]
name = "cc"
-version = "1.3.0"
+version = "1.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c89588d05638b5b4594a3348a2d6c20277e43a7f5c5202b05cc56888475a47b8"
+checksum = "5add81bb678e6cb321aff7fa0dc7689ad82b112dbc032cea19f91d6b8e3582b9"
dependencies = [
"find-msvc-tools",
"shlex",
@@ -193,9 +193,9 @@ dependencies = [
[[package]]
name = "clap_complete"
-version = "4.6.7"
+version = "4.6.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "db8b397918185f0161ff3d6fcaa9e4bfc09b8367caf6e1d4a2848e5477ed027b"
+checksum = "b1f84a88507dbd05c695f2cb5e8558e747179134005e9893882dec964190ed89"
dependencies = [
"clap",
]
@@ -306,9 +306,9 @@ checksum = "6184e33543162437515c2e2b48714794e37845ec9851711914eec9d308f6ebe8"
[[package]]
name = "either"
-version = "1.16.0"
+version = "1.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "91622ff5e7162018101f2fea40d6ebf4a78bbe5a49736a2020649edf9693679e"
+checksum = "9e5e8f6c15a24b9a3ee5efec809ccd006d3b30e8b3bb63c39af737c7f87daa1d"
[[package]]
name = "embedded-io"
@@ -972,9 +972,9 @@ dependencies = [
[[package]]
name = "wasm-encoder"
-version = "0.254.0"
+version = "0.255.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "09480d646178e5fdd12bb06e812d0af9a3a191dbc9cd697fdc86687beade7393"
+checksum = "9b524283fb5df62eec102ed0574838961bdd7ba5ac9c50d38e2756c51c971a42"
dependencies = [
"leb128fmt",
"wasmparser",
@@ -992,9 +992,9 @@ dependencies = [
[[package]]
name = "wasmparser"
-version = "0.254.0"
+version = "0.255.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d5769a29f799fbab136aaf65b4fe5384cd7d93fe6fc9ba0dcb6c8382a1f16e27"
+checksum = "e8e329ef4b5d46e73b91d3ac6924417cad55a8cbbf869c199283383427c3320b"
dependencies = [
"bitflags",
"indexmap",
@@ -1003,9 +1003,9 @@ dependencies = [
[[package]]
name = "wast"
-version = "254.0.0"
+version = "255.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e7ed4dfc8f6b9fc38b231065e2cdfbf7359af5ab945990abf09658dcc63c3e32"
+checksum = "55ffec530f199bd3d553ac442c13dd108353cad533cad8514bc41e1f1f0fe686"
dependencies = [
"bumpalo",
"leb128fmt",
@@ -1016,9 +1016,9 @@ dependencies = [
[[package]]
name = "wat"
-version = "1.254.0"
+version = "1.255.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7127f7f9b8f127c879991cecd35f494e4628bae1b0874c681414d8d8831e952c"
+checksum = "dda82c82e1486c7eed42a0465e544d80fff37abc3b39482e0d34dbaabe2fe5b1"
dependencies = [
"wast",
]
diff --git a/Cargo.toml b/Cargo.toml
index 6d472ae..b40544d 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,71 +1,74 @@
+[package]
+name = "tinywasm-root"
+version.workspace = true
+edition.workspace = true
+rust-version.workspace = true
+publish = false
+
[workspace]
-members=["crates/*"]
-default-members=[".", "crates/tinywasm", "crates/types", "crates/parser"]
-resolver="3"
+resolver = "3"
+members = ["crates/*"]
+default-members = [".", "crates/parser", "crates/tinywasm", "crates/types"]
+
+[workspace.package]
+version = "0.10.0"
+edition = "2024"
+rust-version = "1.95"
+repository = "https://github.com/explodingcamera/tinywasm"
+license = "MIT OR Apache-2.0"
+keywords = ["interpreter", "no-std", "tinywasm", "wasm", "webassembly"]
+categories = ["compilers", "embedded", "no-std", "virtualization", "wasm"]
[workspace.dependencies]
-tinywasm-parser={version="0.10.0", path="crates/parser", default-features=false}
-tinywasm-types={version="0.10.0", path="crates/types", default-features=false}
-tinywasm-cli={version="0.10.0", path="crates/cli", default-features=false}
-tinywasm={version="0.10.0", path="crates/tinywasm", default-features=false}
+tinywasm = { path = "crates/tinywasm", version = "0.10.0", default-features = false }
+tinywasm-cli = { path = "crates/cli", version = "0.10.0", default-features = false }
+tinywasm-parser = { path = "crates/parser", version = "0.10.0", default-features = false }
+tinywasm-types = { path = "crates/types", version = "0.10.0", default-features = false }
-criterion={version="0.8", default-features=false, features=["cargo_bench_support", "rayon"]}
-eyre="0.6"
-indexmap="2.14"
-log="0.4"
-owo-colors={version="4.3"}
-pretty_env_logger="0.5"
-serde_json={version="1.0"}
-serde={version="1.0", features=["derive"]}
-wasm-testsuite={version="0.7"}
-wasmparser={version="0.254", default-features=false}
-wast="254"
-wat="1.254"
+eyre = "0.6"
+indexmap = "2.14"
+log = "0.4"
+owo-colors = { version = "4.3" }
+pretty_env_logger = "0.5"
+serde = { version = "1.0", features = ["derive"] }
+serde_json = { version = "1.0" }
+wasm-testsuite = { version = "0.7" }
+wasmparser = { version = "0.255", default-features = false }
+wast = "255"
+wat = "1.255"
-[workspace.package]
-version="0.10.0"
-rust-version="1.95"
-edition="2024"
-license="MIT OR Apache-2.0"
-authors=["Henry Gressmann <crates@henrygressmann.de>"]
-repository="https://github.com/explodingcamera/tinywasm"
-categories=["wasm", "no-std", "compilers", "virtualization", "embedded"]
-keywords=["tinywasm", "wasm", "webassembly", "interpreter", "no-std"]
-
-[package]
-name="tinywasm-root"
-version.workspace=true
-publish=false
-edition.workspace=true
-rust-version.workspace=true
+criterion = { version = "0.8", default-features = false, features = [
+ "cargo_bench_support",
+ "rayon"
+] }
[[example]]
-name="wasm-rust"
-test=false
+name = "wasm-rust"
+test = false
[dev-dependencies]
-wat.workspace=true
-eyre.workspace=true
-pretty_env_logger.workspace=true
-tinywasm={path="crates/tinywasm"}
+eyre.workspace = true
+pretty_env_logger.workspace = true
+tinywasm = { path = "crates/tinywasm" }
+wat.workspace = true
[profile.bench]
-opt-level=3
-lto="thin"
-codegen-units=1
-debug=true
+opt-level = 3
+debug = true
+lto = "thin"
+codegen-units = 1
[profile.profiling]
-inherits="release"
-debug=true
-
-[profile.wasm]
-opt-level=3
-lto="thin"
-codegen-units=1
-panic="abort"
-inherits="release"
+inherits = "release"
+debug = true
[profile.samply]
-inherits="release"
-debug=true
+inherits = "release"
+debug = true
+
+[profile.wasm]
+inherits = "release"
+opt-level = 3
+lto = "thin"
+panic = "abort"
+codegen-units = 1
diff --git a/crates/cli/Cargo.toml b/crates/cli/Cargo.toml
index 1aed0cc..7dbd4d2 100644
--- a/crates/cli/Cargo.toml
+++ b/crates/cli/Cargo.toml
@@ -1,53 +1,52 @@
[package]
-name="tinywasm-cli"
-version.workspace=true
-description="Minimal command-line interface for TinyWasm"
-edition.workspace=true
-license.workspace=true
-authors.workspace=true
-repository.workspace=true
-documentation="https://docs.rs/tinywasm-cli"
-rust-version.workspace=true
-keywords=["tinywasm", "wasm", "webassembly", "cli", "runtime"]
-categories=["command-line-utilities", "wasm"]
-readme="README.md"
+name = "tinywasm-cli"
+version.workspace = true
+edition.workspace = true
+rust-version.workspace = true
+description = "Minimal command-line interface for TinyWasm"
+documentation = "https://docs.rs/tinywasm-cli"
+readme = "README.md"
+repository.workspace = true
+license.workspace = true
+keywords = ["cli", "runtime", "tinywasm", "wasm", "webassembly"]
+categories = ["command-line-utilities", "wasm"]
[lib]
-name="tinywasm_cli"
-path="src/lib.rs"
+name = "tinywasm_cli"
+path = "src/lib.rs"
[[bin]]
-name="tinywasm"
-path="src/bin.rs"
+name = "tinywasm"
+path = "src/bin.rs"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
-clap={version="4.6", features=["derive"]}
-clap_complete="4.6"
-eyre.workspace=true
-log.workspace=true
-pretty_env_logger.workspace=true
-tinywasm={workspace=true, features=[
- "std",
- "parser",
- "log",
- "archive",
- "canonicalize-nans",
- "debug",
- "parallel-parser",
-]}
-wat={workspace=true, optional=true}
-wast={workspace=true, optional=true}
-owo-colors={workspace=true}
-anstream={version="1.0"}
-
-[features]
-default=["wat", "wast"]
-wat=["dep:wat"]
-wast=["dep:wast"]
+anstream = { version = "1.0" }
+clap = { version = "4.6", features = ["derive"] }
+clap_complete = "4.6"
+eyre.workspace = true
+log.workspace = true
+owo-colors = { workspace = true }
+pretty_env_logger.workspace = true
+tinywasm = { workspace = true, features = [
+ "archive",
+ "canonicalize-nans",
+ "debug",
+ "log",
+ "parallel-parser",
+ "parser",
+ "std",
+] }
+wast = { workspace = true, optional = true }
+wat = { workspace = true, optional = true }
[dev-dependencies]
-assert_cmd="2.2"
-predicates="3.1"
-tempfile="3.27"
+assert_cmd = "2.2"
+predicates = "3.1"
+tempfile = "3.27"
+
+[features]
+default = ["wast", "wat"]
+wast = ["dep:wast"]
+wat = ["dep:wat"]
diff --git a/crates/parser/Cargo.toml b/crates/parser/Cargo.toml
index 417253d..3e71403 100644
--- a/crates/parser/Cargo.toml
+++ b/crates/parser/Cargo.toml
@@ -1,23 +1,22 @@
[package]
-name="tinywasm-parser"
-version.workspace=true
-description="Parser and lowering pipeline for TinyWasm"
-edition.workspace=true
-license.workspace=true
-authors.workspace=true
-repository.workspace=true
-rust-version.workspace=true
-keywords.workspace=true
-categories.workspace=true
-readme="README.md"
+name = "tinywasm-parser"
+version.workspace = true
+edition.workspace = true
+rust-version.workspace = true
+description = "Parser and lowering pipeline for TinyWasm"
+readme = "README.md"
+repository.workspace = true
+license.workspace = true
+keywords.workspace = true
+categories.workspace = true
[dependencies]
-wasmparser={workspace=true, features=["validate", "features", "simd"]}
-log={workspace=true, optional=true}
-tinywasm-types={workspace=true}
+log = { workspace = true, optional = true }
+tinywasm-types = { workspace = true }
+wasmparser = { workspace = true, features = ["features", "simd", "validate"] }
[features]
-default=["std", "log", "parallel"]
-log=["dep:log"]
-std=["tinywasm-types/std", "wasmparser/std"]
-parallel=["std"]
+default = ["log", "parallel", "std"]
+log = ["dep:log"]
+parallel = ["std"]
+std = ["tinywasm-types/std", "wasmparser/std"]
diff --git a/crates/tinywasm/Cargo.toml b/crates/tinywasm/Cargo.toml
index fd33d1a..aecebeb 100644
--- a/crates/tinywasm/Cargo.toml
+++ b/crates/tinywasm/Cargo.toml
@@ -1,175 +1,190 @@
[package]
-name="tinywasm"
-version.workspace=true
-description="A tiny WebAssembly interpreter"
-edition.workspace=true
-license.workspace=true
-authors.workspace=true
-repository.workspace=true
-rust-version.workspace=true
-keywords.workspace=true
-categories.workspace=true
-readme="../../README.md"
-
-[lib]
-name="tinywasm"
-path="src/lib.rs"
+name = "tinywasm"
+version.workspace = true
+edition.workspace = true
+rust-version.workspace = true
+description = "A tiny WebAssembly interpreter"
+readme = "../../README.md"
+repository.workspace = true
+license.workspace = true
+keywords.workspace = true
+categories.workspace = true
[package.metadata.docs.rs]
-features=["std", "parser", "archive", "log", "canonicalize-nans", "debug", "guest-debug"]
-rustdoc-args=["--cfg", "docsrs"]
-
-[dependencies]
-log={workspace=true, optional=true}
-tinywasm-parser={workspace=true, optional=true}
-tinywasm-types={workspace=true}
-libm={version="0.2", default-features=false}
-
-[dev-dependencies]
-wasm-testsuite.workspace=true
-tinywasm-cli={path="../cli", features=["wast", "wat"]}
-wat.workspace=true
-eyre.workspace=true
-criterion.workspace=true
-owo-colors.workspace=true
-serde_json.workspace=true
-serde.workspace=true
+features = [
+ "std",
+ "parser",
+ "archive",
+ "log",
+ "canonicalize-nans",
+ "debug",
+ "guest-debug"
+]
+rustdoc-args = ["--cfg", "docsrs"]
-[features]
-default=["std", "parser", "log", "archive", "canonicalize-nans", "debug", "parallel-parser"]
-
-log=["dep:log", "tinywasm-parser?/log", "tinywasm-types/log"]
-std=["tinywasm-parser?/std", "tinywasm-types/std"]
-
-# support for parsing WebAssembly
-parser=["dep:tinywasm-parser"]
+[lib]
+name = "tinywasm"
+path = "src/lib.rs"
-# parallelize function parsing/validation across threads (requires std)
-parallel-parser=["parser", "tinywasm-parser?/parallel"]
+[[test]]
+harness = false
+name = "test-wasm-1"
-# support for "archiving" tinywasm bytecode
-archive=["tinywasm-types/archive"]
+[[test]]
+harness = false
+name = "test-wasm-3"
+test = false
-# canonicalize all NaN values to a single representation
-canonicalize-nans=[]
+[[test]]
+harness = false
+name = "test-wasm-2"
-# derive Debug for runtime/types structs
-debug=["tinywasm-types/debug"]
+[[test]]
+harness = false
+name = "test-wasm-latest"
+test = false
-# expose module-internal by-index inspection APIs for non-exported entities (for testing and debugging)
-guest-debug=[]
+[[test]]
+harness = false
+name = "test-wasm-multi-memory"
-# enable x86-specific SIMD intrinsics in Value128 (uses unsafe code)
-# note: for x86 backend selection, compile with x86-64-v3 target features
-# (for example: `RUSTFLAGS="-C target-cpu=x86-64-v3"`)
-simd-x86=[]
+[[test]]
+harness = false
+name = "test-wasm-threads"
+test = false
[[test]]
-name="test-wasm-1"
-harness=false
+harness = false
+name = "test-wasm-annotations"
[[test]]
-name="test-wasm-2"
-harness=false
+harness = false
+name = "test-wast"
+test = false
[[test]]
-name="test-wasm-multi-memory"
-harness=false
+harness = false
+name = "test-wasm-custom-page-sizes"
[[test]]
-name="test-wasm-annotations"
-harness=false
+harness = false
+name = "test-wasm-function-references"
+test = false
[[test]]
-name="test-wasm-custom-page-sizes"
-harness=false
+harness = false
+name = "test-wasm-custom"
[[test]]
-name="test-wasm-custom"
-harness=false
+harness = false
+name = "test-wasm-gc"
+test = false
[[test]]
-name="test-wasm-tail-call"
-harness=false
+harness = false
+name = "test-wasm-tail-call"
[[test]]
-name="test-wasm-memory64"
-harness=false
+harness = false
+name = "test-wasm-memory64"
[[test]]
-name="test-wasm-extended-const"
-harness=false
+harness = false
+name = "test-wasm-extended-const"
[[test]]
-name="test-wasm-relaxed-simd"
-harness=false
+harness = false
+name = "test-wasm-relaxed-simd"
[[test]]
-name="test-wasm-simd"
-harness=false
+harness = false
+name = "test-wasm-simd"
[[test]]
-name="test-wasm-wide-arithmetic"
-harness=false
+harness = false
+name = "test-wasm-wide-arithmetic"
[[test]]
-name="test-wasm-sign-extension-op"
-harness=false
+harness = false
+name = "test-wasm-sign-extension-op"
[[test]]
-name="test-wasm-nontrapping-float-to-int-conversions"
-harness=false
+harness = false
+name = "test-wasm-nontrapping-float-to-int-conversions"
[[test]]
-name="test-wasm-reference-types"
-harness=false
+harness = false
+name = "test-wasm-reference-types"
[[bench]]
-name="argon2id"
-harness=false
+harness = false
+name = "argon2id"
[[bench]]
-name="fibonacci"
-harness=false
+harness = false
+name = "fibonacci"
[[bench]]
-name="tinywasm"
-harness=false
+harness = false
+name = "tinywasm"
[[bench]]
-name="tinywasm_modes"
-harness=false
+harness = false
+name = "tinywasm_modes"
[[bench]]
-name="memory_backends"
-harness=false
+harness = false
+name = "memory_backends"
-[[test]]
-name="test-wasm-3"
-harness=false
-test=false
+[dependencies]
+libm = { version = "0.2", default-features = false }
+log = { workspace = true, optional = true }
+tinywasm-parser = { workspace = true, optional = true }
+tinywasm-types = { workspace = true }
-[[test]]
-name="test-wasm-latest"
-harness=false
-test=false
+[dev-dependencies]
+criterion.workspace = true
+eyre.workspace = true
+owo-colors.workspace = true
+serde.workspace = true
+serde_json.workspace = true
+tinywasm-cli = { path = "../cli", features = ["wast", "wat"] }
+wasm-testsuite.workspace = true
+wat.workspace = true
-[[test]]
-name="test-wasm-threads"
-harness=false
-test=false
+[features]
+default = [
+ "archive",
+ "canonicalize-nans",
+ "debug",
+ "log",
+ "parallel-parser",
+ "parser",
+ "std"
+]
-[[test]]
-name="test-wast"
-harness=false
-test=false
+log = ["dep:log", "tinywasm-parser?/log", "tinywasm-types/log"]
+std = ["tinywasm-parser?/std", "tinywasm-types/std"]
-[[test]]
-name="test-wasm-function-references"
-harness=false
-test=false
+# support for parsing WebAssembly
+parser = ["dep:tinywasm-parser"]
-[[test]]
-name="test-wasm-gc"
-harness=false
-test=false
+# parallelize function parsing/validation across threads (requires std)
+parallel-parser = ["parser", "tinywasm-parser?/parallel"]
+
+# support for "archiving" tinywasm bytecode
+archive = ["tinywasm-types/archive"]
+
+# canonicalize all NaN values to a single representation
+canonicalize-nans = []
+
+# derive Debug for runtime/types structs
+debug = ["tinywasm-types/debug"]
+
+# expose module-internal by-index inspection APIs for non-exported entities (for testing and debugging)
+guest-debug = []
+
+# enable x86-specific SIMD intrinsics in Value128 (uses unsafe code)
+# note: for x86 backend selection, compile with x86-64-v3 target features
+# (for example: `RUSTFLAGS="-C target-cpu=x86-64-v3"`)
+simd-x86 = []
diff --git a/crates/types/Cargo.toml b/crates/types/Cargo.toml
index 9f2dc8c..3587143 100644
--- a/crates/types/Cargo.toml
+++ b/crates/types/Cargo.toml
@@ -1,25 +1,24 @@
[package]
-name="tinywasm-types"
-version.workspace=true
-description="Shared runtime, module, and archive types for TinyWasm"
-edition.workspace=true
-license.workspace=true
-authors.workspace=true
-repository.workspace=true
-rust-version.workspace=true
-keywords.workspace=true
-categories.workspace=true
-readme="README.md"
+name = "tinywasm-types"
+version.workspace = true
+edition.workspace = true
+rust-version.workspace = true
+description = "Shared runtime, module, and archive types for TinyWasm"
+readme = "README.md"
+repository.workspace = true
+license.workspace = true
+keywords.workspace = true
+categories.workspace = true
[dependencies]
-log={workspace=true, optional=true}
-postcard={version="1.1", optional=true, default-features=false, features=["alloc"]}
-serde={version="1.0", optional=true, default-features=false, features=["alloc", "rc"]}
+log = { workspace = true, optional = true }
+postcard = { version = "1.1", default-features = false, features = ["alloc"], optional = true }
+serde = { version = "1.0", default-features = false, features = ["alloc", "rc"], optional = true }
[features]
-default=["std", "log", "archive", "debug"]
+default = ["archive", "debug", "log", "std"]
-std=["serde?/std"]
-archive=["dep:postcard", "dep:serde"]
-log=["dep:log"]
-debug=[]
+archive = ["dep:postcard", "dep:serde"]
+debug = []
+log = ["dep:log"]
+std = ["serde?/std"]
diff --git a/examples/doom/Cargo.toml b/examples/doom/Cargo.toml
index 62710de..38e16c4 100644
--- a/examples/doom/Cargo.toml
+++ b/examples/doom/Cargo.toml
@@ -1,23 +1,23 @@
+[package]
+name = "tinywasm-doom"
+edition = "2024"
+publish = false
+
# treat this as an independent package
[workspace]
-[package]
-name="tinywasm-doom"
-publish=false
-edition="2024"
-
[dependencies]
-eyre="0.6"
-pretty_env_logger="0.5"
-tinywasm={features=[
- "std",
- "parser",
- "log",
- "archive",
- "canonicalize-nans",
- "debug",
- "parallel-parser",
-], path="../../crates/tinywasm"}
-log="0.4"
-softbuffer="0.4"
-winit="0.30"
+eyre = "0.6"
+log = "0.4"
+pretty_env_logger = "0.5"
+softbuffer = "0.4"
+tinywasm = { path = "../../crates/tinywasm", features = [
+ "archive",
+ "canonicalize-nans",
+ "debug",
+ "log",
+ "parallel-parser",
+ "parser",
+ "std",
+] }
+winit = "0.30"
diff --git a/examples/rust/Cargo.toml b/examples/rust/Cargo.toml
index 97f9674..efce27a 100644
--- a/examples/rust/Cargo.toml
+++ b/examples/rust/Cargo.toml
@@ -1,52 +1,55 @@
-# treat this as an independent package
-[workspace]
-
[package]
-publish=false
-name="rust-wasm-examples"
-edition="2021"
+name = "rust-wasm-examples"
+edition = "2021"
+publish = false
-[dependencies]
-tinywasm={path="../../crates/tinywasm", default-features=false, features=["parser", "archive"]}
-argon2={version="0.5"}
-dlmalloc={version="0.2", features=["global"]}
-
-[features]
-default=["std"]
-std=["tinywasm/std"]
+# treat this as an independent package
+[workspace]
[[bin]]
-name="hello"
-path="src/hello.rs"
+name = "hello"
+path = "src/hello.rs"
[[bin]]
-name="host_fn"
-path="src/host_fn.rs"
+name = "host_fn"
+path = "src/host_fn.rs"
[[bin]]
-name="print"
-path="src/print.rs"
+name = "print"
+path = "src/print.rs"
[[bin]]
-name="tinywasm"
-path="src/tinywasm.rs"
+name = "tinywasm"
+path = "src/tinywasm.rs"
[[bin]]
-name="tinywasm_no_std"
-path="src/tinywasm_no_std.rs"
+name = "tinywasm_no_std"
+path = "src/tinywasm_no_std.rs"
[[bin]]
-name="fibonacci"
-path="src/fibonacci.rs"
+name = "fibonacci"
+path = "src/fibonacci.rs"
[[bin]]
-name="argon2id"
-path="src/argon2id.rs"
+name = "argon2id"
+path = "src/argon2id.rs"
+
+[dependencies]
+argon2 = { version = "0.5" }
+dlmalloc = { version = "0.2", features = ["global"] }
+tinywasm = { path = "../../crates/tinywasm", default-features = false, features = [
+ "archive",
+ "parser"
+] }
+
+[features]
+default = ["std"]
+std = ["tinywasm/std"]
[profile.wasm]
-opt-level=3
-lto="fat"
-codegen-units=1
-panic="abort"
-inherits="release"
-strip=true
+inherits = "release"
+opt-level = 3
+strip = true
+lto = "fat"
+panic = "abort"
+codegen-units = 1