History

feat: add `wasm` feature toggle to allow compilation to wasm32-unknown-unknown

Sebastian Thiel committed 3 years ago

Commit f0e40ec1 parent 0d4b8045 files · +13 −0Browse files

Showing the changes to git-diff (1 of 5 files). Show all

Unified · Split

git-diff/Cargo.toml+4−0
@@ -11,7 +11,10 @@ rust-version = "1.64" · 10 unmodified lines
1111 autotests = false
1212
1313 [features]
14+## Data structures implement `serde::Serialize` and `serde::Deserialize`.
1415 serde1 = ["serde", "git-hash/serde1", "git-object/serde1"]
16+## Make it possible to compile to the `wasm32-unknown-unknown` target.
17+wasm = ["dep:getrandom"]
1518
1619 [lib]
1720 doctest = false
@@ -22,3 +25,4 @@ git-object = { version = "^0.26.1", path = "../git-object" } · 4 unmodified lines
2225 thiserror = "1.0.32"
2326 imara-diff = "0.1.3"
2427 serde = { version = "1.0.114", optional = true, default-features = false, features = ["derive"]}
28+getrandom = { version = "0.2.8", optional = true, default-features = false, features = ["js"] }