Skip to content

Commit

Permalink
feat: allow building dogma-engine without "wasm" support (#51)
Browse files Browse the repository at this point in the history
  • Loading branch information
TrueBrain authored Jul 18, 2024
1 parent 75ee430 commit c6cc950
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
12 changes: 9 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,19 @@ license = "MIT"
crate-type = ["cdylib", "rlib"]

[dependencies]
console_error_panic_hook = "0.1"
serde = { version = "1.0", features = ["derive"] }
serde_repr = "0.1"
serde-wasm-bindgen = "0.4"
strum = "0.25"
strum_macros = "0.25"
wasm-bindgen = "0.2"

# WASM dependencies
console_error_panic_hook = { version = "0.1", optional = true }
serde-wasm-bindgen = { version = "0.4", optional = true }
wasm-bindgen = { version = "0.2", optional = true }

[profile.release]
opt-level = "s"

[features]
default = ["wasm"]
wasm = ["dep:console_error_panic_hook", "dep:serde-wasm-bindgen", "dep:wasm-bindgen"]
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
mod calculate;
mod data_types;
mod info;
#[cfg(feature = "wasm")]
mod wasm;

0 comments on commit c6cc950

Please sign in to comment.