Skip to content

Commit

Permalink
chore: add wasm-pack and additional dependencies in Cargo.toml
Browse files Browse the repository at this point in the history
Added wasm-pack configuration and necessary dependencies to enhance the packaging of rust code to WebAssembly. This change was made due to rustwasm/wasm-pack#1247. Additionally, included 'worker' as a new dependency and adjusted the release profile to optimize for size and performance.
  • Loading branch information
nekofar committed Sep 19, 2023
1 parent 3400976 commit a33e1bc
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ include = ["*.graphql"]

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

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

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

[dependencies]
graphql_client = { version = "0.13.0", features = ["reqwest"] }
serde = { version = "1.0.188", features = ["derive"] }
Expand All @@ -22,3 +29,8 @@ serenity = { version = "0.11.6", default-features = false, features = ["rustls_b
rocksdb = { version = "0.21.0", default-features = false, features = ["lz4"] }
html2md = "0.2.14"
chrono = "0.4.31"
worker = "0.0.18"
[profile.release]
lto = true
strip = true
codegen-units = 1

0 comments on commit a33e1bc

Please sign in to comment.