diff --git a/.config/hakari.toml b/.config/hakari.toml deleted file mode 100644 index 5e83baf..0000000 --- a/.config/hakari.toml +++ /dev/null @@ -1,24 +0,0 @@ -# This file contains settings for `cargo hakari`. -# See https://docs.rs/cargo-hakari/latest/cargo_hakari/config for a full list of options. - -hakari-package = "weaver-workspace-hack" - -# Format version for hakari's output. Version 4 requires cargo-hakari 0.9.22 or above. -dep-format-version = "4" - -# Setting workspace.resolver = "2" in the root Cargo.toml is HIGHLY recommended. -# Hakari works much better with the new feature resolver. -# For more about the new feature resolver, see: -# https://blog.rust-lang.org/2021/03/25/Rust-1.51.0.html#cargos-new-feature-resolver -resolver = "2" - -# Add triples corresponding to platforms commonly used by developers here. -# https://doc.rust-lang.org/rustc/platform-support.html -platforms = [ - # "x86_64-unknown-linux-gnu", - # "x86_64-apple-darwin", - # "x86_64-pc-windows-msvc", -] - -# Write out exact versions rather than a semver range. (Defaults to false.) -# exact-versions = true diff --git a/.gitignore b/.gitignore index fc4bc51..a275241 100644 --- a/.gitignore +++ b/.gitignore @@ -10,8 +10,8 @@ .devenv CLAUDE.md grant_proposal.md -.db/ -**/.db/ + +**/**.db **/.claude/settings.local.json .workspaces/ diff --git a/Cargo.lock b/Cargo.lock index 69ad1e4..2f80df1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -21,6 +21,18 @@ dependencies = [ "nom", ] +[[package]] +name = "accessory" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28e416a3ab45838bac2ab2d81b1088d738d7b2d2c5272a54d39366565a29bd80" +dependencies = [ + "macroific", + "proc-macro2", + "quote", + "syn 2.0.108", +] + [[package]] name = "addr2line" version = "0.25.1" @@ -290,6 +302,15 @@ dependencies = [ "system-deps", ] +[[package]] +name = "atomic-polyfill" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8cf2bce30dfe09ef0bfaef228b9d414faaf7e563035494d7fe092dba54b300f4" +dependencies = [ + "critical-section", +] + [[package]] name = "atomic-waker" version = "1.1.2" @@ -542,7 +563,7 @@ version = "3.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77e9d642a7e3a318e37c2c9427b5a6a48aa1ad55dcd986f3034ab2239045a645" dependencies = [ - "darling 0.21.3", + "darling", "ident_case", "prettyplease", "proc-macro2", @@ -859,6 +880,15 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1d728cc89cf3aee9ff92b05e62b19ee65a02b5702cff7d5a377e32c6ae29d8d" +[[package]] +name = "cobs" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fa961b519f0b462e3a3b4a34b64d119eeaca1d59af726fe450bbba07a9fc0a1" +dependencies = [ + "thiserror 2.0.17", +] + [[package]] name = "cocoa" version = "0.26.1" @@ -1161,6 +1191,12 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "critical-section" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "790eea4361631c5e7d22598ecd5723ff611904e3344ce8720784c93e3d83d40b" + [[package]] name = "crossbeam-channel" version = "0.5.15" @@ -1277,38 +1313,14 @@ dependencies = [ "syn 2.0.108", ] -[[package]] -name = "darling" -version = "0.20.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc7f46116c46ff9ab3eb1597a45688b6715c6e628b5c133e288e709a29bcb4ee" -dependencies = [ - "darling_core 0.20.11", - "darling_macro 0.20.11", -] - [[package]] name = "darling" version = "0.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9cdf337090841a411e2a7f3deb9187445851f91b309c0c0a29e05f74a00a48c0" dependencies = [ - "darling_core 0.21.3", - "darling_macro 0.21.3", -] - -[[package]] -name = "darling_core" -version = "0.20.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d00b9596d185e565c2207a0b01f8bd1a135483d02d9b7b0a54b11da8d53412e" -dependencies = [ - "fnv", - "ident_case", - "proc-macro2", - "quote", - "strsim", - "syn 2.0.108", + "darling_core", + "darling_macro", ] [[package]] @@ -1325,24 +1337,13 @@ dependencies = [ "syn 2.0.108", ] -[[package]] -name = "darling_macro" -version = "0.20.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc34b93ccb385b40dc71c6fceac4b2ad23662c7eeb248cf10d529b7e055b6ead" -dependencies = [ - "darling_core 0.20.11", - "quote", - "syn 2.0.108", -] - [[package]] name = "darling_macro" version = "0.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d38308df82d1080de0afee5d069fa14b0326a88c14f15c5ccda35b4a6c414c81" dependencies = [ - "darling_core 0.21.3", + "darling_core", "quote", "syn 2.0.108", ] @@ -1415,6 +1416,20 @@ dependencies = [ "gzip-header", ] +[[package]] +name = "delegate-display" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9926686c832494164c33a36bf65118f4bd6e704000b58c94681bf62e9ad67a74" +dependencies = [ + "impartial-ord", + "itoa", + "macroific", + "proc-macro2", + "quote", + "syn 2.0.108", +] + [[package]] name = "der" version = "0.7.10" @@ -1499,41 +1514,38 @@ checksum = "ab03c107fafeb3ee9f5925686dbb7a73bc76e3932abb0d2b365cb64b169cf04c" [[package]] name = "diesel" -version = "2.2.12" +version = "2.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "229850a212cd9b84d4f0290ad9d294afc0ae70fccaa8949dbe8b43ffafa1e20c" +checksum = "5e7624a3bb9fffd82fff016be9a7f163d20e5a89eb8d28f9daaa6b30fff37500" dependencies = [ - "bitflags 2.10.0", - "byteorder", "chrono", "diesel_derives", - "itoa", + "downcast-rs 2.0.2", "libsqlite3-sys", - "pq-sys", "serde_json", + "sqlite-wasm-rs", "time", ] [[package]] name = "diesel-async" -version = "0.5.2" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51a307ac00f7c23f526a04a77761a0519b9f0eb2838ebf5b905a58580095bdcb" +checksum = "13096fb8dae53f2d411c4b523bec85f45552ed3044a2ab4d85fb2092d9cb4f34" dependencies = [ - "async-trait", "deadpool", "diesel", + "futures-core", "futures-util", "scoped-futures", "tokio", - "tokio-postgres", ] [[package]] name = "diesel_derives" -version = "2.2.7" +version = "2.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b96984c469425cb577bf6f17121ecb3e4fe1e81de5d8f780dd372802858d756" +checksum = "9daac6489a36e42570da165a10c424f3edcefdff70c5fd55e1847c23f3dd7562" dependencies = [ "diesel_table_macro_syntax", "dsl_auto_type", @@ -1544,9 +1556,9 @@ dependencies = [ [[package]] name = "diesel_migrations" -version = "2.2.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a73ce704bad4231f001bff3314d91dce4aba0770cee8b233991859abc15c1f6" +checksum = "ee060f709c3e3b1cadd83fcd0f61711f7a8cf493348f758d3a1c1147d70b3c97" dependencies = [ "diesel", "migrations_internals", @@ -1555,9 +1567,9 @@ dependencies = [ [[package]] name = "diesel_table_macro_syntax" -version = "0.2.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "209c735641a413bc68c4923a9d6ad4bcb3ca306b794edaa7eb0b3228a99ffb25" +checksum = "fe2444076b48641147115697648dc743c2c00b61adade0f01ce67133c7babe8c" dependencies = [ "syn 2.0.108", ] @@ -2241,7 +2253,7 @@ dependencies = [ "rustc-hash 2.1.1", "send_wrapper", "serde", - "serde-wasm-bindgen", + "serde-wasm-bindgen 0.6.5", "serde_json", "tracing", "wasm-bindgen", @@ -2353,6 +2365,12 @@ version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "75b325c5dbd37f80359721ad39aca5a29fb04c89279657cffdda8736d0c0b9d2" +[[package]] +name = "downcast-rs" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "117240f60069e65410b3ae1bb213295bd828f707b5bec6596a1afc8793ce0cbc" + [[package]] name = "dpi" version = "0.1.2" @@ -2361,11 +2379,11 @@ checksum = "d8b14ccef22fc6f5a8f4d7d768562a182c04ce9a3b3157b91390b52ddfdf1a76" [[package]] name = "dsl_auto_type" -version = "0.1.3" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "139ae9aca7527f85f26dd76483eb38533fd84bd571065da1739656ef71c5ff5b" +checksum = "dd122633e4bef06db27737f21d3738fb89c8f6d5360d6d9d7635dda142a7757e" dependencies = [ - "darling 0.20.11", + "darling", "either", "heck 0.5.0", "proc-macro2", @@ -2487,6 +2505,18 @@ dependencies = [ "zeroize", ] +[[package]] +name = "embedded-io" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef1a6892d9eef45c8fa6b9e0086428a2cca8491aca8f787c534a3d6d0bcb3ced" + +[[package]] +name = "embedded-io" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edd0f118536f44f5ccd48bcb8b111bdc3de888b58c74639dfb034a357d0f206d" + [[package]] name = "encode_unicode" version = "1.0.0" @@ -2556,7 +2586,7 @@ version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f43e744e4ea338060faee68ed933e46e722fb7f3617e722a5772d7e856d8b3ce" dependencies = [ - "darling 0.21.3", + "darling", "proc-macro2", "quote", "syn 2.0.108", @@ -2609,12 +2639,6 @@ dependencies = [ "pin-project-lite", ] -[[package]] -name = "fallible-iterator" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" - [[package]] name = "fancy-regex" version = "0.16.2" @@ -2626,6 +2650,18 @@ dependencies = [ "regex-syntax", ] +[[package]] +name = "fancy_constructor" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28a27643a5d05f3a22f5afd6e0d0e6e354f92d37907006f97b84b9cb79082198" +dependencies = [ + "macroific", + "proc-macro2", + "quote", + "syn 2.0.108", +] + [[package]] name = "fastrand" version = "2.3.0" @@ -3360,6 +3396,15 @@ dependencies = [ "zerocopy", ] +[[package]] +name = "hash32" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0c35f58762feb77d74ebe43bdbc3210f09be9fe6742234d573bacc26ed92b67" +dependencies = [ + "byteorder", +] + [[package]] name = "hashbrown" version = "0.12.3" @@ -3428,6 +3473,20 @@ dependencies = [ "http", ] +[[package]] +name = "heapless" +version = "0.7.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdc6457c0eb62c71aac4bc17216026d8410337c4126773b9c5daba343f17964f" +dependencies = [ + "atomic-polyfill", + "hash32", + "rustc_version", + "serde", + "spin 0.9.8", + "stable_deref_trait", +] + [[package]] name = "heck" version = "0.4.1" @@ -3829,6 +3888,51 @@ dependencies = [ "winapi-util", ] +[[package]] +name = "impartial-ord" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ab604ee7085efba6efc65e4ebca0e9533e3aff6cb501d7d77b211e3a781c6d5" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.108", +] + +[[package]] +name = "indexed_db_futures" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69ff41758cbd104e91033bb53bc449bec7eea65652960c81eddf3fc146ecea19" +dependencies = [ + "accessory", + "cfg-if", + "delegate-display", + "derive_more 2.0.1", + "fancy_constructor", + "indexed_db_futures_macros_internal", + "js-sys", + "sealed", + "smallvec", + "thiserror 2.0.17", + "tokio", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + +[[package]] +name = "indexed_db_futures_macros_internal" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "caeba94923b68f254abef921cea7e7698bf4675fdd89d7c58bf1ed885b49a27d" +dependencies = [ + "macroific", + "proc-macro2", + "quote", + "syn 2.0.108", +] + [[package]] name = "indexmap" version = "1.9.3" @@ -4442,6 +4546,7 @@ version = "0.35.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "133c182a6a2c87864fe97778797e46c7e999672690dc9fa3ee8e241aa4a9c13f" dependencies = [ + "cc", "pkg-config", "vcpkg", ] @@ -4564,6 +4669,54 @@ dependencies = [ "syn 2.0.108", ] +[[package]] +name = "macroific" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89f276537b4b8f981bf1c13d79470980f71134b7bdcc5e6e911e910e556b0285" +dependencies = [ + "macroific_attr_parse", + "macroific_core", + "macroific_macro", +] + +[[package]] +name = "macroific_attr_parse" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad4023761b45fcd36abed8fb7ae6a80456b0a38102d55e89a57d9a594a236be9" +dependencies = [ + "proc-macro2", + "quote", + "sealed", + "syn 2.0.108", +] + +[[package]] +name = "macroific_core" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0a7594d3c14916fa55bef7e9d18c5daa9ed410dd37504251e4b75bbdeec33e3" +dependencies = [ + "proc-macro2", + "quote", + "sealed", + "syn 2.0.108", +] + +[[package]] +name = "macroific_macro" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4da6f2ed796261b0a74e2b52b42c693bb6dee1effba3a482c49592659f824b3b" +dependencies = [ + "macroific_attr_parse", + "macroific_core", + "proc-macro2", + "quote", + "syn 2.0.108", +] + [[package]] name = "malloc_buf" version = "0.0.6" @@ -4711,16 +4864,6 @@ version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "47e1ffaa40ddd1f3ed91f717a33c8c0ee23fff369e3aa8772b9605cc1d22f4c3" -[[package]] -name = "md-5" -version = "0.10.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf" -dependencies = [ - "cfg-if", - "digest", -] - [[package]] name = "mediatype" version = "0.19.20" @@ -4819,9 +4962,9 @@ dependencies = [ [[package]] name = "migrations_internals" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3bda1634d70d5bd53553cf15dca9842a396e8c799982a3ad22998dc44d961f24" +checksum = "36c791ecdf977c99f45f23280405d7723727470f6689a5e6dbf513ac547ae10d" dependencies = [ "serde", "toml 0.9.8", @@ -4829,9 +4972,9 @@ dependencies = [ [[package]] name = "migrations_macros" -version = "2.2.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffb161cc72176cb37aa47f1fc520d3ef02263d67d661f44f05d05a079e1237fd" +checksum = "36fc5ac76be324cfd2d3f2cf0fdf5d5d3c4f14ed8aaebadb09e304ba42282703" dependencies = [ "migrations_internals", "proc-macro2", @@ -5587,16 +5730,6 @@ dependencies = [ "phf_shared 0.11.3", ] -[[package]] -name = "phf" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1562dc717473dbaa4c1f85a36410e03c047b2e7df7f45ee938fbef64ae7fadf" -dependencies = [ - "phf_shared 0.13.1", - "serde", -] - [[package]] name = "phf_codegen" version = "0.8.0" @@ -5688,15 +5821,6 @@ dependencies = [ "siphasher 1.0.1", ] -[[package]] -name = "phf_shared" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e57fef6bc5981e38c2ce2d63bfa546861309f875b8a75f092d1d54ae2d64f266" -dependencies = [ - "siphasher 1.0.1", -] - [[package]] name = "pin-project" version = "1.1.10" @@ -5789,32 +5913,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2f3a9f18d041e6d0e102a0a46750538147e5e8992d3b4873aaafee2520b00ce3" [[package]] -name = "postgres-protocol" -version = "0.6.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbef655056b916eb868048276cfd5d6a7dea4f81560dfd047f97c8c6fe3fcfd4" -dependencies = [ - "base64 0.22.1", - "byteorder", - "bytes", - "fallible-iterator", - "hmac", - "md-5", - "memchr", - "rand 0.9.2", - "sha2", - "stringprep", -] - -[[package]] -name = "postgres-types" -version = "0.2.11" +name = "postcard" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef4605b7c057056dd35baeb6ac0c0338e4975b1f2bef0f65da953285eb007095" +checksum = "6764c3b5dd454e283a30e6dfe78e9b31096d9e32036b5d1eaac7a6119ccb9a24" dependencies = [ - "bytes", - "fallible-iterator", - "postgres-protocol", + "cobs", + "embedded-io 0.4.0", + "embedded-io 0.6.1", + "heapless", + "serde", ] [[package]] @@ -5841,17 +5949,6 @@ dependencies = [ "zerocopy", ] -[[package]] -name = "pq-sys" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "574ddd6a267294433f140b02a726b0640c43cf7c6f717084684aaa3b285aba61" -dependencies = [ - "libc", - "pkg-config", - "vcpkg", -] - [[package]] name = "precomputed-hash" version = "0.1.1" @@ -6581,6 +6678,17 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" +[[package]] +name = "sealed" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22f968c5ea23d555e670b449c1c5e7b2fc399fdaec1d304a17cd48e288abc107" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.108", +] + [[package]] name = "sec1" version = "0.7.3" @@ -6695,6 +6803,17 @@ dependencies = [ "serde", ] +[[package]] +name = "serde-wasm-bindgen" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3b4c031cd0d9014307d82b8abf653c0290fbdaeb4c02d00c63cf52f728628bf" +dependencies = [ + "js-sys", + "serde", + "wasm-bindgen", +] + [[package]] name = "serde-wasm-bindgen" version = "0.6.5" @@ -6863,7 +6982,7 @@ version = "3.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b91a903660542fced4e99881aa481bdbaec1634568ee02e0b8bd57c64cb38955" dependencies = [ - "darling 0.21.3", + "darling", "proc-macro2", "quote", "syn 2.0.108", @@ -7097,6 +7216,9 @@ name = "spin" version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" +dependencies = [ + "lock_api", +] [[package]] name = "spin" @@ -7114,6 +7236,23 @@ dependencies = [ "der", ] +[[package]] +name = "sqlite-wasm-rs" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54e4348c16a3d2e2a45437eff67efc5462b60443de76f61b5d0ed9111c626d9d" +dependencies = [ + "cc", + "indexed_db_futures", + "js-sys", + "once_cell", + "thiserror 2.0.17", + "tokio", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + [[package]] name = "stable_deref_trait" version = "1.2.1" @@ -7171,17 +7310,6 @@ dependencies = [ "quote", ] -[[package]] -name = "stringprep" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b4df3d392d81bd458a8a621b8bffbd2302a12ffe288a9d931670948749463b1" -dependencies = [ - "unicode-bidi", - "unicode-normalization", - "unicode-properties", -] - [[package]] name = "strsim" version = "0.11.1" @@ -7617,32 +7745,6 @@ dependencies = [ "tokio", ] -[[package]] -name = "tokio-postgres" -version = "0.7.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b40d66d9b2cfe04b628173409368e58247e8eddbbd3b0e6c6ba1d09f20f6c9e" -dependencies = [ - "async-trait", - "byteorder", - "bytes", - "fallible-iterator", - "futures-channel", - "futures-util", - "log", - "parking_lot", - "percent-encoding", - "phf 0.13.1", - "pin-project-lite", - "postgres-protocol", - "postgres-types", - "rand 0.9.2", - "socket2 0.6.1", - "tokio", - "tokio-util", - "whoami", -] - [[package]] name = "tokio-rustls" version = "0.26.4" @@ -7758,12 +7860,10 @@ version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0dc8b1fb61449e27716ec0e1bdf0f6b8f3e8f6b05391e8497b8b6d7804ea6d8" dependencies = [ - "indexmap 2.12.0", "serde_core", "serde_spanned 1.0.3", "toml_datetime 0.7.3", "toml_parser", - "toml_writer", "winnow 0.7.13", ] @@ -7848,12 +7948,6 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5d99f8c9a7727884afe522e9bd5edbfc91a3312b36a77b5fb8926e4c31a41801" -[[package]] -name = "toml_writer" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df8b2b54733674ad286d16267dcfc7a71ed5c776e4ac7aa3c3e2561f7c637bf2" - [[package]] name = "tower" version = "0.5.2" @@ -8168,12 +8262,6 @@ version = "2.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "75b844d17643ee918803943289730bec8aac480150456169e647ed0b576ba539" -[[package]] -name = "unicode-bidi" -version = "0.3.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c1cb5db39152898a79168971543b1cb5020dff7fe43c8dc468b0885f5e29df5" - [[package]] name = "unicode-ident" version = "1.0.22" @@ -8195,12 +8283,6 @@ dependencies = [ "tinyvec", ] -[[package]] -name = "unicode-properties" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7df058c713841ad818f1dc5d3fd88063241cc61f49f5fbea4b951e8cf5a8d71d" - [[package]] name = "unicode-segmentation" version = "1.12.0" @@ -8371,12 +8453,6 @@ dependencies = [ "wit-bindgen", ] -[[package]] -name = "wasite" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8dad83b4f25e74f184f64c43b150b91efe7647395b42289f38e50566d82855b" - [[package]] name = "wasm-bindgen" version = "0.2.105" @@ -8448,6 +8524,36 @@ dependencies = [ "web-sys", ] +[[package]] +name = "wasmworker" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7eed1ad2b2f62d7ddc472e56bce6416d6eef60631a4d217d4f96f4c3f322dd49" +dependencies = [ + "futures", + "js-sys", + "postcard", + "send_wrapper", + "serde", + "serde-wasm-bindgen 0.4.5", + "serde_bytes", + "thiserror 2.0.17", + "tokio", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + +[[package]] +name = "wasmworker-proc-macro" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffd01f29024361dcb5b54f50b4cfe8d56ecac0ece515f52e7756e979b9a43c2d" +dependencies = [ + "quote", + "syn 2.0.108", +] + [[package]] name = "wayland-backend" version = "0.3.11" @@ -8455,7 +8561,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "673a33c33048a5ade91a6b139580fa174e19fb0d23f396dca9fa15f2e1e49b35" dependencies = [ "cc", - "downcast-rs", + "downcast-rs 1.2.1", "rustix", "scoped-tls", "smallvec", @@ -8532,6 +8638,8 @@ dependencies = [ "chrono", "console_error_panic_hook", "dashmap", + "diesel", + "diesel_migrations", "dioxus", "dioxus-primitives", "jacquard", @@ -8541,6 +8649,7 @@ dependencies = [ "mini-moka", "n0-future", "serde_json", + "sqlite-wasm-rs", "time", "weaver-api", "weaver-common", @@ -8572,9 +8681,11 @@ dependencies = [ name = "weaver-common" version = "0.1.0" dependencies = [ + "futures-util", "http", "jacquard", "jacquard-common", + "js-sys", "markdown-weaver", "markdown-weaver-escape", "miette 7.6.0", @@ -8582,8 +8693,10 @@ dependencies = [ "minijinja", "n0-future", "owo-colors", + "pin-project", "regex", "reqwest", + "send_wrapper", "serde", "serde_bytes", "serde_html_form", @@ -8593,7 +8706,12 @@ dependencies = [ "tokio", "tracing", "trait-variant", + "wasm-bindgen", + "wasm-bindgen-futures", + "wasmworker", + "wasmworker-proc-macro", "weaver-api", + "web-time", ] [[package]] @@ -8608,16 +8726,21 @@ dependencies = [ "diesel-async", "diesel_migrations", "dotenvy", + "futures-util", "hyper", "jacquard", "jacquard-api", "jacquard-axum", "jose", "jose-jwk", + "js-sys", + "libsqlite3-sys", "miette 7.6.0", "minijinja", "minijinja-contrib", + "pin-project", "reqwest", + "send_wrapper", "serde", "serde_json", "thiserror 2.0.17", @@ -8631,7 +8754,12 @@ dependencies = [ "tracing-subscriber", "url", "uuid", + "wasm-bindgen", + "wasm-bindgen-futures", + "wasmworker", + "wasmworker-proc-macro", "weaver-common", + "web-time", ] [[package]] @@ -8822,17 +8950,6 @@ dependencies = [ "windows-core 0.61.2", ] -[[package]] -name = "whoami" -version = "1.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d4a4db5077702ca3015d3d02d74974948aba2ad9e12ab7df718ee64ccd7e97d" -dependencies = [ - "libredox", - "wasite", - "web-sys", -] - [[package]] name = "widestring" version = "1.2.1" diff --git a/crates/weaver-app/Cargo.toml b/crates/weaver-app/Cargo.toml index 138c411..c411b0b 100644 --- a/crates/weaver-app/Cargo.toml +++ b/crates/weaver-app/Cargo.toml @@ -32,6 +32,15 @@ mime-sniffer = {version = "^0.1"} chrono = { version = "0.4" } serde_json = "1.0" +diesel = { version = "2.3", features = ["sqlite", "returning_clauses_for_sqlite_3_35", "chrono", "serde_json"] } +diesel_migrations = { version = "2.3", features = ["sqlite"] } + + +[target.'cfg(all(target_family = "wasm", target_os = "unknown"))'.dependencies] +sqlite-wasm-rs = { version = "0.4", features = ["relaxed-idb"] } + + + [target.'cfg(target_arch = "wasm32")'.dependencies] time = { version = "0.3", features = ["wasm-bindgen"] } console_error_panic_hook = "0.1" diff --git a/crates/weaver-app/diesel.toml b/crates/weaver-app/diesel.toml new file mode 100644 index 0000000..d9d567d --- /dev/null +++ b/crates/weaver-app/diesel.toml @@ -0,0 +1,9 @@ +# For documentation on how to configure this file, +# see https://diesel.rs/guides/configuring-diesel-cli + +[print_schema] +file = "src/schema.rs" +custom_type_derives = ["diesel::query_builder::QueryId", "Clone", "std::fmt::Debug", "jacquard::IntoStatic"] + +[migrations_directory] +dir = "/home/orual/Projects/weaver.sh/crates/weaver-app/migrations" diff --git a/crates/weaver-common/Cargo.toml b/crates/weaver-common/Cargo.toml index cc5250b..90f50f0 100644 --- a/crates/weaver-common/Cargo.toml +++ b/crates/weaver-common/Cargo.toml @@ -50,6 +50,19 @@ regex = "1.11.1" markdown-weaver-escape = { workspace = true, features = ["std"] } mime-sniffer = "^0.1" +# wasm-in-browser dependencies +[target.'cfg(all(target_family = "wasm", target_os = "unknown"))'.dependencies] +futures-util = "0.3" +js-sys = "0.3" +pin-project = "1" +wasm-bindgen = "0.2" +wasm-bindgen-futures = "0.4" +web-time = "1" +send_wrapper = "0.6" +wasmworker = "0.1" +wasmworker-proc-macro = "0.1" + + [dev-dependencies] tokio = { version = "1", features = ["macros", "rt"] } diff --git a/crates/weaver-common/src/lib.rs b/crates/weaver-common/src/lib.rs index e8572de..3ac8513 100644 --- a/crates/weaver-common/src/lib.rs +++ b/crates/weaver-common/src/lib.rs @@ -3,6 +3,7 @@ pub mod constellation; pub mod error; pub mod view; +pub mod worker_rt; // Re-export jacquard for convenience pub use jacquard; diff --git a/crates/weaver-common/src/worker_rt.rs b/crates/weaver-common/src/worker_rt.rs new file mode 100644 index 0000000..1886cf1 --- /dev/null +++ b/crates/weaver-common/src/worker_rt.rs @@ -0,0 +1 @@ +pub struct Runtime {} diff --git a/crates/weaver-index/Cargo.toml b/crates/weaver-index/Cargo.toml index e47a564..4feab39 100644 --- a/crates/weaver-index/Cargo.toml +++ b/crates/weaver-index/Cargo.toml @@ -50,9 +50,11 @@ tokio = { version = "1.44", features = ["full"] } miette = { workspace = true, features = ["fancy", "syntect-highlighter"] } thiserror = { workspace = true } -diesel = { version = "2.2.0", features = ["postgres", "serde_json","chrono"] } -diesel-async = { version = "0.5.2", features = ["postgres", "deadpool"] } -diesel_migrations = "2.2.0" +diesel = { version = "2.3.0", features = ["sqlite", "serde_json", "chrono", "returning_clauses_for_sqlite_3_35"] } +diesel-async = { version = "0.7", features = ["sqlite", "deadpool"] } +diesel_migrations = "2.3.0" + +libsqlite3-sys = {version = ">=0.30.1,<0.36.0", features = ["bundled"] } toml = { version = "0.8.22", features = ["preserve_order"] } jose = { version = "0.0.2", features = ["crypto-rustcrypto"] } @@ -62,3 +64,16 @@ url = "2" minijinja = { version = "2.9.0" } minijinja-contrib = { version = "2.9.0" } dashmap = "6.1.0" + + +# wasm-in-browser dependencies +[target.'cfg(all(target_family = "wasm", target_os = "unknown"))'.dependencies] +futures-util = "0.3" +js-sys = "0.3" +pin-project = "1" +wasm-bindgen = "0.2" +wasm-bindgen-futures = "0.4" +web-time = "1" +send_wrapper = "0.6" +wasmworker = "0.1" +wasmworker-proc-macro = "0.1" diff --git a/crates/weaver-index/diesel.toml b/crates/weaver-index/diesel.toml index b67241f..609961e 100644 --- a/crates/weaver-index/diesel.toml +++ b/crates/weaver-index/diesel.toml @@ -3,7 +3,9 @@ [print_schema] file = "src/schema.rs" -custom_type_derives = ["diesel::query_builder::QueryId", "Clone"] +custom_type_derives = ["diesel::query_builder::QueryId", "Clone", "std::fmt::Debug", "jacquard::IntoStatic"] +patch_file = "src/schema.patch" + [migrations_directory] -dir = "/home/orual/Projects/weaver.sh/crates/weaver-appview/migrations" +dir = "/home/orual/Projects/weaver.sh/crates/weaver-index/migrations" diff --git a/crates/weaver-index/migrations/00000000000000_diesel_initial_setup/down.sql b/crates/weaver-index/migrations/00000000000000_diesel_initial_setup/down.sql deleted file mode 100644 index a9f5260..0000000 --- a/crates/weaver-index/migrations/00000000000000_diesel_initial_setup/down.sql +++ /dev/null @@ -1,6 +0,0 @@ --- This file was automatically created by Diesel to setup helper functions --- and other internal bookkeeping. This file is safe to edit, any future --- changes will be added to existing projects as new migrations. - -DROP FUNCTION IF EXISTS diesel_manage_updated_at(_tbl regclass); -DROP FUNCTION IF EXISTS diesel_set_updated_at(); diff --git a/crates/weaver-index/migrations/00000000000000_diesel_initial_setup/up.sql b/crates/weaver-index/migrations/00000000000000_diesel_initial_setup/up.sql deleted file mode 100644 index d68895b..0000000 --- a/crates/weaver-index/migrations/00000000000000_diesel_initial_setup/up.sql +++ /dev/null @@ -1,36 +0,0 @@ --- This file was automatically created by Diesel to setup helper functions --- and other internal bookkeeping. This file is safe to edit, any future --- changes will be added to existing projects as new migrations. - - - - --- Sets up a trigger for the given table to automatically set a column called --- `updated_at` whenever the row is modified (unless `updated_at` was included --- in the modified columns) --- --- # Example --- --- ```sql --- CREATE TABLE users (id SERIAL PRIMARY KEY, updated_at TIMESTAMP NOT NULL DEFAULT NOW()); --- --- SELECT diesel_manage_updated_at('users'); --- ``` -CREATE OR REPLACE FUNCTION diesel_manage_updated_at(_tbl regclass) RETURNS VOID AS $$ -BEGIN - EXECUTE format('CREATE TRIGGER set_updated_at BEFORE UPDATE ON %s - FOR EACH ROW EXECUTE PROCEDURE diesel_set_updated_at()', _tbl); -END; -$$ LANGUAGE plpgsql; - -CREATE OR REPLACE FUNCTION diesel_set_updated_at() RETURNS trigger AS $$ -BEGIN - IF ( - NEW IS DISTINCT FROM OLD AND - NEW.updated_at IS NOT DISTINCT FROM OLD.updated_at - ) THEN - NEW.updated_at := current_timestamp; - END IF; - RETURN NEW; -END; -$$ LANGUAGE plpgsql; diff --git a/crates/weaver-index/migrations/2025-05-15-230036_create_appviewdb/up.sql b/crates/weaver-index/migrations/2025-05-15-230036_create_appviewdb/up.sql index a3fee76..3d7d207 100644 --- a/crates/weaver-index/migrations/2025-05-15-230036_create_appviewdb/up.sql +++ b/crates/weaver-index/migrations/2025-05-15-230036_create_appviewdb/up.sql @@ -1,61 +1,51 @@ create table if not exists registrations ( - id serial primary key, + id integer not null primary key autoincrement, domain text not null unique, did text not null, secret text not null, - created timestamp - with - time zone not null default (now () at time zone 'utc'), - registered text + created timestamp not null default (datetime('now')), + registered text ); create table if not exists public_keys ( - id serial primary key, + id integer not null primary key autoincrement, did text not null, name text not null, key_contents text not null, rkey text not null, - created timestamp - with - time zone not null default (now () at time zone 'utc'), - unique (did, name, key_contents) + created timestamp not null default (datetime('now')), + unique (did, name, key_contents) ); create table if not exists follows ( user_did text not null, subject_did text not null, rkey text not null, - followed_at timestamp - with - time zone not null default (now () at time zone 'utc'), - primary key (user_did, subject_did), + followed_at timestamp not null default (datetime('now')), + primary key (user_did, subject_did), check (user_did <> subject_did) ); create table if not exists _jetstream ( - id serial primary key, + id integer not null primary key autoincrement, last_time_us integer not null ); create table if not exists emails ( - id serial primary key, + id integer not null primary key autoincrement, did text not null, email text not null, - verified integer not null default 0, + verified boolean not null default false, verification_code text not null, - last_sent timestamp - with - time zone not null default (now () at time zone 'utc'), - is_primary integer not null default 0, - created timestamp - with - time zone not null default (now () at time zone 'utc'), - unique (did, email) + last_sent timestamp not null default (datetime('now')), + is_primary boolean not null default false, + created timestamp not null default (datetime('now')), + unique (did, email) ); create table if not exists profile ( -- id - id serial primary key, + id integer not null primary key autoincrement, did text not null, -- data avatar text, @@ -63,17 +53,15 @@ create table if not exists profile ( include_bluesky boolean not null default false, include_tangled boolean not null default false, location text, - pinned_post jsonb, - created_at timestamp - with - time zone default (now () at time zone 'utc'), - -- constraints - unique (did) + pinned_post text, + created_at timestamp default (datetime('now')), + -- constraints + unique (did) ); create table if not exists profile_links ( -- id - id serial primary key, + id integer not null primary key autoincrement, did text not null, -- data link text not null, @@ -83,7 +71,7 @@ create table if not exists profile_links ( create table if not exists profile_pronouns ( -- id - id serial primary key, + id integer not null primary key autoincrement, did text not null, -- data pronoun text not null, @@ -93,28 +81,28 @@ create table if not exists profile_pronouns ( -- OAuth sessions table for jacquard ClientSessionData create table if not exists oauth_sessions ( - id serial primary key, + id integer not null primary key autoincrement, -- Extracted from ClientSessionData for indexing did text not null, session_id text not null, - -- Full ClientSessionData as jsonb - session_data jsonb not null, - created_at timestamp with time zone not null default (now() at time zone 'utc'), - updated_at timestamp with time zone not null default (now() at time zone 'utc'), + -- Full ClientSessionData as JSON + session_data blob not null, + created_at timestamp not null default (datetime('now')), + updated_at timestamp not null default (datetime('now')), unique (did, session_id) ); -- OAuth authorization requests table for jacquard AuthRequestData create table if not exists oauth_auth_requests ( - id serial primary key, + id integer not null primary key autoincrement, -- Extracted from AuthRequestData for indexing state text not null unique, -- Optional DID if known at auth request time account_did text, - -- Full AuthRequestData as jsonb - auth_req_data jsonb not null, - created_at timestamp with time zone not null default (now() at time zone 'utc'), - expires_at timestamp with time zone not null default ((now() at time zone 'utc') + interval '10 minutes') + -- Full AuthRequestData as JSON + auth_req_data blob not null, + created_at timestamp not null default (datetime('now')), + expires_at timestamp not null default (datetime('now', '+10 minutes')) ); -- Index for quick session lookups diff --git a/crates/weaver-index/src/db.rs b/crates/weaver-index/src/db.rs index f23af83..b8b3031 100644 --- a/crates/weaver-index/src/db.rs +++ b/crates/weaver-index/src/db.rs @@ -4,10 +4,11 @@ pub const MIGRATIONS: EmbeddedMigrations = embed_migrations!(); use diesel_async::RunQueryDsl; use diesel_async::pooled_connection::AsyncDieselConnectionManager; use diesel_async::pooled_connection::deadpool::Pool; +use diesel_async::sync_connection_wrapper::SyncConnectionWrapper; #[derive(Clone)] pub struct Db { - pub pool: Pool, + pub pool: Pool>, } impl Db { @@ -20,8 +21,9 @@ impl Db { } else { std::env::var("DATABASE_URL").expect("DATABASE_URL must be set") }; - let config = - AsyncDieselConnectionManager::::new(database_url); + let config = AsyncDieselConnectionManager::>::new( + database_url, + ); let pool = Pool::builder(config) .build() .expect("Failed to create pool"); @@ -37,7 +39,7 @@ pub fn run_migrations( } else { std::env::var("DATABASE_URL").expect("DATABASE_URL must be set") }; - let mut connection = PgConnection::establish(&database_url) + let mut connection = SqliteConnection::establish(&database_url) .unwrap_or_else(|_| panic!("Error connecting to {}", database_url)); // This will run the necessary migrations. // @@ -57,3 +59,5 @@ pub fn run_migrations( } Ok(()) } + +pub struct Runtime; diff --git a/crates/weaver-index/src/main.rs b/crates/weaver-index/src/main.rs index 88d82ec..5f6118a 100644 --- a/crates/weaver-index/src/main.rs +++ b/crates/weaver-index/src/main.rs @@ -14,8 +14,6 @@ use axum::Router; use clap::Parser; use config::*; use db::*; -use diesel::prelude::*; -use diesel_async::{AsyncConnection, AsyncPgConnection, RunQueryDsl}; use dotenvy::dotenv; use miette::IntoDiagnostic; use miette::miette; diff --git a/crates/weaver-index/src/models.rs b/crates/weaver-index/src/models.rs index fd464a4..0e193c1 100644 --- a/crates/weaver-index/src/models.rs +++ b/crates/weaver-index/src/models.rs @@ -1,5 +1,6 @@ -use chrono::{DateTime, Utc}; +use chrono::NaiveDateTime; use diesel::prelude::*; +use jacquard::CowStr; #[derive(Queryable, Selectable)] #[diesel(table_name = crate::schema::profile)] @@ -12,7 +13,7 @@ pub struct Profile { pub include_tangled: bool, pub location: Option, pub pinned_post: Option, - pub created_at: Option>, + pub created_at: Option, } #[derive(Queryable, Selectable)] @@ -22,19 +23,19 @@ pub struct Registration { pub domain: String, pub did: String, pub secret: String, - pub created: DateTime, + pub created: NaiveDateTime, pub registered: Option, } #[derive(Queryable, Selectable)] #[diesel(table_name = crate::schema::public_keys)] -pub struct PublicKey { +pub struct PublicKey<'a> { pub id: i32, - pub did: String, + pub did: CowStr<'a>, pub name: String, pub key_contents: String, pub rkey: String, - pub created: DateTime, + pub created: NaiveDateTime, } #[derive(Queryable, Selectable)] @@ -43,7 +44,7 @@ pub struct Follow { pub user_did: String, pub subject_did: String, pub rkey: String, - pub followed_at: DateTime, + pub followed_at: NaiveDateTime, } #[derive(Queryable, Selectable)] @@ -59,11 +60,11 @@ pub struct Email { pub id: i32, pub did: String, pub email: String, - pub verified: i32, + pub verified: bool, pub verification_code: String, - pub last_sent: DateTime, - pub is_primary: i32, - pub created: DateTime, + pub last_sent: NaiveDateTime, + pub is_primary: bool, + pub created: NaiveDateTime, } #[derive(Queryable, Selectable)] @@ -84,15 +85,15 @@ pub struct ProfilePronoun { // Jacquard OAuth models -#[derive(Queryable, Selectable)] -#[diesel(table_name = crate::schema::oauth_sessions)] +#[derive(Queryable, Selectable, QueryableByName)] +#[diesel(table_name = crate::schema::oauth_sessions, check_for_backend(diesel::sqlite::Sqlite))] pub struct OauthSession { pub id: i32, pub did: String, pub session_id: String, pub session_data: serde_json::Value, - pub created_at: DateTime, - pub updated_at: DateTime, + pub created_at: NaiveDateTime, + pub updated_at: NaiveDateTime, } #[derive(Insertable)] @@ -103,15 +104,15 @@ pub struct NewOauthSession { pub session_data: serde_json::Value, } -#[derive(Queryable, Selectable)] +#[derive(Queryable, Selectable, QueryableByName)] #[diesel(table_name = crate::schema::oauth_auth_requests)] pub struct OauthAuthRequest { pub id: i32, pub state: String, pub account_did: Option, pub auth_req_data: serde_json::Value, - pub created_at: DateTime, - pub expires_at: DateTime, + pub created_at: NaiveDateTime, + pub expires_at: NaiveDateTime, } #[derive(Insertable)] diff --git a/crates/weaver-index/src/schema.patch b/crates/weaver-index/src/schema.patch new file mode 100644 index 0000000..d49ecfe --- /dev/null +++ b/crates/weaver-index/src/schema.patch @@ -0,0 +1,29 @@ +--- src/schema.rs 2025-11-07 17:26:09.742146790 -0500 ++++ src/schema.rs 2025-11-07 17:25:42.871390425 -0500 +@@ -31,24 +31,24 @@ + + diesel::table! { + oauth_auth_requests (id) { + id -> Integer, + state -> Text, + account_did -> Nullable, +- auth_req_data -> Binary, ++ auth_req_data -> Jsonb, + created_at -> Timestamp, + expires_at -> Timestamp, + } + } + + diesel::table! { + oauth_sessions (id) { + id -> Integer, + did -> Text, + session_id -> Text, +- session_data -> Binary, ++ session_data -> Jsonb, + created_at -> Timestamp, + updated_at -> Timestamp, + } + } + + diesel::table! { diff --git a/crates/weaver-index/src/schema.rs b/crates/weaver-index/src/schema.rs index 9bc9861..87cb3f6 100644 --- a/crates/weaver-index/src/schema.rs +++ b/crates/weaver-index/src/schema.rs @@ -2,21 +2,21 @@ diesel::table! { _jetstream (id) { - id -> Int4, - last_time_us -> Int4, + id -> Integer, + last_time_us -> Integer, } } diesel::table! { emails (id) { - id -> Int4, + id -> Integer, did -> Text, email -> Text, - verified -> Int4, + verified -> Bool, verification_code -> Text, - last_sent -> Timestamptz, - is_primary -> Int4, - created -> Timestamptz, + last_sent -> Timestamp, + is_primary -> Bool, + created -> Timestamp, } } @@ -25,49 +25,49 @@ diesel::table! { user_did -> Text, subject_did -> Text, rkey -> Text, - followed_at -> Timestamptz, + followed_at -> Timestamp, } } diesel::table! { oauth_auth_requests (id) { - id -> Int4, + id -> Integer, state -> Text, account_did -> Nullable, auth_req_data -> Jsonb, - created_at -> Timestamptz, - expires_at -> Timestamptz, + created_at -> Timestamp, + expires_at -> Timestamp, } } diesel::table! { oauth_sessions (id) { - id -> Int4, + id -> Integer, did -> Text, session_id -> Text, session_data -> Jsonb, - created_at -> Timestamptz, - updated_at -> Timestamptz, + created_at -> Timestamp, + updated_at -> Timestamp, } } diesel::table! { profile (id) { - id -> Int4, + id -> Integer, did -> Text, avatar -> Nullable, description -> Text, include_bluesky -> Bool, include_tangled -> Bool, location -> Nullable, - pinned_post -> Nullable, - created_at -> Nullable, + pinned_post -> Nullable, + created_at -> Nullable, } } diesel::table! { profile_links (id) { - id -> Int4, + id -> Integer, did -> Text, link -> Text, } @@ -75,7 +75,7 @@ diesel::table! { diesel::table! { profile_pronouns (id) { - id -> Int4, + id -> Integer, did -> Text, pronoun -> Text, } @@ -83,22 +83,22 @@ diesel::table! { diesel::table! { public_keys (id) { - id -> Int4, + id -> Integer, did -> Text, name -> Text, key_contents -> Text, rkey -> Text, - created -> Timestamptz, + created -> Timestamp, } } diesel::table! { registrations (id) { - id -> Int4, + id -> Integer, domain -> Text, did -> Text, secret -> Text, - created -> Timestamptz, + created -> Timestamp, registered -> Nullable, } } diff --git a/flake.nix b/flake.nix index 5fde7d6..d678c91 100644 --- a/flake.nix +++ b/flake.nix @@ -251,7 +251,6 @@ NIX_LD = lib.fileContents "${pkgs.stdenv.cc}/nix-support/dynamic-linker"; LD_LIBRARY_PATH = "$LD_LIBRARY_PATH:$NIX_LD_LIBRARY_PATH"; - DATABASE_URL = "postgres://postgres:@localhost/weaver_appview"; # Additional dev-shell environment variables can be set directly # MY_CUSTOM_DEVELOPMENT_VAR = "something else";