Skip to content

Commit

Permalink
Update Rust example (#5053)
Browse files Browse the repository at this point in the history
  • Loading branch information
aquarhead authored Mar 4, 2024
1 parent 4194495 commit 31f78c8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
2 changes: 2 additions & 0 deletions templates/experimental/worker-rust/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/target
/node_modules
6 changes: 1 addition & 5 deletions templates/experimental/worker-rust/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,11 @@ name = "worker-rust"
version = "0.1.0"
edition = "2021"

# https://github.com/rustwasm/wasm-pack/issues/1247
[package.metadata.wasm-pack.profile.release]
wasm-opt = false

[lib]
crate-type = ["cdylib"]

[dependencies]
worker = "0.0.17"
worker = "0.0.18"

[profile.release]
lto = true
Expand Down
2 changes: 1 addition & 1 deletion templates/experimental/worker-rust/wrangler.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "worker-rust"
main = "build/worker/shim.mjs"
compatibility_date = "2023-06-28"
compatibility_date = "2023-12-01"

[build]
command = "cargo install -q worker-build && worker-build --release"

0 comments on commit 31f78c8

Please sign in to comment.