From 39a35689d385c89f79f97ce69bf214308be5e2fd Mon Sep 17 00:00:00 2001 From: cel 🌸 Date: Thu, 8 May 2025 13:50:07 +0100 Subject: feat: OPFS database --- .cargo/config.toml | 19 +++++++++++++++++++ Cargo.lock | 5 ----- Cargo.toml | 2 +- Trunk.toml | 1 + src/lib.rs | 8 +++++++- 5 files changed, 28 insertions(+), 7 deletions(-) diff --git a/.cargo/config.toml b/.cargo/config.toml index c91c3f3..9fa8b2c 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -1,2 +1,21 @@ +[build] +rustflags = [ + # LLD (shipped with the Rust toolchain) is used as the default linker + # "-C", "link-arg=-Tlink.x", + + # if you run into problems with LLD switch to the GNU linker by commenting out + # this line + # "-C", "linker=arm-none-eabi-ld", + + # if you need to link to pre-compiled C libraries provided by a C toolchain + # use GCC as the linker by commenting out both lines above and then + # uncommenting the three lines below + "-C", + "target-feature=+atomics,+bulk-memory,+mutable-globals", +] + +[unstable] +build-std = ["std", "panic_abort"] + [net] git-fetch-with-cli = true diff --git a/Cargo.lock b/Cargo.lock index 2c12742..2c6cdc7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -318,7 +318,6 @@ dependencies = [ "iana-time-zone", "js-sys", "num-traits", - "serde", "wasm-bindgen", "windows-link", ] @@ -822,7 +821,6 @@ dependencies = [ "lampada", "reactive_stores", "rusqlite", - "serde", "sha1", "sha2", "sha3", @@ -1532,7 +1530,6 @@ name = "jid" version = "0.1.0" dependencies = [ "rusqlite", - "serde", ] [[package]] @@ -1578,7 +1575,6 @@ dependencies = [ "jid", "luz", "peanuts", - "serde", "stanza", "thiserror 2.0.12", "tokio", @@ -3768,7 +3764,6 @@ checksum = "458f7a779bf54acc9f347480ac654f68407d3aab21269a6e3c9f922acd9e2da9" dependencies = [ "getrandom 0.3.2", "js-sys", - "serde", "wasm-bindgen", ] diff --git a/Cargo.toml b/Cargo.toml index 53db452..89c001f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,7 +8,7 @@ base64 = "0.22.1" chrono = "0.4.41" chrono-humanize = "0.2.3" console_error_panic_hook = "0.1.7" -filamento = { path = "../luz/filamento", features = ["serde", "reactive_stores", "opfs"] } +filamento = { path = "../luz/filamento", features = ["reactive_stores", "opfs"] } futures = "0.3.31" indexmap = "2.9.0" jid = { path = "../luz/jid" } diff --git a/Trunk.toml b/Trunk.toml index 6e16d80..9df66ca 100644 --- a/Trunk.toml +++ b/Trunk.toml @@ -13,6 +13,7 @@ public_url = "/" filehash = true # Whether to inject scripts (and module preloads) into the finalized output. inject_scripts = true +cargo_flags = ["-Z build-std=std,panic_abort"] # Run without network access # offline = false # Require Cargo.lock and cache are up to date diff --git a/src/lib.rs b/src/lib.rs index 2aa32ee..f907933 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -190,7 +190,13 @@ fn LoginPage(set_app: WriteSignal, set_client: RwSignal