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: 0 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 4 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ crate-type = ["cdylib"]
[dependencies]
alloy = "2"
anyhow = "1"
async-trait = "0.1"
axum = { version = "0.8", default-features = false, optional = true }
base64 = "0.23"
blake2b_simd = "1"
Expand All @@ -27,7 +26,6 @@ derive_more = { version = "2", features = ["from", "into", "display"] }
fvm_ipld_encoding = "0.5"
fvm_shared = { version = "~4.8" }
hex = "0.4"
http = { version = "1", optional = true }
k256 = "0.13"
leptos = "0.8"
leptos-use = "0.19"
Expand All @@ -41,10 +39,8 @@ reqwest = { version = "0.13", features = ["json"] }
send_wrapper = "0.6"
serde = "1"
serde_json = "1"
serde_tuple = "1"
strum = { version = "0.28", features = ["derive"] }
thiserror = "2"
tower = { version = "0.5", optional = true }
tower-http = { version = "0.7", features = ["cors"], optional = true }
tower-service = "0.3"
url = { version = "2" }
Expand All @@ -54,6 +50,10 @@ wasm-bindgen = "0.2"
worker = { version = "=0.8.3", features = ['http', 'axum'], optional = true }
worker-macros = { version = "=0.8.3", features = ['http'], optional = true }

[package.metadata.cargo-shear]
# Used only through `worker`'s re-exports; declared directly to pin it to `worker`'s version.
ignored = ["worker-macros"]

[dev-dependencies]
mockall = "0.15"
rusty-fork = "0.3"
Expand All @@ -67,9 +67,7 @@ getrandom0_4 = { package = "getrandom", version = "0.4", features = ["wasm_js"]
[features]
hydrate = ["leptos/hydrate"]
ssr = [
"dep:tower",
"dep:tower-http",
"dep:http",
"dep:axum",
"leptos/ssr",
"leptos_axum/wasm",
Expand Down
8 changes: 6 additions & 2 deletions mise.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ cargo-binstall = "1.19.0"

[tasks."lint:install-tools"]
description = "Install lint tools via cargo-binstall"
run = "cargo binstall --no-confirm cargo-spellcheck@0.15.7 taplo-cli@0.10.0 leptosfmt@0.1.33 cargo-deny@0.19.0"
run = "cargo binstall --no-confirm cargo-spellcheck@0.15.7 taplo-cli@0.10.0 leptosfmt@0.1.33 cargo-deny@0.19.0 cargo-shear@1.14.0"

[tasks.lint]
description = "Run all lints"
depends = ["lint:deny", "lint:spellcheck", "lint:fmt", "lint:clippy"]
depends = ["lint:deny", "lint:spellcheck", "lint:fmt", "lint:clippy", "lint:shear"]

[tasks."lint:fmt"]
description = "Check all formatting"
Expand Down Expand Up @@ -51,6 +51,10 @@ run = 'cargo deny check || (echo "See deny.toml"; false)'
description = "Run cargo spellcheck"
run = 'cargo spellcheck --code 1 || (echo "See .config/spellcheck.toml"; false)'

[tasks."lint:shear"]
description = "Check for unused dependencies"
run = "cargo shear --deny-warnings"

# Format

[tasks.fmt]
Expand Down
4 changes: 4 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ mod utils;
use app::App;
mod faucet;

// Linked only to enable the wasm backends of each `getrandom` major used by dependencies.
#[cfg(target_family = "wasm")]
use {getrandom0_2 as _, getrandom0_3 as _, getrandom0_4 as _};

#[cfg(feature = "hydrate")]
#[wasm_bindgen::prelude::wasm_bindgen]
pub fn hydrate() {
Expand Down
2 changes: 1 addition & 1 deletion src/utils/lotus_json/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
//!
//! # Lotus JSON in Forest
//! - Have a struct which represents a domain object: e.g [`GossipBlock`](crate::blocks::GossipBlock).
//! - Implement [`serde::Serialize`] on that object, normally using [`serde_tuple::Serialize_tuple`].
//! - Implement [`serde::Serialize`] on that object, normally using `serde_tuple::Serialize_tuple`.
//! This corresponds to the CBOR representation.
//! - Implement [`HasLotusJson`] on the domain object.
//! This attaches a separate JSON type, which should implement (`#[derive(...)]`) [`serde::Serialize`] and [`serde::Deserialize`] AND conversions to and from the domain object
Expand Down
Loading