52 lines
1.3 KiB
TOML
52 lines
1.3 KiB
TOML
|
|
[package]
|
||
|
|
name = "pastel-wasm"
|
||
|
|
version = "0.1.0"
|
||
|
|
edition = "2021"
|
||
|
|
rust-version = "1.74"
|
||
|
|
authors = ["Valknar <valknar@pivoine.art>"]
|
||
|
|
description = "WebAssembly bindings for the pastel color library"
|
||
|
|
license = "MIT OR Apache-2.0"
|
||
|
|
repository = "https://dev.pivoine.art/valknar/pastel-wasm"
|
||
|
|
keywords = ["color", "wasm", "webassembly", "pastel", "browser"]
|
||
|
|
categories = ["wasm", "graphics", "web-programming"]
|
||
|
|
|
||
|
|
[lib]
|
||
|
|
crate-type = ["cdylib", "rlib"]
|
||
|
|
|
||
|
|
[dependencies]
|
||
|
|
# WebAssembly bindings
|
||
|
|
wasm-bindgen = "0.2"
|
||
|
|
serde = { version = "1.0", features = ["derive"] }
|
||
|
|
serde-wasm-bindgen = "0.6"
|
||
|
|
|
||
|
|
# Random number generation with WASM support
|
||
|
|
rand = "0.8"
|
||
|
|
getrandom = { version = "0.2", features = ["js"] }
|
||
|
|
rand_xoshiro = "0.6"
|
||
|
|
|
||
|
|
# JavaScript interop
|
||
|
|
js-sys = "0.3"
|
||
|
|
web-sys = { version = "0.3", features = ["console"] }
|
||
|
|
|
||
|
|
# Error handling
|
||
|
|
thiserror = "1.0"
|
||
|
|
|
||
|
|
# Optional: Better panic messages in the browser console
|
||
|
|
console_error_panic_hook = { version = "0.1", optional = true }
|
||
|
|
|
||
|
|
[dev-dependencies]
|
||
|
|
wasm-bindgen-test = "0.3"
|
||
|
|
|
||
|
|
[features]
|
||
|
|
default = ["console_error_panic_hook"]
|
||
|
|
|
||
|
|
[profile.release]
|
||
|
|
# Optimize for small code size
|
||
|
|
opt-level = "s"
|
||
|
|
lto = true
|
||
|
|
codegen-units = 1
|
||
|
|
strip = true
|
||
|
|
|
||
|
|
[package.metadata.wasm-pack.profile.release]
|
||
|
|
wasm-opt = ["-Os", "--enable-mutable-globals", "--enable-bulk-memory", "--enable-nontrapping-float-to-int"]
|