mirror of
https://github.com/keymanapp/keyman.git
synced 2026-09-27 01:57:41 +00:00
chore(common): features by platform for cargo
This commit is contained in:
parent
adf25ce657
commit
04806d389e
2 changed files with 8 additions and 2 deletions
|
|
@ -209,7 +209,7 @@ build_test_rust() {
|
|||
|
||||
# Built library path for multi-arch (Windows) vs single (*nix)
|
||||
|
||||
cargo build --target-dir="$TARGET_PATH/rust/$TARGETBASE" $TARGET_FLAG $CARGO_TARGET
|
||||
cargo build --target-dir="$TARGET_PATH/rust/$TARGETBASE" $TARGET_FLAG $CARGO_TARGET --features=$PLATFORM
|
||||
|
||||
# On Windows, final output path is ./build/rust/<arch>/<arch_rust>/debug|release/<libraryname>
|
||||
# WASM is similar: ./build/rust/wasm/wasm_unknown_unknown/debug|release/<libraryname>
|
||||
|
|
|
|||
|
|
@ -4,12 +4,18 @@ version = "0.1.0"
|
|||
# This is required for 2018 support of Rust
|
||||
edition = "2018"
|
||||
|
||||
[features]
|
||||
# We only need to enable wasm dependencies for the
|
||||
# wasm target
|
||||
wasm = ["wasm-bindgen"]
|
||||
native = []
|
||||
|
||||
[lib]
|
||||
name = "rust_mock_processor"
|
||||
crate-type = ["staticlib", "cdylib"]
|
||||
|
||||
[dependencies]
|
||||
wasm-bindgen = "0.2.63"
|
||||
wasm-bindgen = { version = "0.2.63", optional = true }
|
||||
|
||||
[profile.release]
|
||||
# Tell `rustc` to optimize for small code size.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue