Skip to content

Commit

Permalink
Update rust code
Browse files Browse the repository at this point in the history
  • Loading branch information
printfn committed Dec 15, 2023
1 parent 3c39d99 commit df4e053
Show file tree
Hide file tree
Showing 5 changed files with 275 additions and 183 deletions.
197 changes: 36 additions & 161 deletions wasm/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 6 additions & 20 deletions wasm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,35 +11,21 @@ publish = false
[lib]
crate-type = ["cdylib", "rlib"]

[features]
default = ["console_error_panic_hook"]

[dependencies]
wasm-bindgen = "0.2"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0.91"
wasm-bindgen = "0.2.89"
serde = { version = "1.0.193", features = ["derive"] }
serde_json = "1.0.108"
lazy_static = "1.4.0"
unicode-rs = "0.1.2"

# The `console_error_panic_hook` crate provides better debugging of panics by
# logging them with `console.error`. This is great for development, but requires
# all the `std::fmt` and `std::panicking` infrastructure, so isn't great for
# code size when deploying.
console_error_panic_hook = { version = "0.1.1", optional = true }

# `wee_alloc` is a tiny allocator for wasm that is only ~1K in code size
# compared to the default allocator's ~10K. It is slower than the default
# allocator, however.
#
# Unfortunately, `wee_alloc` requires nightly Rust when targeting wasm for now.
wee_alloc = { version = "0.4.2", optional = true }

[dev-dependencies]
wasm-bindgen-test = "0.3"
console_error_panic_hook = { version = "0.1.7" }

[build-dependencies]
proc-macro2 = "1.0.50"
quote = "1.0.23"
proc-macro2 = "1.0.70"
quote = "1.0.33"

[profile.release]
# Tell `rustc` to optimize for small code size.
Expand Down
Loading

0 comments on commit df4e053

Please sign in to comment.