Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/bench.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
ref: ${{ github.base_ref }}

- name: Run cargo bench on base
run: cargo bench
run: cd packages/tools/bench && cargo bench

- name: Checkout repository head
uses: actions/checkout@v2
Expand All @@ -29,7 +29,7 @@ jobs:
clean: false # Do not remove benchmark results from base branch

- name: Run cargo bench on head
run: cargo bench
run: cd packages/tools/bench && cargo bench

- name: Upload benchmark report
uses: actions/upload-artifact@v2
Expand Down
2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[workspace]
resolver = "2"
members = [
# Packages
"packages/sycamore",
Expand Down Expand Up @@ -34,5 +35,6 @@ members = [
"website",

# Tools
"packages/tools/bench",
"packages/tools/bench-diff",
]
4 changes: 2 additions & 2 deletions docs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ version = "0.1.0"

[dependencies]
pulldown-cmark = "0.9.2"
serde = { version = "1.0.136", features = ["derive"] }
serde_json = "1.0.79"
serde = { version = "1.0.147", features = ["derive"] }
serde_json = "1.0.89"
syntect = "5.0.0"
walkdir = "2.3.2"
2 changes: 1 addition & 1 deletion examples/hello-builder/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ edition = "2021"
[dependencies]
console_error_panic_hook = "0.1.7"
console_log = "0.2.0"
log = "0.4.14"
log = "0.4.17"
sycamore = { path = "../../packages/sycamore" }
6 changes: 3 additions & 3 deletions examples/http-request-builder/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ edition = "2021"
[dependencies]
console_error_panic_hook = "0.1.7"
console_log = "0.2.0"
log = "0.4.14"
reqwasm = "0.4.1"
serde = "1.0.136"
log = "0.4.17"
reqwasm = "0.5.0"
serde = "1.0.147"
sycamore = { path = "../../packages/sycamore", features = ["suspense"] }
6 changes: 3 additions & 3 deletions examples/http-request/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ edition = "2021"
[dependencies]
console_error_panic_hook = "0.1.7"
console_log = "0.2.0"
log = "0.4.14"
reqwasm = "0.4.1"
serde = "1.0.136"
log = "0.4.17"
reqwasm = "0.5.0"
serde = "1.0.147"
sycamore = { path = "../../packages/sycamore", features = ["suspense"] }
4 changes: 2 additions & 2 deletions examples/hydrate/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ edition = "2021"
[dependencies]
console_error_panic_hook = "0.1.7"
console_log = "0.2.0"
log = "0.4.14"
log = "0.4.17"
sycamore = { path = "../../packages/sycamore", features = [
"hydrate",
"ssr",
] }
wasm-bindgen = "0.2.79"
wasm-bindgen = "0.2.83"
6 changes: 3 additions & 3 deletions examples/js-framework-benchmark/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
getrandom = { version = "0.2.5", features = ["js"] }
getrandom = { version = "0.2.8", features = ["js"] }
rand = "0.8.5"
sycamore = { path = "../../packages/sycamore" }
wasm-bindgen = "0.2.79"
web-sys = "0.3.56"
wasm-bindgen = "0.2.83"
web-sys = "0.3.60"
2 changes: 1 addition & 1 deletion examples/timer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
gloo-timers = { version = "0.2.3", features = ["futures"] }
gloo-timers = { version = "0.2.4", features = ["futures"] }
sycamore = { path = "../../packages/sycamore", features = ["suspense"] }
12 changes: 6 additions & 6 deletions examples/todomvc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ edition = "2021"
[dependencies]
console_error_panic_hook = "0.1.7"
console_log = "0.2.0"
log = "0.4.14"
serde = { version = "1.0.136", features = ["derive"] }
serde_json = "1.0.79"
log = "0.4.17"
serde = { version = "1.0.147", features = ["derive"] }
serde_json = "1.0.89"
sycamore = { path = "../../packages/sycamore", features = ["serde"] }
uuid = { version = "0.8.2", features = ["serde", "v4", "wasm-bindgen"] }
wasm-bindgen = "0.2.79"
uuid = { version = "1.2.2", features = ["serde", "v4", "wasm-bindgen"] }
wasm-bindgen = "0.2.83"

[dependencies.web-sys]
features = ["InputEvent", "KeyboardEvent", "Location", "Storage"]
version = "0.3.56"
version = "0.3.60"
6 changes: 3 additions & 3 deletions examples/transitions/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ edition = "2021"
[dependencies]
console_error_panic_hook = "0.1.7"
console_log = "0.2.0"
getrandom = { version = "0.2.5", features = ["js"] }
gloo-timers = { version = "0.2.3", features = ["futures"] }
log = "0.4.14"
getrandom = { version = "0.2.8", features = ["js"] }
gloo-timers = { version = "0.2.4", features = ["futures"] }
log = "0.4.17"
rand = "0.8.5"
sycamore = { path = "../../packages/sycamore", features = ["suspense"] }
2 changes: 1 addition & 1 deletion packages/sycamore-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ repository = "https://github.com/sycamore-rs/sycamore"
version = "0.8.2"

[dependencies]
ahash = "0.7.6"
hashbrown = "0.13.1"
sycamore-reactive = { path = "../sycamore-reactive", version = "0.8.0" }

[dev-dependencies]
Expand Down
4 changes: 2 additions & 2 deletions packages/sycamore-core/src/render.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

use std::rc::Rc;

use ahash::AHashMap;
use hashbrown::HashMap;
use sycamore_reactive::*;

use crate::generic_node::GenericNode;
Expand Down Expand Up @@ -265,7 +265,7 @@ pub fn reconcile_fragments<G: GenericNode>(parent: &G, a: &mut [G], b: &[G]) {
let mut b_end = b_len;
let mut a_start = 0;
let mut b_start = 0;
let mut map = None::<AHashMap<G, usize>>;
let mut map = None::<HashMap<G, usize>>;

// Last node in a.
let after = a[a_end - 1].next_sibling();
Expand Down
6 changes: 3 additions & 3 deletions packages/sycamore-futures/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ repository = "https://github.com/sycamore-rs/sycamore"
version = "0.8.0"

[dependencies]
futures = "0.3.21"
futures = "0.3.25"
sycamore-reactive = { path = "../sycamore-reactive", version = "0.8.0" }

[target.'cfg(target_arch = "wasm32")'.dependencies]
wasm-bindgen-futures = "0.4.29"
wasm-bindgen-futures = "0.4.33"

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
tokio = { version = "1.17.0", features = ["rt"] }
tokio = { version = "1.22.0", features = ["rt"] }
10 changes: 5 additions & 5 deletions packages/sycamore-macro/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ version = "0.8.2"
proc-macro = true

[dependencies]
once_cell = "1.10.0"
proc-macro2 = "1.0.36"
quote = "1.0.15"
syn = { version = "1.0.86", features = ["extra-traits", "full"] }
once_cell = "1.16.0"
proc-macro2 = "1.0.47"
quote = "1.0.21"
syn = { version = "1.0.103", features = ["extra-traits", "full"] }

[dev-dependencies]
sycamore = { path = "../sycamore", features = ["hydrate", "suspense"] }
trybuild = "1.0.56"
trybuild = "1.0.71"

[features]
default = []
Expand Down
11 changes: 6 additions & 5 deletions packages/sycamore-reactive/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,13 @@ repository = "https://github.com/sycamore-rs/sycamore"
version = "0.8.1"

[dependencies]
ahash = "0.7.6"
bumpalo = { version = "3.9.1", features = ["boxed"] }
indexmap = "1.8.0"
serde = { version = "1.0.136", optional = true }
bumpalo = { version = "3.11.1", features = ["boxed"] }
indexmap = "1.9.2"
getrandom = { version = "0.2.8", features = ["js"] }
hashbrown = "0.13.1"
serde = { version = "1.0.147", optional = true }
slotmap = "1.0.6"
smallvec = { version = "1.8.0", features = ["const_generics"] }
smallvec = { version = "1.10.0", features = ["const_generics"] }

[features]
default = []
6 changes: 3 additions & 3 deletions packages/sycamore-reactive/src/effect.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//! Side effects.

use ahash::AHashSet;
use hashbrown::HashSet;

use crate::*;

Expand All @@ -17,7 +17,7 @@ pub(crate) struct EffectState<'a> {
/// The callback when the effect is re-executed.
cb: Rc<RefCell<dyn FnMut() + 'a>>,
/// A list of dependencies that can trigger this effect.
dependencies: AHashSet<EffectDependency>,
dependencies: HashSet<EffectDependency>,
}

/// Implements reference equality for [`WeakSignalEmitter`]s.
Expand Down Expand Up @@ -122,7 +122,7 @@ fn _create_effect<'a>(cx: Scope<'a>, f: &'a mut (dyn FnMut() + 'a)) {
// Initialize initial effect state.
*effect.borrow_mut() = Some(EffectState {
cb: cb.clone(),
dependencies: AHashSet::new(),
dependencies: HashSet::new(),
});

// Initial callback call to get everything started.
Expand Down
4 changes: 2 additions & 2 deletions packages/sycamore-reactive/src/iter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use std::hash::Hash;
use std::mem;
use std::rc::Rc;

use ahash::AHashMap;
use hashbrown::HashMap;

use crate::*;

Expand Down Expand Up @@ -107,7 +107,7 @@ where

// 0) Prepare a map of indices in newItems. Scan backwards so we encounter them in
// natural order.
let mut new_indices = AHashMap::with_capacity(new_end - start);
let mut new_indices = HashMap::with_capacity(new_end - start);

// Indexes for new_indices_next are shifted by start because values at 0..start are
// always None.
Expand Down
4 changes: 2 additions & 2 deletions packages/sycamore-reactive/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ use std::marker::PhantomData;
use std::mem;
use std::rc::{Rc, Weak};

use ahash::AHashMap;
use arena::*;
pub use context::*;
pub use effect::*;
use hashbrown::HashMap;
use indexmap::IndexMap;
pub use iter::*;
pub use memo::*;
Expand Down Expand Up @@ -47,7 +47,7 @@ struct ScopeInner<'a> {
/// usually read and rarely created. Making this heap allocated when prevent blowing up the
/// size of the [`ScopeInner`] struct when most of the times, this field is unneeded.
#[allow(clippy::box_collection)]
contexts: Option<Box<AHashMap<TypeId, &'a dyn Any>>>,
contexts: Option<Box<HashMap<TypeId, &'a dyn Any>>>,
// Make sure that 'a is invariant.
_phantom: InvariantLifetime<'a>,
}
Expand Down
14 changes: 7 additions & 7 deletions packages/sycamore-router-macro/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ proc-macro = true
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
nom = "7.1.0"
proc-macro2 = "1.0.36"
quote = "1.0.15"
syn = "1.0.86"
unicode-xid = "0.2.2"
nom = "7.1.1"
proc-macro2 = "1.0.47"
quote = "1.0.21"
syn = "1.0.103"
unicode-xid = "0.2.4"

[dev-dependencies]
expect-test = "1.2.2"
expect-test = "1.4.0"
sycamore-router = { path = "../sycamore-router" }
trybuild = "1.0.56"
trybuild = "1.0.71"
4 changes: 2 additions & 2 deletions packages/sycamore-router/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ version = "0.8.0"
[dependencies]
sycamore = { path = "../sycamore", version = "0.8.0" }
sycamore-router-macro = { path = "../sycamore-router-macro", version = "0.8.0" }
wasm-bindgen = "0.2.79"
wasm-bindgen = "0.2.83"

[dependencies.web-sys]
features = [
Expand All @@ -30,7 +30,7 @@ features = [
"Url",
"Window",
]
version = "0.3.56"
version = "0.3.60"

[dev-dependencies]
sycamore = { path = "../sycamore", features = ["ssr"] }
12 changes: 6 additions & 6 deletions packages/sycamore-web/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ repository = "https://github.com/sycamore-rs/sycamore"
version = "0.8.2"

[dependencies]
html-escape = "0.2.11"
indexmap = "1.8.1"
js-sys = "0.3.57"
once_cell = "1.10.0"
html-escape = "0.2.12"
indexmap = "1.9.2"
js-sys = "0.3.60"
once_cell = "1.16.0"
sycamore-core = { path = "../sycamore-core", version = "0.8.0" }
sycamore-reactive = { path = "../sycamore-reactive", version = "0.8.0" }
wasm-bindgen = "0.2.80"
web-sys = { version = "0.3.57", features = [
wasm-bindgen = "0.2.83"
web-sys = { version = "0.3.60", features = [
"console",
"Comment",
"Document",
Expand Down
Loading