swapped to sqlite

Orual 4a293a67 ad5e80cd

+495 -375
-24
.config/hakari.toml
··· 1 - # This file contains settings for `cargo hakari`. 2 - # See https://docs.rs/cargo-hakari/latest/cargo_hakari/config for a full list of options. 3 - 4 - hakari-package = "weaver-workspace-hack" 5 - 6 - # Format version for hakari's output. Version 4 requires cargo-hakari 0.9.22 or above. 7 - dep-format-version = "4" 8 - 9 - # Setting workspace.resolver = "2" in the root Cargo.toml is HIGHLY recommended. 10 - # Hakari works much better with the new feature resolver. 11 - # For more about the new feature resolver, see: 12 - # https://blog.rust-lang.org/2021/03/25/Rust-1.51.0.html#cargos-new-feature-resolver 13 - resolver = "2" 14 - 15 - # Add triples corresponding to platforms commonly used by developers here. 16 - # https://doc.rust-lang.org/rustc/platform-support.html 17 - platforms = [ 18 - # "x86_64-unknown-linux-gnu", 19 - # "x86_64-apple-darwin", 20 - # "x86_64-pc-windows-msvc", 21 - ] 22 - 23 - # Write out exact versions rather than a semver range. (Defaults to false.) 24 - # exact-versions = true
+2 -2
.gitignore
··· 10 10 .devenv 11 11 CLAUDE.md 12 12 grant_proposal.md 13 - .db/ 14 - **/.db/ 13 + 14 + **/**.db 15 15 16 16 **/.claude/settings.local.json 17 17 .workspaces/
+327 -210
Cargo.lock
··· 22 22 ] 23 23 24 24 [[package]] 25 + name = "accessory" 26 + version = "2.1.0" 27 + source = "registry+https://github.com/rust-lang/crates.io-index" 28 + checksum = "28e416a3ab45838bac2ab2d81b1088d738d7b2d2c5272a54d39366565a29bd80" 29 + dependencies = [ 30 + "macroific", 31 + "proc-macro2", 32 + "quote", 33 + "syn 2.0.108", 34 + ] 35 + 36 + [[package]] 25 37 name = "addr2line" 26 38 version = "0.25.1" 27 39 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 291 303 ] 292 304 293 305 [[package]] 306 + name = "atomic-polyfill" 307 + version = "1.0.3" 308 + source = "registry+https://github.com/rust-lang/crates.io-index" 309 + checksum = "8cf2bce30dfe09ef0bfaef228b9d414faaf7e563035494d7fe092dba54b300f4" 310 + dependencies = [ 311 + "critical-section", 312 + ] 313 + 314 + [[package]] 294 315 name = "atomic-waker" 295 316 version = "1.1.2" 296 317 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 542 563 source = "registry+https://github.com/rust-lang/crates.io-index" 543 564 checksum = "77e9d642a7e3a318e37c2c9427b5a6a48aa1ad55dcd986f3034ab2239045a645" 544 565 dependencies = [ 545 - "darling 0.21.3", 566 + "darling", 546 567 "ident_case", 547 568 "prettyplease", 548 569 "proc-macro2", ··· 860 881 checksum = "a1d728cc89cf3aee9ff92b05e62b19ee65a02b5702cff7d5a377e32c6ae29d8d" 861 882 862 883 [[package]] 884 + name = "cobs" 885 + version = "0.3.0" 886 + source = "registry+https://github.com/rust-lang/crates.io-index" 887 + checksum = "0fa961b519f0b462e3a3b4a34b64d119eeaca1d59af726fe450bbba07a9fc0a1" 888 + dependencies = [ 889 + "thiserror 2.0.17", 890 + ] 891 + 892 + [[package]] 863 893 name = "cocoa" 864 894 version = "0.26.1" 865 895 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 1162 1192 ] 1163 1193 1164 1194 [[package]] 1195 + name = "critical-section" 1196 + version = "1.2.0" 1197 + source = "registry+https://github.com/rust-lang/crates.io-index" 1198 + checksum = "790eea4361631c5e7d22598ecd5723ff611904e3344ce8720784c93e3d83d40b" 1199 + 1200 + [[package]] 1165 1201 name = "crossbeam-channel" 1166 1202 version = "0.5.15" 1167 1203 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 1279 1315 1280 1316 [[package]] 1281 1317 name = "darling" 1282 - version = "0.20.11" 1283 - source = "registry+https://github.com/rust-lang/crates.io-index" 1284 - checksum = "fc7f46116c46ff9ab3eb1597a45688b6715c6e628b5c133e288e709a29bcb4ee" 1285 - dependencies = [ 1286 - "darling_core 0.20.11", 1287 - "darling_macro 0.20.11", 1288 - ] 1289 - 1290 - [[package]] 1291 - name = "darling" 1292 1318 version = "0.21.3" 1293 1319 source = "registry+https://github.com/rust-lang/crates.io-index" 1294 1320 checksum = "9cdf337090841a411e2a7f3deb9187445851f91b309c0c0a29e05f74a00a48c0" 1295 1321 dependencies = [ 1296 - "darling_core 0.21.3", 1297 - "darling_macro 0.21.3", 1298 - ] 1299 - 1300 - [[package]] 1301 - name = "darling_core" 1302 - version = "0.20.11" 1303 - source = "registry+https://github.com/rust-lang/crates.io-index" 1304 - checksum = "0d00b9596d185e565c2207a0b01f8bd1a135483d02d9b7b0a54b11da8d53412e" 1305 - dependencies = [ 1306 - "fnv", 1307 - "ident_case", 1308 - "proc-macro2", 1309 - "quote", 1310 - "strsim", 1311 - "syn 2.0.108", 1322 + "darling_core", 1323 + "darling_macro", 1312 1324 ] 1313 1325 1314 1326 [[package]] ··· 1327 1339 1328 1340 [[package]] 1329 1341 name = "darling_macro" 1330 - version = "0.20.11" 1331 - source = "registry+https://github.com/rust-lang/crates.io-index" 1332 - checksum = "fc34b93ccb385b40dc71c6fceac4b2ad23662c7eeb248cf10d529b7e055b6ead" 1333 - dependencies = [ 1334 - "darling_core 0.20.11", 1335 - "quote", 1336 - "syn 2.0.108", 1337 - ] 1338 - 1339 - [[package]] 1340 - name = "darling_macro" 1341 1342 version = "0.21.3" 1342 1343 source = "registry+https://github.com/rust-lang/crates.io-index" 1343 1344 checksum = "d38308df82d1080de0afee5d069fa14b0326a88c14f15c5ccda35b4a6c414c81" 1344 1345 dependencies = [ 1345 - "darling_core 0.21.3", 1346 + "darling_core", 1346 1347 "quote", 1347 1348 "syn 2.0.108", 1348 1349 ] ··· 1416 1417 ] 1417 1418 1418 1419 [[package]] 1420 + name = "delegate-display" 1421 + version = "3.0.0" 1422 + source = "registry+https://github.com/rust-lang/crates.io-index" 1423 + checksum = "9926686c832494164c33a36bf65118f4bd6e704000b58c94681bf62e9ad67a74" 1424 + dependencies = [ 1425 + "impartial-ord", 1426 + "itoa", 1427 + "macroific", 1428 + "proc-macro2", 1429 + "quote", 1430 + "syn 2.0.108", 1431 + ] 1432 + 1433 + [[package]] 1419 1434 name = "der" 1420 1435 version = "0.7.10" 1421 1436 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 1499 1514 1500 1515 [[package]] 1501 1516 name = "diesel" 1502 - version = "2.2.12" 1517 + version = "2.3.3" 1503 1518 source = "registry+https://github.com/rust-lang/crates.io-index" 1504 - checksum = "229850a212cd9b84d4f0290ad9d294afc0ae70fccaa8949dbe8b43ffafa1e20c" 1519 + checksum = "5e7624a3bb9fffd82fff016be9a7f163d20e5a89eb8d28f9daaa6b30fff37500" 1505 1520 dependencies = [ 1506 - "bitflags 2.10.0", 1507 - "byteorder", 1508 1521 "chrono", 1509 1522 "diesel_derives", 1510 - "itoa", 1523 + "downcast-rs 2.0.2", 1511 1524 "libsqlite3-sys", 1512 - "pq-sys", 1513 1525 "serde_json", 1526 + "sqlite-wasm-rs", 1514 1527 "time", 1515 1528 ] 1516 1529 1517 1530 [[package]] 1518 1531 name = "diesel-async" 1519 - version = "0.5.2" 1532 + version = "0.7.4" 1520 1533 source = "registry+https://github.com/rust-lang/crates.io-index" 1521 - checksum = "51a307ac00f7c23f526a04a77761a0519b9f0eb2838ebf5b905a58580095bdcb" 1534 + checksum = "13096fb8dae53f2d411c4b523bec85f45552ed3044a2ab4d85fb2092d9cb4f34" 1522 1535 dependencies = [ 1523 - "async-trait", 1524 1536 "deadpool", 1525 1537 "diesel", 1538 + "futures-core", 1526 1539 "futures-util", 1527 1540 "scoped-futures", 1528 1541 "tokio", 1529 - "tokio-postgres", 1530 1542 ] 1531 1543 1532 1544 [[package]] 1533 1545 name = "diesel_derives" 1534 - version = "2.2.7" 1546 + version = "2.3.4" 1535 1547 source = "registry+https://github.com/rust-lang/crates.io-index" 1536 - checksum = "1b96984c469425cb577bf6f17121ecb3e4fe1e81de5d8f780dd372802858d756" 1548 + checksum = "9daac6489a36e42570da165a10c424f3edcefdff70c5fd55e1847c23f3dd7562" 1537 1549 dependencies = [ 1538 1550 "diesel_table_macro_syntax", 1539 1551 "dsl_auto_type", ··· 1544 1556 1545 1557 [[package]] 1546 1558 name = "diesel_migrations" 1547 - version = "2.2.0" 1559 + version = "2.3.0" 1548 1560 source = "registry+https://github.com/rust-lang/crates.io-index" 1549 - checksum = "8a73ce704bad4231f001bff3314d91dce4aba0770cee8b233991859abc15c1f6" 1561 + checksum = "ee060f709c3e3b1cadd83fcd0f61711f7a8cf493348f758d3a1c1147d70b3c97" 1550 1562 dependencies = [ 1551 1563 "diesel", 1552 1564 "migrations_internals", ··· 1555 1567 1556 1568 [[package]] 1557 1569 name = "diesel_table_macro_syntax" 1558 - version = "0.2.0" 1570 + version = "0.3.0" 1559 1571 source = "registry+https://github.com/rust-lang/crates.io-index" 1560 - checksum = "209c735641a413bc68c4923a9d6ad4bcb3ca306b794edaa7eb0b3228a99ffb25" 1572 + checksum = "fe2444076b48641147115697648dc743c2c00b61adade0f01ce67133c7babe8c" 1561 1573 dependencies = [ 1562 1574 "syn 2.0.108", 1563 1575 ] ··· 2241 2253 "rustc-hash 2.1.1", 2242 2254 "send_wrapper", 2243 2255 "serde", 2244 - "serde-wasm-bindgen", 2256 + "serde-wasm-bindgen 0.6.5", 2245 2257 "serde_json", 2246 2258 "tracing", 2247 2259 "wasm-bindgen", ··· 2354 2366 checksum = "75b325c5dbd37f80359721ad39aca5a29fb04c89279657cffdda8736d0c0b9d2" 2355 2367 2356 2368 [[package]] 2369 + name = "downcast-rs" 2370 + version = "2.0.2" 2371 + source = "registry+https://github.com/rust-lang/crates.io-index" 2372 + checksum = "117240f60069e65410b3ae1bb213295bd828f707b5bec6596a1afc8793ce0cbc" 2373 + 2374 + [[package]] 2357 2375 name = "dpi" 2358 2376 version = "0.1.2" 2359 2377 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 2361 2379 2362 2380 [[package]] 2363 2381 name = "dsl_auto_type" 2364 - version = "0.1.3" 2382 + version = "0.2.0" 2365 2383 source = "registry+https://github.com/rust-lang/crates.io-index" 2366 - checksum = "139ae9aca7527f85f26dd76483eb38533fd84bd571065da1739656ef71c5ff5b" 2384 + checksum = "dd122633e4bef06db27737f21d3738fb89c8f6d5360d6d9d7635dda142a7757e" 2367 2385 dependencies = [ 2368 - "darling 0.20.11", 2386 + "darling", 2369 2387 "either", 2370 2388 "heck 0.5.0", 2371 2389 "proc-macro2", ··· 2488 2506 ] 2489 2507 2490 2508 [[package]] 2509 + name = "embedded-io" 2510 + version = "0.4.0" 2511 + source = "registry+https://github.com/rust-lang/crates.io-index" 2512 + checksum = "ef1a6892d9eef45c8fa6b9e0086428a2cca8491aca8f787c534a3d6d0bcb3ced" 2513 + 2514 + [[package]] 2515 + name = "embedded-io" 2516 + version = "0.6.1" 2517 + source = "registry+https://github.com/rust-lang/crates.io-index" 2518 + checksum = "edd0f118536f44f5ccd48bcb8b111bdc3de888b58c74639dfb034a357d0f206d" 2519 + 2520 + [[package]] 2491 2521 name = "encode_unicode" 2492 2522 version = "1.0.0" 2493 2523 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 2556 2586 source = "registry+https://github.com/rust-lang/crates.io-index" 2557 2587 checksum = "f43e744e4ea338060faee68ed933e46e722fb7f3617e722a5772d7e856d8b3ce" 2558 2588 dependencies = [ 2559 - "darling 0.21.3", 2589 + "darling", 2560 2590 "proc-macro2", 2561 2591 "quote", 2562 2592 "syn 2.0.108", ··· 2610 2640 ] 2611 2641 2612 2642 [[package]] 2613 - name = "fallible-iterator" 2614 - version = "0.2.0" 2615 - source = "registry+https://github.com/rust-lang/crates.io-index" 2616 - checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" 2617 - 2618 - [[package]] 2619 2643 name = "fancy-regex" 2620 2644 version = "0.16.2" 2621 2645 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 2624 2648 "bit-set", 2625 2649 "regex-automata", 2626 2650 "regex-syntax", 2651 + ] 2652 + 2653 + [[package]] 2654 + name = "fancy_constructor" 2655 + version = "2.1.0" 2656 + source = "registry+https://github.com/rust-lang/crates.io-index" 2657 + checksum = "28a27643a5d05f3a22f5afd6e0d0e6e354f92d37907006f97b84b9cb79082198" 2658 + dependencies = [ 2659 + "macroific", 2660 + "proc-macro2", 2661 + "quote", 2662 + "syn 2.0.108", 2627 2663 ] 2628 2664 2629 2665 [[package]] ··· 3361 3397 ] 3362 3398 3363 3399 [[package]] 3400 + name = "hash32" 3401 + version = "0.2.1" 3402 + source = "registry+https://github.com/rust-lang/crates.io-index" 3403 + checksum = "b0c35f58762feb77d74ebe43bdbc3210f09be9fe6742234d573bacc26ed92b67" 3404 + dependencies = [ 3405 + "byteorder", 3406 + ] 3407 + 3408 + [[package]] 3364 3409 name = "hashbrown" 3365 3410 version = "0.12.3" 3366 3411 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 3426 3471 checksum = "54b4a22553d4242c49fddb9ba998a99962b5cc6f22cb5a3482bec22522403ce4" 3427 3472 dependencies = [ 3428 3473 "http", 3474 + ] 3475 + 3476 + [[package]] 3477 + name = "heapless" 3478 + version = "0.7.17" 3479 + source = "registry+https://github.com/rust-lang/crates.io-index" 3480 + checksum = "cdc6457c0eb62c71aac4bc17216026d8410337c4126773b9c5daba343f17964f" 3481 + dependencies = [ 3482 + "atomic-polyfill", 3483 + "hash32", 3484 + "rustc_version", 3485 + "serde", 3486 + "spin 0.9.8", 3487 + "stable_deref_trait", 3429 3488 ] 3430 3489 3431 3490 [[package]] ··· 3830 3889 ] 3831 3890 3832 3891 [[package]] 3892 + name = "impartial-ord" 3893 + version = "1.0.6" 3894 + source = "registry+https://github.com/rust-lang/crates.io-index" 3895 + checksum = "0ab604ee7085efba6efc65e4ebca0e9533e3aff6cb501d7d77b211e3a781c6d5" 3896 + dependencies = [ 3897 + "proc-macro2", 3898 + "quote", 3899 + "syn 2.0.108", 3900 + ] 3901 + 3902 + [[package]] 3903 + name = "indexed_db_futures" 3904 + version = "0.6.4" 3905 + source = "registry+https://github.com/rust-lang/crates.io-index" 3906 + checksum = "69ff41758cbd104e91033bb53bc449bec7eea65652960c81eddf3fc146ecea19" 3907 + dependencies = [ 3908 + "accessory", 3909 + "cfg-if", 3910 + "delegate-display", 3911 + "derive_more 2.0.1", 3912 + "fancy_constructor", 3913 + "indexed_db_futures_macros_internal", 3914 + "js-sys", 3915 + "sealed", 3916 + "smallvec", 3917 + "thiserror 2.0.17", 3918 + "tokio", 3919 + "wasm-bindgen", 3920 + "wasm-bindgen-futures", 3921 + "web-sys", 3922 + ] 3923 + 3924 + [[package]] 3925 + name = "indexed_db_futures_macros_internal" 3926 + version = "1.0.0" 3927 + source = "registry+https://github.com/rust-lang/crates.io-index" 3928 + checksum = "caeba94923b68f254abef921cea7e7698bf4675fdd89d7c58bf1ed885b49a27d" 3929 + dependencies = [ 3930 + "macroific", 3931 + "proc-macro2", 3932 + "quote", 3933 + "syn 2.0.108", 3934 + ] 3935 + 3936 + [[package]] 3833 3937 name = "indexmap" 3834 3938 version = "1.9.3" 3835 3939 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 4442 4546 source = "registry+https://github.com/rust-lang/crates.io-index" 4443 4547 checksum = "133c182a6a2c87864fe97778797e46c7e999672690dc9fa3ee8e241aa4a9c13f" 4444 4548 dependencies = [ 4549 + "cc", 4445 4550 "pkg-config", 4446 4551 "vcpkg", 4447 4552 ] ··· 4565 4670 ] 4566 4671 4567 4672 [[package]] 4673 + name = "macroific" 4674 + version = "2.0.0" 4675 + source = "registry+https://github.com/rust-lang/crates.io-index" 4676 + checksum = "89f276537b4b8f981bf1c13d79470980f71134b7bdcc5e6e911e910e556b0285" 4677 + dependencies = [ 4678 + "macroific_attr_parse", 4679 + "macroific_core", 4680 + "macroific_macro", 4681 + ] 4682 + 4683 + [[package]] 4684 + name = "macroific_attr_parse" 4685 + version = "2.0.0" 4686 + source = "registry+https://github.com/rust-lang/crates.io-index" 4687 + checksum = "ad4023761b45fcd36abed8fb7ae6a80456b0a38102d55e89a57d9a594a236be9" 4688 + dependencies = [ 4689 + "proc-macro2", 4690 + "quote", 4691 + "sealed", 4692 + "syn 2.0.108", 4693 + ] 4694 + 4695 + [[package]] 4696 + name = "macroific_core" 4697 + version = "2.0.0" 4698 + source = "registry+https://github.com/rust-lang/crates.io-index" 4699 + checksum = "d0a7594d3c14916fa55bef7e9d18c5daa9ed410dd37504251e4b75bbdeec33e3" 4700 + dependencies = [ 4701 + "proc-macro2", 4702 + "quote", 4703 + "sealed", 4704 + "syn 2.0.108", 4705 + ] 4706 + 4707 + [[package]] 4708 + name = "macroific_macro" 4709 + version = "2.0.0" 4710 + source = "registry+https://github.com/rust-lang/crates.io-index" 4711 + checksum = "4da6f2ed796261b0a74e2b52b42c693bb6dee1effba3a482c49592659f824b3b" 4712 + dependencies = [ 4713 + "macroific_attr_parse", 4714 + "macroific_core", 4715 + "proc-macro2", 4716 + "quote", 4717 + "syn 2.0.108", 4718 + ] 4719 + 4720 + [[package]] 4568 4721 name = "malloc_buf" 4569 4722 version = "0.0.6" 4570 4723 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 4712 4865 checksum = "47e1ffaa40ddd1f3ed91f717a33c8c0ee23fff369e3aa8772b9605cc1d22f4c3" 4713 4866 4714 4867 [[package]] 4715 - name = "md-5" 4716 - version = "0.10.6" 4717 - source = "registry+https://github.com/rust-lang/crates.io-index" 4718 - checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf" 4719 - dependencies = [ 4720 - "cfg-if", 4721 - "digest", 4722 - ] 4723 - 4724 - [[package]] 4725 4868 name = "mediatype" 4726 4869 version = "0.19.20" 4727 4870 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 4819 4962 4820 4963 [[package]] 4821 4964 name = "migrations_internals" 4822 - version = "2.2.1" 4965 + version = "2.3.0" 4823 4966 source = "registry+https://github.com/rust-lang/crates.io-index" 4824 - checksum = "3bda1634d70d5bd53553cf15dca9842a396e8c799982a3ad22998dc44d961f24" 4967 + checksum = "36c791ecdf977c99f45f23280405d7723727470f6689a5e6dbf513ac547ae10d" 4825 4968 dependencies = [ 4826 4969 "serde", 4827 4970 "toml 0.9.8", ··· 4829 4972 4830 4973 [[package]] 4831 4974 name = "migrations_macros" 4832 - version = "2.2.0" 4975 + version = "2.3.0" 4833 4976 source = "registry+https://github.com/rust-lang/crates.io-index" 4834 - checksum = "ffb161cc72176cb37aa47f1fc520d3ef02263d67d661f44f05d05a079e1237fd" 4977 + checksum = "36fc5ac76be324cfd2d3f2cf0fdf5d5d3c4f14ed8aaebadb09e304ba42282703" 4835 4978 dependencies = [ 4836 4979 "migrations_internals", 4837 4980 "proc-macro2", ··· 5588 5731 ] 5589 5732 5590 5733 [[package]] 5591 - name = "phf" 5592 - version = "0.13.1" 5593 - source = "registry+https://github.com/rust-lang/crates.io-index" 5594 - checksum = "c1562dc717473dbaa4c1f85a36410e03c047b2e7df7f45ee938fbef64ae7fadf" 5595 - dependencies = [ 5596 - "phf_shared 0.13.1", 5597 - "serde", 5598 - ] 5599 - 5600 - [[package]] 5601 5734 name = "phf_codegen" 5602 5735 version = "0.8.0" 5603 5736 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 5689 5822 ] 5690 5823 5691 5824 [[package]] 5692 - name = "phf_shared" 5693 - version = "0.13.1" 5694 - source = "registry+https://github.com/rust-lang/crates.io-index" 5695 - checksum = "e57fef6bc5981e38c2ce2d63bfa546861309f875b8a75f092d1d54ae2d64f266" 5696 - dependencies = [ 5697 - "siphasher 1.0.1", 5698 - ] 5699 - 5700 - [[package]] 5701 5825 name = "pin-project" 5702 5826 version = "1.1.10" 5703 5827 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 5789 5913 checksum = "2f3a9f18d041e6d0e102a0a46750538147e5e8992d3b4873aaafee2520b00ce3" 5790 5914 5791 5915 [[package]] 5792 - name = "postgres-protocol" 5793 - version = "0.6.9" 5794 - source = "registry+https://github.com/rust-lang/crates.io-index" 5795 - checksum = "fbef655056b916eb868048276cfd5d6a7dea4f81560dfd047f97c8c6fe3fcfd4" 5796 - dependencies = [ 5797 - "base64 0.22.1", 5798 - "byteorder", 5799 - "bytes", 5800 - "fallible-iterator", 5801 - "hmac", 5802 - "md-5", 5803 - "memchr", 5804 - "rand 0.9.2", 5805 - "sha2", 5806 - "stringprep", 5807 - ] 5808 - 5809 - [[package]] 5810 - name = "postgres-types" 5811 - version = "0.2.11" 5916 + name = "postcard" 5917 + version = "1.1.3" 5812 5918 source = "registry+https://github.com/rust-lang/crates.io-index" 5813 - checksum = "ef4605b7c057056dd35baeb6ac0c0338e4975b1f2bef0f65da953285eb007095" 5919 + checksum = "6764c3b5dd454e283a30e6dfe78e9b31096d9e32036b5d1eaac7a6119ccb9a24" 5814 5920 dependencies = [ 5815 - "bytes", 5816 - "fallible-iterator", 5817 - "postgres-protocol", 5921 + "cobs", 5922 + "embedded-io 0.4.0", 5923 + "embedded-io 0.6.1", 5924 + "heapless", 5925 + "serde", 5818 5926 ] 5819 5927 5820 5928 [[package]] ··· 5839 5947 checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" 5840 5948 dependencies = [ 5841 5949 "zerocopy", 5842 - ] 5843 - 5844 - [[package]] 5845 - name = "pq-sys" 5846 - version = "0.7.5" 5847 - source = "registry+https://github.com/rust-lang/crates.io-index" 5848 - checksum = "574ddd6a267294433f140b02a726b0640c43cf7c6f717084684aaa3b285aba61" 5849 - dependencies = [ 5850 - "libc", 5851 - "pkg-config", 5852 - "vcpkg", 5853 5950 ] 5854 5951 5855 5952 [[package]] ··· 6582 6679 checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" 6583 6680 6584 6681 [[package]] 6682 + name = "sealed" 6683 + version = "0.6.0" 6684 + source = "registry+https://github.com/rust-lang/crates.io-index" 6685 + checksum = "22f968c5ea23d555e670b449c1c5e7b2fc399fdaec1d304a17cd48e288abc107" 6686 + dependencies = [ 6687 + "proc-macro2", 6688 + "quote", 6689 + "syn 2.0.108", 6690 + ] 6691 + 6692 + [[package]] 6585 6693 name = "sec1" 6586 6694 version = "0.7.3" 6587 6695 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 6697 6805 6698 6806 [[package]] 6699 6807 name = "serde-wasm-bindgen" 6808 + version = "0.4.5" 6809 + source = "registry+https://github.com/rust-lang/crates.io-index" 6810 + checksum = "e3b4c031cd0d9014307d82b8abf653c0290fbdaeb4c02d00c63cf52f728628bf" 6811 + dependencies = [ 6812 + "js-sys", 6813 + "serde", 6814 + "wasm-bindgen", 6815 + ] 6816 + 6817 + [[package]] 6818 + name = "serde-wasm-bindgen" 6700 6819 version = "0.6.5" 6701 6820 source = "registry+https://github.com/rust-lang/crates.io-index" 6702 6821 checksum = "8302e169f0eddcc139c70f139d19d6467353af16f9fce27e8c30158036a1e16b" ··· 6863 6982 source = "registry+https://github.com/rust-lang/crates.io-index" 6864 6983 checksum = "b91a903660542fced4e99881aa481bdbaec1634568ee02e0b8bd57c64cb38955" 6865 6984 dependencies = [ 6866 - "darling 0.21.3", 6985 + "darling", 6867 6986 "proc-macro2", 6868 6987 "quote", 6869 6988 "syn 2.0.108", ··· 7097 7216 version = "0.9.8" 7098 7217 source = "registry+https://github.com/rust-lang/crates.io-index" 7099 7218 checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" 7219 + dependencies = [ 7220 + "lock_api", 7221 + ] 7100 7222 7101 7223 [[package]] 7102 7224 name = "spin" ··· 7115 7237 ] 7116 7238 7117 7239 [[package]] 7240 + name = "sqlite-wasm-rs" 7241 + version = "0.4.6" 7242 + source = "registry+https://github.com/rust-lang/crates.io-index" 7243 + checksum = "54e4348c16a3d2e2a45437eff67efc5462b60443de76f61b5d0ed9111c626d9d" 7244 + dependencies = [ 7245 + "cc", 7246 + "indexed_db_futures", 7247 + "js-sys", 7248 + "once_cell", 7249 + "thiserror 2.0.17", 7250 + "tokio", 7251 + "wasm-bindgen", 7252 + "wasm-bindgen-futures", 7253 + "web-sys", 7254 + ] 7255 + 7256 + [[package]] 7118 7257 name = "stable_deref_trait" 7119 7258 version = "1.2.1" 7120 7259 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 7169 7308 "phf_shared 0.11.3", 7170 7309 "proc-macro2", 7171 7310 "quote", 7172 - ] 7173 - 7174 - [[package]] 7175 - name = "stringprep" 7176 - version = "0.1.5" 7177 - source = "registry+https://github.com/rust-lang/crates.io-index" 7178 - checksum = "7b4df3d392d81bd458a8a621b8bffbd2302a12ffe288a9d931670948749463b1" 7179 - dependencies = [ 7180 - "unicode-bidi", 7181 - "unicode-normalization", 7182 - "unicode-properties", 7183 7311 ] 7184 7312 7185 7313 [[package]] ··· 7618 7746 ] 7619 7747 7620 7748 [[package]] 7621 - name = "tokio-postgres" 7622 - version = "0.7.15" 7623 - source = "registry+https://github.com/rust-lang/crates.io-index" 7624 - checksum = "2b40d66d9b2cfe04b628173409368e58247e8eddbbd3b0e6c6ba1d09f20f6c9e" 7625 - dependencies = [ 7626 - "async-trait", 7627 - "byteorder", 7628 - "bytes", 7629 - "fallible-iterator", 7630 - "futures-channel", 7631 - "futures-util", 7632 - "log", 7633 - "parking_lot", 7634 - "percent-encoding", 7635 - "phf 0.13.1", 7636 - "pin-project-lite", 7637 - "postgres-protocol", 7638 - "postgres-types", 7639 - "rand 0.9.2", 7640 - "socket2 0.6.1", 7641 - "tokio", 7642 - "tokio-util", 7643 - "whoami", 7644 - ] 7645 - 7646 - [[package]] 7647 7749 name = "tokio-rustls" 7648 7750 version = "0.26.4" 7649 7751 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 7758 7860 source = "registry+https://github.com/rust-lang/crates.io-index" 7759 7861 checksum = "f0dc8b1fb61449e27716ec0e1bdf0f6b8f3e8f6b05391e8497b8b6d7804ea6d8" 7760 7862 dependencies = [ 7761 - "indexmap 2.12.0", 7762 7863 "serde_core", 7763 7864 "serde_spanned 1.0.3", 7764 7865 "toml_datetime 0.7.3", 7765 7866 "toml_parser", 7766 - "toml_writer", 7767 7867 "winnow 0.7.13", 7768 7868 ] 7769 7869 ··· 7847 7947 version = "0.1.2" 7848 7948 source = "registry+https://github.com/rust-lang/crates.io-index" 7849 7949 checksum = "5d99f8c9a7727884afe522e9bd5edbfc91a3312b36a77b5fb8926e4c31a41801" 7850 - 7851 - [[package]] 7852 - name = "toml_writer" 7853 - version = "1.0.4" 7854 - source = "registry+https://github.com/rust-lang/crates.io-index" 7855 - checksum = "df8b2b54733674ad286d16267dcfc7a71ed5c776e4ac7aa3c3e2561f7c637bf2" 7856 7950 7857 7951 [[package]] 7858 7952 name = "tower" ··· 8169 8263 checksum = "75b844d17643ee918803943289730bec8aac480150456169e647ed0b576ba539" 8170 8264 8171 8265 [[package]] 8172 - name = "unicode-bidi" 8173 - version = "0.3.18" 8174 - source = "registry+https://github.com/rust-lang/crates.io-index" 8175 - checksum = "5c1cb5db39152898a79168971543b1cb5020dff7fe43c8dc468b0885f5e29df5" 8176 - 8177 - [[package]] 8178 8266 name = "unicode-ident" 8179 8267 version = "1.0.22" 8180 8268 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 8194 8282 dependencies = [ 8195 8283 "tinyvec", 8196 8284 ] 8197 - 8198 - [[package]] 8199 - name = "unicode-properties" 8200 - version = "0.1.4" 8201 - source = "registry+https://github.com/rust-lang/crates.io-index" 8202 - checksum = "7df058c713841ad818f1dc5d3fd88063241cc61f49f5fbea4b951e8cf5a8d71d" 8203 8285 8204 8286 [[package]] 8205 8287 name = "unicode-segmentation" ··· 8372 8454 ] 8373 8455 8374 8456 [[package]] 8375 - name = "wasite" 8376 - version = "0.1.0" 8377 - source = "registry+https://github.com/rust-lang/crates.io-index" 8378 - checksum = "b8dad83b4f25e74f184f64c43b150b91efe7647395b42289f38e50566d82855b" 8379 - 8380 - [[package]] 8381 8457 name = "wasm-bindgen" 8382 8458 version = "0.2.105" 8383 8459 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 8449 8525 ] 8450 8526 8451 8527 [[package]] 8528 + name = "wasmworker" 8529 + version = "0.1.2" 8530 + source = "registry+https://github.com/rust-lang/crates.io-index" 8531 + checksum = "7eed1ad2b2f62d7ddc472e56bce6416d6eef60631a4d217d4f96f4c3f322dd49" 8532 + dependencies = [ 8533 + "futures", 8534 + "js-sys", 8535 + "postcard", 8536 + "send_wrapper", 8537 + "serde", 8538 + "serde-wasm-bindgen 0.4.5", 8539 + "serde_bytes", 8540 + "thiserror 2.0.17", 8541 + "tokio", 8542 + "wasm-bindgen", 8543 + "wasm-bindgen-futures", 8544 + "web-sys", 8545 + ] 8546 + 8547 + [[package]] 8548 + name = "wasmworker-proc-macro" 8549 + version = "0.1.0" 8550 + source = "registry+https://github.com/rust-lang/crates.io-index" 8551 + checksum = "ffd01f29024361dcb5b54f50b4cfe8d56ecac0ece515f52e7756e979b9a43c2d" 8552 + dependencies = [ 8553 + "quote", 8554 + "syn 2.0.108", 8555 + ] 8556 + 8557 + [[package]] 8452 8558 name = "wayland-backend" 8453 8559 version = "0.3.11" 8454 8560 source = "registry+https://github.com/rust-lang/crates.io-index" 8455 8561 checksum = "673a33c33048a5ade91a6b139580fa174e19fb0d23f396dca9fa15f2e1e49b35" 8456 8562 dependencies = [ 8457 8563 "cc", 8458 - "downcast-rs", 8564 + "downcast-rs 1.2.1", 8459 8565 "rustix", 8460 8566 "scoped-tls", 8461 8567 "smallvec", ··· 8532 8638 "chrono", 8533 8639 "console_error_panic_hook", 8534 8640 "dashmap", 8641 + "diesel", 8642 + "diesel_migrations", 8535 8643 "dioxus", 8536 8644 "dioxus-primitives", 8537 8645 "jacquard", ··· 8541 8649 "mini-moka", 8542 8650 "n0-future", 8543 8651 "serde_json", 8652 + "sqlite-wasm-rs", 8544 8653 "time", 8545 8654 "weaver-api", 8546 8655 "weaver-common", ··· 8572 8681 name = "weaver-common" 8573 8682 version = "0.1.0" 8574 8683 dependencies = [ 8684 + "futures-util", 8575 8685 "http", 8576 8686 "jacquard", 8577 8687 "jacquard-common", 8688 + "js-sys", 8578 8689 "markdown-weaver", 8579 8690 "markdown-weaver-escape", 8580 8691 "miette 7.6.0", ··· 8582 8693 "minijinja", 8583 8694 "n0-future", 8584 8695 "owo-colors", 8696 + "pin-project", 8585 8697 "regex", 8586 8698 "reqwest", 8699 + "send_wrapper", 8587 8700 "serde", 8588 8701 "serde_bytes", 8589 8702 "serde_html_form", ··· 8593 8706 "tokio", 8594 8707 "tracing", 8595 8708 "trait-variant", 8709 + "wasm-bindgen", 8710 + "wasm-bindgen-futures", 8711 + "wasmworker", 8712 + "wasmworker-proc-macro", 8596 8713 "weaver-api", 8714 + "web-time", 8597 8715 ] 8598 8716 8599 8717 [[package]] ··· 8608 8726 "diesel-async", 8609 8727 "diesel_migrations", 8610 8728 "dotenvy", 8729 + "futures-util", 8611 8730 "hyper", 8612 8731 "jacquard", 8613 8732 "jacquard-api", 8614 8733 "jacquard-axum", 8615 8734 "jose", 8616 8735 "jose-jwk", 8736 + "js-sys", 8737 + "libsqlite3-sys", 8617 8738 "miette 7.6.0", 8618 8739 "minijinja", 8619 8740 "minijinja-contrib", 8741 + "pin-project", 8620 8742 "reqwest", 8743 + "send_wrapper", 8621 8744 "serde", 8622 8745 "serde_json", 8623 8746 "thiserror 2.0.17", ··· 8631 8754 "tracing-subscriber", 8632 8755 "url", 8633 8756 "uuid", 8757 + "wasm-bindgen", 8758 + "wasm-bindgen-futures", 8759 + "wasmworker", 8760 + "wasmworker-proc-macro", 8634 8761 "weaver-common", 8762 + "web-time", 8635 8763 ] 8636 8764 8637 8765 [[package]] ··· 8820 8948 "thiserror 2.0.17", 8821 8949 "windows", 8822 8950 "windows-core 0.61.2", 8823 - ] 8824 - 8825 - [[package]] 8826 - name = "whoami" 8827 - version = "1.6.1" 8828 - source = "registry+https://github.com/rust-lang/crates.io-index" 8829 - checksum = "5d4a4db5077702ca3015d3d02d74974948aba2ad9e12ab7df718ee64ccd7e97d" 8830 - dependencies = [ 8831 - "libredox", 8832 - "wasite", 8833 - "web-sys", 8834 8951 ] 8835 8952 8836 8953 [[package]]
+9
crates/weaver-app/Cargo.toml
··· 32 32 chrono = { version = "0.4" } 33 33 serde_json = "1.0" 34 34 35 + diesel = { version = "2.3", features = ["sqlite", "returning_clauses_for_sqlite_3_35", "chrono", "serde_json"] } 36 + diesel_migrations = { version = "2.3", features = ["sqlite"] } 37 + 38 + 39 + [target.'cfg(all(target_family = "wasm", target_os = "unknown"))'.dependencies] 40 + sqlite-wasm-rs = { version = "0.4", features = ["relaxed-idb"] } 41 + 42 + 43 + 35 44 [target.'cfg(target_arch = "wasm32")'.dependencies] 36 45 time = { version = "0.3", features = ["wasm-bindgen"] } 37 46 console_error_panic_hook = "0.1"
+9
crates/weaver-app/diesel.toml
··· 1 + # For documentation on how to configure this file, 2 + # see https://diesel.rs/guides/configuring-diesel-cli 3 + 4 + [print_schema] 5 + file = "src/schema.rs" 6 + custom_type_derives = ["diesel::query_builder::QueryId", "Clone", "std::fmt::Debug", "jacquard::IntoStatic"] 7 + 8 + [migrations_directory] 9 + dir = "/home/orual/Projects/weaver.sh/crates/weaver-app/migrations"
+13
crates/weaver-common/Cargo.toml
··· 50 50 markdown-weaver-escape = { workspace = true, features = ["std"] } 51 51 mime-sniffer = "^0.1" 52 52 53 + # wasm-in-browser dependencies 54 + [target.'cfg(all(target_family = "wasm", target_os = "unknown"))'.dependencies] 55 + futures-util = "0.3" 56 + js-sys = "0.3" 57 + pin-project = "1" 58 + wasm-bindgen = "0.2" 59 + wasm-bindgen-futures = "0.4" 60 + web-time = "1" 61 + send_wrapper = "0.6" 62 + wasmworker = "0.1" 63 + wasmworker-proc-macro = "0.1" 64 + 65 + 53 66 54 67 [dev-dependencies] 55 68 tokio = { version = "1", features = ["macros", "rt"] }
+1
crates/weaver-common/src/lib.rs
··· 3 3 pub mod constellation; 4 4 pub mod error; 5 5 pub mod view; 6 + pub mod worker_rt; 6 7 7 8 // Re-export jacquard for convenience 8 9 pub use jacquard;
+1
crates/weaver-common/src/worker_rt.rs
··· 1 + pub struct Runtime {}
+18 -3
crates/weaver-index/Cargo.toml
··· 50 50 miette = { workspace = true, features = ["fancy", "syntect-highlighter"] } 51 51 thiserror = { workspace = true } 52 52 53 - diesel = { version = "2.2.0", features = ["postgres", "serde_json","chrono"] } 54 - diesel-async = { version = "0.5.2", features = ["postgres", "deadpool"] } 55 - diesel_migrations = "2.2.0" 53 + diesel = { version = "2.3.0", features = ["sqlite", "serde_json", "chrono", "returning_clauses_for_sqlite_3_35"] } 54 + diesel-async = { version = "0.7", features = ["sqlite", "deadpool"] } 55 + diesel_migrations = "2.3.0" 56 + 57 + libsqlite3-sys = {version = ">=0.30.1,<0.36.0", features = ["bundled"] } 56 58 57 59 toml = { version = "0.8.22", features = ["preserve_order"] } 58 60 jose = { version = "0.0.2", features = ["crypto-rustcrypto"] } ··· 62 64 minijinja = { version = "2.9.0" } 63 65 minijinja-contrib = { version = "2.9.0" } 64 66 dashmap = "6.1.0" 67 + 68 + 69 + # wasm-in-browser dependencies 70 + [target.'cfg(all(target_family = "wasm", target_os = "unknown"))'.dependencies] 71 + futures-util = "0.3" 72 + js-sys = "0.3" 73 + pin-project = "1" 74 + wasm-bindgen = "0.2" 75 + wasm-bindgen-futures = "0.4" 76 + web-time = "1" 77 + send_wrapper = "0.6" 78 + wasmworker = "0.1" 79 + wasmworker-proc-macro = "0.1"
+4 -2
crates/weaver-index/diesel.toml
··· 3 3 4 4 [print_schema] 5 5 file = "src/schema.rs" 6 - custom_type_derives = ["diesel::query_builder::QueryId", "Clone"] 6 + custom_type_derives = ["diesel::query_builder::QueryId", "Clone", "std::fmt::Debug", "jacquard::IntoStatic"] 7 + patch_file = "src/schema.patch" 8 + 7 9 8 10 [migrations_directory] 9 - dir = "/home/orual/Projects/weaver.sh/crates/weaver-appview/migrations" 11 + dir = "/home/orual/Projects/weaver.sh/crates/weaver-index/migrations"
-6
crates/weaver-index/migrations/00000000000000_diesel_initial_setup/down.sql
··· 1 - -- This file was automatically created by Diesel to setup helper functions 2 - -- and other internal bookkeeping. This file is safe to edit, any future 3 - -- changes will be added to existing projects as new migrations. 4 - 5 - DROP FUNCTION IF EXISTS diesel_manage_updated_at(_tbl regclass); 6 - DROP FUNCTION IF EXISTS diesel_set_updated_at();
-36
crates/weaver-index/migrations/00000000000000_diesel_initial_setup/up.sql
··· 1 - -- This file was automatically created by Diesel to setup helper functions 2 - -- and other internal bookkeeping. This file is safe to edit, any future 3 - -- changes will be added to existing projects as new migrations. 4 - 5 - 6 - 7 - 8 - -- Sets up a trigger for the given table to automatically set a column called 9 - -- `updated_at` whenever the row is modified (unless `updated_at` was included 10 - -- in the modified columns) 11 - -- 12 - -- # Example 13 - -- 14 - -- ```sql 15 - -- CREATE TABLE users (id SERIAL PRIMARY KEY, updated_at TIMESTAMP NOT NULL DEFAULT NOW()); 16 - -- 17 - -- SELECT diesel_manage_updated_at('users'); 18 - -- ``` 19 - CREATE OR REPLACE FUNCTION diesel_manage_updated_at(_tbl regclass) RETURNS VOID AS $$ 20 - BEGIN 21 - EXECUTE format('CREATE TRIGGER set_updated_at BEFORE UPDATE ON %s 22 - FOR EACH ROW EXECUTE PROCEDURE diesel_set_updated_at()', _tbl); 23 - END; 24 - $$ LANGUAGE plpgsql; 25 - 26 - CREATE OR REPLACE FUNCTION diesel_set_updated_at() RETURNS trigger AS $$ 27 - BEGIN 28 - IF ( 29 - NEW IS DISTINCT FROM OLD AND 30 - NEW.updated_at IS NOT DISTINCT FROM OLD.updated_at 31 - ) THEN 32 - NEW.updated_at := current_timestamp; 33 - END IF; 34 - RETURN NEW; 35 - END; 36 - $$ LANGUAGE plpgsql;
+32 -44
crates/weaver-index/migrations/2025-05-15-230036_create_appviewdb/up.sql
··· 1 1 create table if not exists registrations ( 2 - id serial primary key, 2 + id integer not null primary key autoincrement, 3 3 domain text not null unique, 4 4 did text not null, 5 5 secret text not null, 6 - created timestamp 7 - with 8 - time zone not null default (now () at time zone 'utc'), 9 - registered text 6 + created timestamp not null default (datetime('now')), 7 + registered text 10 8 ); 11 9 12 10 create table if not exists public_keys ( 13 - id serial primary key, 11 + id integer not null primary key autoincrement, 14 12 did text not null, 15 13 name text not null, 16 14 key_contents text not null, 17 15 rkey text not null, 18 - created timestamp 19 - with 20 - time zone not null default (now () at time zone 'utc'), 21 - unique (did, name, key_contents) 16 + created timestamp not null default (datetime('now')), 17 + unique (did, name, key_contents) 22 18 ); 23 19 24 20 create table if not exists follows ( 25 21 user_did text not null, 26 22 subject_did text not null, 27 23 rkey text not null, 28 - followed_at timestamp 29 - with 30 - time zone not null default (now () at time zone 'utc'), 31 - primary key (user_did, subject_did), 24 + followed_at timestamp not null default (datetime('now')), 25 + primary key (user_did, subject_did), 32 26 check (user_did <> subject_did) 33 27 ); 34 28 35 29 create table if not exists _jetstream ( 36 - id serial primary key, 30 + id integer not null primary key autoincrement, 37 31 last_time_us integer not null 38 32 ); 39 33 40 34 create table if not exists emails ( 41 - id serial primary key, 35 + id integer not null primary key autoincrement, 42 36 did text not null, 43 37 email text not null, 44 - verified integer not null default 0, 38 + verified boolean not null default false, 45 39 verification_code text not null, 46 - last_sent timestamp 47 - with 48 - time zone not null default (now () at time zone 'utc'), 49 - is_primary integer not null default 0, 50 - created timestamp 51 - with 52 - time zone not null default (now () at time zone 'utc'), 53 - unique (did, email) 40 + last_sent timestamp not null default (datetime('now')), 41 + is_primary boolean not null default false, 42 + created timestamp not null default (datetime('now')), 43 + unique (did, email) 54 44 ); 55 45 56 46 create table if not exists profile ( 57 47 -- id 58 - id serial primary key, 48 + id integer not null primary key autoincrement, 59 49 did text not null, 60 50 -- data 61 51 avatar text, ··· 63 53 include_bluesky boolean not null default false, 64 54 include_tangled boolean not null default false, 65 55 location text, 66 - pinned_post jsonb, 67 - created_at timestamp 68 - with 69 - time zone default (now () at time zone 'utc'), 70 - -- constraints 71 - unique (did) 56 + pinned_post text, 57 + created_at timestamp default (datetime('now')), 58 + -- constraints 59 + unique (did) 72 60 ); 73 61 74 62 create table if not exists profile_links ( 75 63 -- id 76 - id serial primary key, 64 + id integer not null primary key autoincrement, 77 65 did text not null, 78 66 -- data 79 67 link text not null, ··· 83 71 84 72 create table if not exists profile_pronouns ( 85 73 -- id 86 - id serial primary key, 74 + id integer not null primary key autoincrement, 87 75 did text not null, 88 76 -- data 89 77 pronoun text not null, ··· 93 81 94 82 -- OAuth sessions table for jacquard ClientSessionData 95 83 create table if not exists oauth_sessions ( 96 - id serial primary key, 84 + id integer not null primary key autoincrement, 97 85 -- Extracted from ClientSessionData for indexing 98 86 did text not null, 99 87 session_id text not null, 100 - -- Full ClientSessionData as jsonb 101 - session_data jsonb not null, 102 - created_at timestamp with time zone not null default (now() at time zone 'utc'), 103 - updated_at timestamp with time zone not null default (now() at time zone 'utc'), 88 + -- Full ClientSessionData as JSON 89 + session_data blob not null, 90 + created_at timestamp not null default (datetime('now')), 91 + updated_at timestamp not null default (datetime('now')), 104 92 unique (did, session_id) 105 93 ); 106 94 107 95 -- OAuth authorization requests table for jacquard AuthRequestData 108 96 create table if not exists oauth_auth_requests ( 109 - id serial primary key, 97 + id integer not null primary key autoincrement, 110 98 -- Extracted from AuthRequestData for indexing 111 99 state text not null unique, 112 100 -- Optional DID if known at auth request time 113 101 account_did text, 114 - -- Full AuthRequestData as jsonb 115 - auth_req_data jsonb not null, 116 - created_at timestamp with time zone not null default (now() at time zone 'utc'), 117 - expires_at timestamp with time zone not null default ((now() at time zone 'utc') + interval '10 minutes') 102 + -- Full AuthRequestData as JSON 103 + auth_req_data blob not null, 104 + created_at timestamp not null default (datetime('now')), 105 + expires_at timestamp not null default (datetime('now', '+10 minutes')) 118 106 ); 119 107 120 108 -- Index for quick session lookups
+8 -4
crates/weaver-index/src/db.rs
··· 4 4 use diesel_async::RunQueryDsl; 5 5 use diesel_async::pooled_connection::AsyncDieselConnectionManager; 6 6 use diesel_async::pooled_connection::deadpool::Pool; 7 + use diesel_async::sync_connection_wrapper::SyncConnectionWrapper; 7 8 8 9 #[derive(Clone)] 9 10 pub struct Db { 10 - pub pool: Pool<diesel_async::AsyncPgConnection>, 11 + pub pool: Pool<SyncConnectionWrapper<SqliteConnection>>, 11 12 } 12 13 13 14 impl Db { ··· 20 21 } else { 21 22 std::env::var("DATABASE_URL").expect("DATABASE_URL must be set") 22 23 }; 23 - let config = 24 - AsyncDieselConnectionManager::<diesel_async::AsyncPgConnection>::new(database_url); 24 + let config = AsyncDieselConnectionManager::<SyncConnectionWrapper<SqliteConnection>>::new( 25 + database_url, 26 + ); 25 27 let pool = Pool::builder(config) 26 28 .build() 27 29 .expect("Failed to create pool"); ··· 37 39 } else { 38 40 std::env::var("DATABASE_URL").expect("DATABASE_URL must be set") 39 41 }; 40 - let mut connection = PgConnection::establish(&database_url) 42 + let mut connection = SqliteConnection::establish(&database_url) 41 43 .unwrap_or_else(|_| panic!("Error connecting to {}", database_url)); 42 44 // This will run the necessary migrations. 43 45 // ··· 57 59 } 58 60 Ok(()) 59 61 } 62 + 63 + pub struct Runtime;
-2
crates/weaver-index/src/main.rs
··· 14 14 use clap::Parser; 15 15 use config::*; 16 16 use db::*; 17 - use diesel::prelude::*; 18 - use diesel_async::{AsyncConnection, AsyncPgConnection, RunQueryDsl}; 19 17 use dotenvy::dotenv; 20 18 use miette::IntoDiagnostic; 21 19 use miette::miette;
+19 -18
crates/weaver-index/src/models.rs
··· 1 - use chrono::{DateTime, Utc}; 1 + use chrono::NaiveDateTime; 2 2 use diesel::prelude::*; 3 + use jacquard::CowStr; 3 4 4 5 #[derive(Queryable, Selectable)] 5 6 #[diesel(table_name = crate::schema::profile)] ··· 12 13 pub include_tangled: bool, 13 14 pub location: Option<String>, 14 15 pub pinned_post: Option<serde_json::Value>, 15 - pub created_at: Option<DateTime<Utc>>, 16 + pub created_at: Option<NaiveDateTime>, 16 17 } 17 18 18 19 #[derive(Queryable, Selectable)] ··· 22 23 pub domain: String, 23 24 pub did: String, 24 25 pub secret: String, 25 - pub created: DateTime<Utc>, 26 + pub created: NaiveDateTime, 26 27 pub registered: Option<String>, 27 28 } 28 29 29 30 #[derive(Queryable, Selectable)] 30 31 #[diesel(table_name = crate::schema::public_keys)] 31 - pub struct PublicKey { 32 + pub struct PublicKey<'a> { 32 33 pub id: i32, 33 - pub did: String, 34 + pub did: CowStr<'a>, 34 35 pub name: String, 35 36 pub key_contents: String, 36 37 pub rkey: String, 37 - pub created: DateTime<Utc>, 38 + pub created: NaiveDateTime, 38 39 } 39 40 40 41 #[derive(Queryable, Selectable)] ··· 43 44 pub user_did: String, 44 45 pub subject_did: String, 45 46 pub rkey: String, 46 - pub followed_at: DateTime<Utc>, 47 + pub followed_at: NaiveDateTime, 47 48 } 48 49 49 50 #[derive(Queryable, Selectable)] ··· 59 60 pub id: i32, 60 61 pub did: String, 61 62 pub email: String, 62 - pub verified: i32, 63 + pub verified: bool, 63 64 pub verification_code: String, 64 - pub last_sent: DateTime<Utc>, 65 - pub is_primary: i32, 66 - pub created: DateTime<Utc>, 65 + pub last_sent: NaiveDateTime, 66 + pub is_primary: bool, 67 + pub created: NaiveDateTime, 67 68 } 68 69 69 70 #[derive(Queryable, Selectable)] ··· 84 85 85 86 // Jacquard OAuth models 86 87 87 - #[derive(Queryable, Selectable)] 88 - #[diesel(table_name = crate::schema::oauth_sessions)] 88 + #[derive(Queryable, Selectable, QueryableByName)] 89 + #[diesel(table_name = crate::schema::oauth_sessions, check_for_backend(diesel::sqlite::Sqlite))] 89 90 pub struct OauthSession { 90 91 pub id: i32, 91 92 pub did: String, 92 93 pub session_id: String, 93 94 pub session_data: serde_json::Value, 94 - pub created_at: DateTime<Utc>, 95 - pub updated_at: DateTime<Utc>, 95 + pub created_at: NaiveDateTime, 96 + pub updated_at: NaiveDateTime, 96 97 } 97 98 98 99 #[derive(Insertable)] ··· 103 104 pub session_data: serde_json::Value, 104 105 } 105 106 106 - #[derive(Queryable, Selectable)] 107 + #[derive(Queryable, Selectable, QueryableByName)] 107 108 #[diesel(table_name = crate::schema::oauth_auth_requests)] 108 109 pub struct OauthAuthRequest { 109 110 pub id: i32, 110 111 pub state: String, 111 112 pub account_did: Option<String>, 112 113 pub auth_req_data: serde_json::Value, 113 - pub created_at: DateTime<Utc>, 114 - pub expires_at: DateTime<Utc>, 114 + pub created_at: NaiveDateTime, 115 + pub expires_at: NaiveDateTime, 115 116 } 116 117 117 118 #[derive(Insertable)]
+29
crates/weaver-index/src/schema.patch
··· 1 + --- src/schema.rs 2025-11-07 17:26:09.742146790 -0500 2 + +++ src/schema.rs 2025-11-07 17:25:42.871390425 -0500 3 + @@ -31,24 +31,24 @@ 4 + 5 + diesel::table! { 6 + oauth_auth_requests (id) { 7 + id -> Integer, 8 + state -> Text, 9 + account_did -> Nullable<Text>, 10 + - auth_req_data -> Binary, 11 + + auth_req_data -> Jsonb, 12 + created_at -> Timestamp, 13 + expires_at -> Timestamp, 14 + } 15 + } 16 + 17 + diesel::table! { 18 + oauth_sessions (id) { 19 + id -> Integer, 20 + did -> Text, 21 + session_id -> Text, 22 + - session_data -> Binary, 23 + + session_data -> Jsonb, 24 + created_at -> Timestamp, 25 + updated_at -> Timestamp, 26 + } 27 + } 28 + 29 + diesel::table! {
+23 -23
crates/weaver-index/src/schema.rs
··· 2 2 3 3 diesel::table! { 4 4 _jetstream (id) { 5 - id -> Int4, 6 - last_time_us -> Int4, 5 + id -> Integer, 6 + last_time_us -> Integer, 7 7 } 8 8 } 9 9 10 10 diesel::table! { 11 11 emails (id) { 12 - id -> Int4, 12 + id -> Integer, 13 13 did -> Text, 14 14 email -> Text, 15 - verified -> Int4, 15 + verified -> Bool, 16 16 verification_code -> Text, 17 - last_sent -> Timestamptz, 18 - is_primary -> Int4, 19 - created -> Timestamptz, 17 + last_sent -> Timestamp, 18 + is_primary -> Bool, 19 + created -> Timestamp, 20 20 } 21 21 } 22 22 ··· 25 25 user_did -> Text, 26 26 subject_did -> Text, 27 27 rkey -> Text, 28 - followed_at -> Timestamptz, 28 + followed_at -> Timestamp, 29 29 } 30 30 } 31 31 32 32 diesel::table! { 33 33 oauth_auth_requests (id) { 34 - id -> Int4, 34 + id -> Integer, 35 35 state -> Text, 36 36 account_did -> Nullable<Text>, 37 37 auth_req_data -> Jsonb, 38 - created_at -> Timestamptz, 39 - expires_at -> Timestamptz, 38 + created_at -> Timestamp, 39 + expires_at -> Timestamp, 40 40 } 41 41 } 42 42 43 43 diesel::table! { 44 44 oauth_sessions (id) { 45 - id -> Int4, 45 + id -> Integer, 46 46 did -> Text, 47 47 session_id -> Text, 48 48 session_data -> Jsonb, 49 - created_at -> Timestamptz, 50 - updated_at -> Timestamptz, 49 + created_at -> Timestamp, 50 + updated_at -> Timestamp, 51 51 } 52 52 } 53 53 54 54 diesel::table! { 55 55 profile (id) { 56 - id -> Int4, 56 + id -> Integer, 57 57 did -> Text, 58 58 avatar -> Nullable<Text>, 59 59 description -> Text, 60 60 include_bluesky -> Bool, 61 61 include_tangled -> Bool, 62 62 location -> Nullable<Text>, 63 - pinned_post -> Nullable<Jsonb>, 64 - created_at -> Nullable<Timestamptz>, 63 + pinned_post -> Nullable<Text>, 64 + created_at -> Nullable<Timestamp>, 65 65 } 66 66 } 67 67 68 68 diesel::table! { 69 69 profile_links (id) { 70 - id -> Int4, 70 + id -> Integer, 71 71 did -> Text, 72 72 link -> Text, 73 73 } ··· 75 75 76 76 diesel::table! { 77 77 profile_pronouns (id) { 78 - id -> Int4, 78 + id -> Integer, 79 79 did -> Text, 80 80 pronoun -> Text, 81 81 } ··· 83 83 84 84 diesel::table! { 85 85 public_keys (id) { 86 - id -> Int4, 86 + id -> Integer, 87 87 did -> Text, 88 88 name -> Text, 89 89 key_contents -> Text, 90 90 rkey -> Text, 91 - created -> Timestamptz, 91 + created -> Timestamp, 92 92 } 93 93 } 94 94 95 95 diesel::table! { 96 96 registrations (id) { 97 - id -> Int4, 97 + id -> Integer, 98 98 domain -> Text, 99 99 did -> Text, 100 100 secret -> Text, 101 - created -> Timestamptz, 101 + created -> Timestamp, 102 102 registered -> Nullable<Text>, 103 103 } 104 104 }
-1
flake.nix
··· 251 251 NIX_LD = lib.fileContents "${pkgs.stdenv.cc}/nix-support/dynamic-linker"; 252 252 253 253 LD_LIBRARY_PATH = "$LD_LIBRARY_PATH:$NIX_LD_LIBRARY_PATH"; 254 - DATABASE_URL = "postgres://postgres:@localhost/weaver_appview"; 255 254 256 255 # Additional dev-shell environment variables can be set directly 257 256 # MY_CUSTOM_DEVELOPMENT_VAR = "something else";