From dfca4be659c6d981269acd2432a2394abe6507a5 Mon Sep 17 00:00:00 2001 From: Adam Perry Date: Mon, 28 Dec 2020 19:37:12 -0800 Subject: [PATCH] [cargo] Use parking_lot/wasm-bindgen feature through our own feature. --- CHANGELOG.md | 1 + Cargo.toml | 10 +++++++--- dom/Cargo.toml | 11 +++++++++-- dyn-cache/CHANGELOG.md | 6 ++++++ dyn-cache/Cargo.toml | 8 ++++++-- mox/Cargo.toml | 2 +- topo/CHANGELOG.md | 8 +++++++- topo/Cargo.toml | 10 +++++++--- 8 files changed, 44 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c0ae80865..ffdff5499 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ reuse of arbitrary work, state change notifications, and async loaders. - `Key::mutate` allows naive clone-update-compare access to a state variable. - `#[moxie::updater(...)]` attribute macro supports creating a `Key` wrapper with shorthand for mutating methods. +- `wasm-bindgen` cargo feature which enables correct usage of parking_lot on wasm32 targets. ## [0.7.0] - 2020-09-27 diff --git a/Cargo.toml b/Cargo.toml index 11d4cb2b4..168f741f4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,14 +15,18 @@ repository = "https://github.com/anp/moxie.git" authors = ["Adam Perry "] edition = "2018" +[features] +default = [] +wasm-bindgen = [ "dyn-cache/wasm-bindgen", "parking_lot/wasm-bindgen", "topo/wasm-bindgen" ] + [dependencies] -dyn-cache = { path = "dyn-cache", version = "0.12.0"} +dyn-cache = { path = "dyn-cache", version = "0.12.1"} futures = "0.3.5" illicit = { path = "illicit", version = "1.1.1"} moxie-macros = { path = "macros", version = "0.1.0-pre" } -parking_lot = { version = "0.11", features = ["wasm-bindgen"]} +parking_lot = "0.11" scopeguard = "1" -topo = { path = "topo", version = "0.13.0"} +topo = { path = "topo", version = "0.13.1"} tracing = "^0.1" [dev-dependencies] diff --git a/dom/Cargo.toml b/dom/Cargo.toml index 4eb0d7d9c..6c024b51b 100644 --- a/dom/Cargo.toml +++ b/dom/Cargo.toml @@ -23,7 +23,14 @@ crate-type = [ "cdylib", "rlib", ] [features] default = ["webdom"] rsdom = ["augdom/rsdom"] -webdom = ["augdom/webdom", "raf", "wasm-bindgen", "wasm-bindgen-futures"] +webdom = [ + "augdom/webdom", + "moxie/wasm-bindgen", + "raf", + "topo/wasm-bindgen", + "wasm-bindgen", + "wasm-bindgen-futures", +] [dependencies] augdom = { path = "augdom", version = "0.2.0-pre", default-features = false } @@ -32,7 +39,7 @@ illicit = { path = "../illicit", version = "1.1.1"} moxie = { path = "../", version = "0.7.1-pre"} paste = "1.0.0" scopeguard = "1" -topo = { path = "../topo", version = "0.13.0"} +topo = { path = "../topo", version = "0.13.1"} # web-only raf = { path = "raf", version = "0.2.0-pre", optional = true } diff --git a/dyn-cache/CHANGELOG.md b/dyn-cache/CHANGELOG.md index 5913f0d43..1c835b6d0 100644 --- a/dyn-cache/CHANGELOG.md +++ b/dyn-cache/CHANGELOG.md @@ -5,6 +5,12 @@ invocations. +## [0.12.1] - 2020-12-28 + +### Added + +- `wasm-bindgen` cargo feature which enables correct usage of parking_lot on wasm32 targets. + ## [0.12.0] - 2020-08-09 ### Changed diff --git a/dyn-cache/Cargo.toml b/dyn-cache/Cargo.toml index 928dd7bab..0201b29f0 100644 --- a/dyn-cache/Cargo.toml +++ b/dyn-cache/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "dyn-cache" -version = "0.12.0" +version = "0.12.1" description = "Query cache indexed by type." categories = ["caching", "rust-patterns"] keywords = ["incremental", "memoize", "intern", "cache"] @@ -13,12 +13,16 @@ repository = "https://github.com/anp/moxie.git" authors = ["Adam Perry "] edition = "2018" +[features] +default = [] +wasm-bindgen = [ "parking_lot/wasm-bindgen" ] + [dependencies] downcast-rs = "1.1.1" hash_hasher = "2.0.3" hashbrown = "0.9.0" illicit = { path = "../illicit", version = "1.1.1"} -parking_lot = { version = "0.11.0", features = ["wasm-bindgen"]} +parking_lot = "0.11.0" paste = "1.0.0" [dev-dependencies] diff --git a/mox/Cargo.toml b/mox/Cargo.toml index 34f4941e5..6e016b341 100644 --- a/mox/Cargo.toml +++ b/mox/Cargo.toml @@ -17,7 +17,7 @@ edition = "2018" mox-impl = { path = "impl", version = "0.10.0"} proc-macro-hack = "0.5" proc-macro-nested = "0.1.3" -topo = { path = "../topo", version = "0.13.0"} +topo = { path = "../topo", version = "0.13.1"} [dev-dependencies] derive_builder = "0.9" diff --git a/topo/CHANGELOG.md b/topo/CHANGELOG.md index 9bb0b2f12..801eabf8b 100644 --- a/topo/CHANGELOG.md +++ b/topo/CHANGELOG.md @@ -6,6 +6,12 @@ to implement a form of [incremental computing](https://en.wikipedia.org/wiki/Inc +## [0.13.1] - 2020-12-28 + +### Added + +- `wasm-bindgen` cargo feature which enables correct usage of parking_lot on wasm32 targets. + ## [0.13.0] - 2020-07-19 ### Removed @@ -47,7 +53,7 @@ to implement a form of [incremental computing](https://en.wikipedia.org/wiki/Inc - #[nested] allows specifying a `slot`. - `cache::{Cache, GlobalCache}` types for storing interned and memoized values. -- `cache::{SharedCache, SharedGlobalCache}` types for safe multiple-owner access to caches, +- `cache::{SharedCache, SharedGlobalCache}` types for safe multiple-owner access to caches, implementing `cache_with` with careful locking to allow nested calls in the future. - `root` free function for allowing one to re-root a call topology (i.e. if running inside of a broader one). diff --git a/topo/Cargo.toml b/topo/Cargo.toml index 0595821ba..e84306698 100644 --- a/topo/Cargo.toml +++ b/topo/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "topo" -version = "0.13.0" +version = "0.13.1" description = "Tools for incrementally computing repeated callgraphs." categories = ["caching", "data-structures", "gui", "memory-management", "rust-patterns"] keywords = ["cache", "memoize", "intern", "topology", "incremental"] @@ -13,11 +13,15 @@ repository = "https://github.com/anp/moxie.git" authors = ["Adam Perry "] edition = "2018" +[features] +default = [] +wasm-bindgen = [ "dyn-cache/wasm-bindgen", "parking_lot/wasm-bindgen" ] + [dependencies] -dyn-cache = { path = "../dyn-cache", version = "0.12.0"} +dyn-cache = { path = "../dyn-cache", version = "0.12.1"} illicit = { path = "../illicit", version = "1.1.1"} once_cell = "1.4.0" -parking_lot = { version = "0.11.0", features = ["wasm-bindgen"]} +parking_lot = "0.11.0" topo-macro = { path = "macro", version = "0.10.0"} [dev-dependencies]