diff --git a/Cargo.lock b/Cargo.lock index 2c7f0ff..6493ae5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -328,7 +328,7 @@ version = "53.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b95513080e728e4cec37f1ff5af4f12c9688d47795d17cda80b6ec2cf74d4678" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.7.0", ] [[package]] @@ -483,7 +483,7 @@ checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11" dependencies = [ "proc-macro2", "quote", - "syn 2.0.95", + "syn 2.0.96", ] [[package]] @@ -505,7 +505,7 @@ checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.95", + "syn 2.0.96", ] [[package]] @@ -516,7 +516,7 @@ checksum = "3f934833b4b7233644e5848f235df3f57ed8c80f1528a26c3dfa13d2147fa056" dependencies = [ "proc-macro2", "quote", - "syn 2.0.95", + "syn 2.0.96", ] [[package]] @@ -549,7 +549,7 @@ dependencies = [ "derive_utils", "proc-macro2", "quote", - "syn 2.0.95", + "syn 2.0.96", ] [[package]] @@ -694,9 +694,9 @@ dependencies = [ [[package]] name = "aws-sdk-sts" -version = "1.54.0" +version = "1.54.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "249b2acaa8e02fd4718705a9494e3eb633637139aa4bb09d70965b0448e865db" +checksum = "861d324ef69247c6f3c6823755f408a68877ffb1a9afaff6dd8b0057c760de60" dependencies = [ "aws-credential-types", "aws-runtime", @@ -996,9 +996,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.6.0" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" +checksum = "1be3f42a67d6d345ecd59f675f3f012d6974981560836e938c22b424b85ce1be" [[package]] name = "bitpacking" @@ -1044,7 +1044,7 @@ checksum = "97ccca1260af6a459d75994ad5acc1651bcabcbdbc41467cc9786519ab854c30" dependencies = [ "async-stream", "base64 0.22.1", - "bitflags 2.6.0", + "bitflags 2.7.0", "bollard-buildkit-proto", "bollard-stubs", "bytes", @@ -1064,7 +1064,7 @@ dependencies = [ "num", "pin-project-lite", "rand", - "rustls 0.23.20", + "rustls 0.23.21", "rustls-native-certs 0.8.1", "rustls-pemfile 2.2.0", "rustls-pki-types", @@ -1073,7 +1073,7 @@ dependencies = [ "serde_json", "serde_repr", "serde_urlencoded", - "thiserror 2.0.10", + "thiserror 2.0.11", "tokio", "tokio-stream", "tokio-util", @@ -1174,7 +1174,7 @@ version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b99da2f8558ca23c71f4fd15dc57c906239752dd27ff3c00a1d56b685b7cbfec" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.7.0", "log", "polling 3.7.4", "rustix 0.38.43", @@ -1242,9 +1242,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.2.7" +version = "1.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a012a0df96dd6d06ba9a1b29d6402d1a5d77c6befd2566afdc26e10603dc93d7" +checksum = "ad0cf6e91fde44c773c6ee7ec6bba798504641a8bc2eb7e37a04ffbf4dfaa55a" dependencies = [ "jobserver", "libc", @@ -1358,7 +1358,7 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.95", + "syn 2.0.96", ] [[package]] @@ -1565,7 +1565,7 @@ version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "829d955a0bb380ef178a640b91779e3987da38c9aea133b20614cfed8cdea9c6" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.7.0", "crossterm_winapi", "mio", "parking_lot", @@ -1648,7 +1648,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.95", + "syn 2.0.96", ] [[package]] @@ -1659,7 +1659,7 @@ checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core", "quote", - "syn 2.0.95", + "syn 2.0.96", ] [[package]] @@ -2134,7 +2134,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.95", + "syn 2.0.96", ] [[package]] @@ -2144,7 +2144,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ab63b0e2bf4d5928aff72e83a7dace85d7bba5fe12dcc3c5a572d78caffd3f3c" dependencies = [ "derive_builder_core", - "syn 2.0.95", + "syn 2.0.96", ] [[package]] @@ -2155,7 +2155,7 @@ checksum = "65f152f4b8559c4da5d574bafc7af85454d706b4c5fe8b530d508cacbb6807ea" dependencies = [ "proc-macro2", "quote", - "syn 2.0.95", + "syn 2.0.96", ] [[package]] @@ -2216,7 +2216,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.95", + "syn 2.0.96", ] [[package]] @@ -2309,6 +2309,16 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" +[[package]] +name = "erased-serde" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24e2389d65ab4fab27dc2a5de7b191e1f6617d1f1c8855c0dc569c94a4cbb18d" +dependencies = [ + "serde", + "typeid", +] + [[package]] name = "errno" version = "0.3.10" @@ -2602,7 +2612,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.95", + "syn 2.0.96", ] [[package]] @@ -2736,7 +2746,7 @@ version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0bf760ebf69878d9fd8f110c89703d90ce35095324d1f1edcb595c63945ee757" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.7.0", "ignore", "walkdir", ] @@ -2886,7 +2896,7 @@ dependencies = [ "markup5ever", "proc-macro2", "quote", - "syn 2.0.95", + "syn 2.0.96", ] [[package]] @@ -3065,7 +3075,7 @@ dependencies = [ "hyper 1.5.2", "hyper-util", "log", - "rustls 0.23.20", + "rustls 0.23.21", "rustls-native-certs 0.8.1", "rustls-pki-types", "tokio", @@ -3284,7 +3294,7 @@ checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.95", + "syn 2.0.96", ] [[package]] @@ -3386,15 +3396,15 @@ dependencies = [ [[package]] name = "instability" -version = "0.3.6" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "894813a444908c0c8c0e221b041771d107c4a21de1d317dc49bcc66e3c9e5b3f" +checksum = "0bf9fed6d91cfb734e7476a06bde8300a1b94e217e1b523b6f0cd1a01998c71d" dependencies = [ "darling", "indoc", "proc-macro2", "quote", - "syn 2.0.95", + "syn 2.0.96", ] [[package]] @@ -4111,7 +4121,7 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.7.0", "libc", "redox_syscall 0.5.8", ] @@ -4158,9 +4168,12 @@ dependencies = [ [[package]] name = "log" -version = "0.4.22" +version = "0.4.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" +checksum = "3d6ea2a48c204030ee31a7d7fc72c93294c92fe87ecb1789881c9543516e1a0d" +dependencies = [ + "value-bag", +] [[package]] name = "loom" @@ -4369,7 +4382,7 @@ dependencies = [ "cfg-if", "proc-macro2", "quote", - "syn 2.0.95", + "syn 2.0.96", ] [[package]] @@ -4740,7 +4753,7 @@ version = "0.10.68" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6174bc48f102d208783c2c84bf931bb75927a617866870de8a4ea85597f871f5" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.7.0", "cfg-if", "foreign-types", "libc", @@ -4757,7 +4770,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.95", + "syn 2.0.96", ] [[package]] @@ -4966,7 +4979,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b7cafe60d6cf8e62e1b9b2ea516a089c008945bb5a275416789e7db0bc199dc" dependencies = [ "memchr", - "thiserror 2.0.10", + "thiserror 2.0.11", "ucd-trie", ] @@ -4990,7 +5003,7 @@ dependencies = [ "pest_meta", "proc-macro2", "quote", - "syn 2.0.95", + "syn 2.0.96", ] [[package]] @@ -5088,7 +5101,7 @@ checksum = "d56a66c0c55993aa927429d0f8a0abfd74f084e4d9c192cffed01e418d83eefb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.95", + "syn 2.0.96", ] [[package]] @@ -5240,7 +5253,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "483f8c21f64f3ea09fe0f30f5d48c3e8eefe5dac9129f0075f76593b4c1da705" dependencies = [ "proc-macro2", - "syn 2.0.95", + "syn 2.0.96", ] [[package]] @@ -5254,9 +5267,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.92" +version = "1.0.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0" +checksum = "60946a68e5f9d28b0dc1c21bb8a97ee7d018a8b322fa57838ba31cc878e22d99" dependencies = [ "unicode-ident", ] @@ -5287,7 +5300,7 @@ dependencies = [ "prost", "prost-types", "regex", - "syn 2.0.95", + "syn 2.0.96", "tempfile", ] @@ -5301,7 +5314,7 @@ dependencies = [ "itertools 0.13.0", "proc-macro2", "quote", - "syn 2.0.95", + "syn 2.0.96", ] [[package]] @@ -5319,7 +5332,7 @@ version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57206b407293d2bcd3af849ce869d52068623f19e1b5ff8e8778e3309439682b" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.7.0", "memchr", "unicase", ] @@ -5330,7 +5343,7 @@ version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f86ba2052aebccc42cbbb3ed234b8b13ce76f75c3551a303cb2bcffcff12bb14" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.7.0", "getopts", "memchr", "pulldown-cmark-escape", @@ -5389,9 +5402,9 @@ dependencies = [ "quinn-proto", "quinn-udp", "rustc-hash 2.1.0", - "rustls 0.23.20", + "rustls 0.23.21", "socket2 0.5.8", - "thiserror 2.0.10", + "thiserror 2.0.11", "tokio", "tracing", ] @@ -5407,10 +5420,10 @@ dependencies = [ "rand", "ring", "rustc-hash 2.1.0", - "rustls 0.23.20", + "rustls 0.23.21", "rustls-pki-types", "slab", - "thiserror 2.0.10", + "thiserror 2.0.11", "tinyvec", "tracing", "web-time", @@ -5497,7 +5510,7 @@ version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eabd94c2f37801c20583fc49dd5cd6b0ba68c716787c2dd6ed18571e1e63117b" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.7.0", "cassowary", "compact_str", "crossterm", @@ -5576,7 +5589,7 @@ version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "03a862b389f93e68874fbf580b9de08dd02facb9a788ebadaf4a3fd33cf58834" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.7.0", ] [[package]] @@ -5676,7 +5689,7 @@ dependencies = [ "percent-encoding", "pin-project-lite", "quinn", - "rustls 0.23.20", + "rustls 0.23.21", "rustls-native-certs 0.8.1", "rustls-pemfile 2.2.0", "rustls-pki-types", @@ -5767,7 +5780,7 @@ dependencies = [ "regex", "relative-path", "rustc_version", - "syn 2.0.95", + "syn 2.0.96", "unicode-ident", ] @@ -5791,7 +5804,7 @@ dependencies = [ "proc-macro2", "quote", "rust-embed-utils", - "syn 2.0.95", + "syn 2.0.96", "walkdir", ] @@ -5862,7 +5875,7 @@ version = "0.38.43" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a78891ee6bf2340288408954ac787aa063d8e8817e9f53abb37c695c6d834ef6" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.7.0", "errno", "libc", "linux-raw-sys 0.4.15", @@ -5883,9 +5896,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.20" +version = "0.23.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5065c3f250cbd332cd894be57c40fa52387247659b14a2d6041d121547903b1b" +checksum = "8f287924602bf649d949c63dc8ac8b235fa5387d394020705b80c4eb597ce5b8" dependencies = [ "log", "once_cell", @@ -6055,7 +6068,7 @@ version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.7.0", "core-foundation 0.9.4", "core-foundation-sys", "libc", @@ -6068,7 +6081,7 @@ version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "271720403f46ca04f7ba6f55d438f8bd878d6b8ca0a1046e8228c4145bcbb316" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.7.0", "core-foundation 0.10.0", "core-foundation-sys", "libc", @@ -6117,7 +6130,16 @@ checksum = "5a9bf7cf98d04a2b28aead066b7496853d4779c9cc183c440dbac457641e19a0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.95", + "syn 2.0.96", +] + +[[package]] +name = "serde_fmt" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1d4ddca14104cd60529e8c7f7ba71a2c8acd8f7f5cfcdc2faf97eeb7c3010a4" +dependencies = [ + "serde", ] [[package]] @@ -6150,7 +6172,7 @@ checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.95", + "syn 2.0.96", ] [[package]] @@ -6201,7 +6223,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.95", + "syn 2.0.96", ] [[package]] @@ -6378,7 +6400,7 @@ version = "0.19.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3457dea1f0eb631b4034d61d4d8c32074caa6cd1ab2d59f2327bd8461e2c0016" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.7.0", "calloop", "calloop-wayland-source", "cursor-icon", @@ -6448,7 +6470,7 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.95", + "syn 2.0.96", ] [[package]] @@ -6495,7 +6517,7 @@ checksum = "01b2e185515564f15375f593fb966b5718bc624ba77fe49fa4616ad619690554" dependencies = [ "proc-macro2", "quote", - "syn 2.0.95", + "syn 2.0.96", ] [[package]] @@ -6573,7 +6595,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.95", + "syn 2.0.96", ] [[package]] @@ -6582,11 +6604,89 @@ version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" +[[package]] +name = "sval" +version = "2.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6dc0f9830c49db20e73273ffae9b5240f63c42e515af1da1fceefb69fceafd8" + +[[package]] +name = "sval_buffer" +version = "2.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "429922f7ad43c0ef8fd7309e14d750e38899e32eb7e8da656ea169dd28ee212f" +dependencies = [ + "sval", + "sval_ref", +] + +[[package]] +name = "sval_dynamic" +version = "2.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68f16ff5d839396c11a30019b659b0976348f3803db0626f736764c473b50ff4" +dependencies = [ + "sval", +] + +[[package]] +name = "sval_fmt" +version = "2.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c01c27a80b6151b0557f9ccbe89c11db571dc5f68113690c1e028d7e974bae94" +dependencies = [ + "itoa", + "ryu", + "sval", +] + +[[package]] +name = "sval_json" +version = "2.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0deef63c70da622b2a8069d8600cf4b05396459e665862e7bdb290fd6cf3f155" +dependencies = [ + "itoa", + "ryu", + "sval", +] + +[[package]] +name = "sval_nested" +version = "2.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a39ce5976ae1feb814c35d290cf7cf8cd4f045782fe1548d6bc32e21f6156e9f" +dependencies = [ + "sval", + "sval_buffer", + "sval_ref", +] + +[[package]] +name = "sval_ref" +version = "2.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb7c6ee3751795a728bc9316a092023529ffea1783499afbc5c66f5fabebb1fa" +dependencies = [ + "sval", +] + +[[package]] +name = "sval_serde" +version = "2.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a5572d0321b68109a343634e3a5d576bf131b82180c6c442dee06349dfc652a" +dependencies = [ + "serde", + "sval", + "sval_nested", +] + [[package]] name = "swiftide" -version = "0.16.2" +version = "0.16.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4862a75301d5edf60cbed4ba171f2fc459ca96f52617287e5379002f19564ed" +checksum = "60d8be845f487d65de3731ae8a4be5fb50ce3e746e5b11970c714838a7dc3983" dependencies = [ "anyhow", "async-trait", @@ -6602,9 +6702,9 @@ dependencies = [ [[package]] name = "swiftide-agents" -version = "0.16.2" +version = "0.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "344004a8c450f5e65bf7b452bdae626c77de9f412c9ad8d66326319d235bc5cb" +checksum = "33152eb06dac8921d6b2c4d4d4c26b757dee12c759171a7d4f1d7f7ac29ba754" dependencies = [ "anyhow", "async-trait", @@ -6624,9 +6724,9 @@ dependencies = [ [[package]] name = "swiftide-core" -version = "0.16.2" +version = "0.16.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be9141796fb50e323e6dad78689bbe0a8b3d1ebb081146136c581226bf6b0dcc" +checksum = "253d33982d8bdb5c9951fe42da93c449e43894c98fe61dbf49a33ba37be7bca9" dependencies = [ "anyhow", "async-trait", @@ -6643,7 +6743,7 @@ dependencies = [ "strum", "strum_macros", "tera", - "thiserror 2.0.10", + "thiserror 2.0.11", "tokio", "tokio-stream", "tracing", @@ -6664,7 +6764,7 @@ dependencies = [ "indoc", "swiftide-agents", "swiftide-core", - "thiserror 2.0.10", + "thiserror 2.0.11", "tokio", "tokio-tar", "tracing", @@ -6673,9 +6773,9 @@ dependencies = [ [[package]] name = "swiftide-indexing" -version = "0.16.2" +version = "0.16.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c43c26a292e016a6862161a21901ae42adcda3e0423901040751954cfd3830c8" +checksum = "acd21b1399ae9332941976724963b69db0641b3902ca6d83403c018ab8d97707" dependencies = [ "anyhow", "async-trait", @@ -6699,9 +6799,9 @@ dependencies = [ [[package]] name = "swiftide-integrations" -version = "0.16.2" +version = "0.16.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14edb6ccaf0c55f1597fc7b025921e14a73157b8bc160bf5ba68868d6bf7f20f" +checksum = "c3049784ee76a887e111afea992da1b5e33745663f78d3411287019a8b29b6d1" dependencies = [ "anyhow", "arrow", @@ -6717,6 +6817,7 @@ dependencies = [ "redb", "regex", "reqwest", + "secrecy 0.8.0", "serde", "serde_json", "strum", @@ -6736,9 +6837,9 @@ dependencies = [ [[package]] name = "swiftide-macros" -version = "0.16.2" +version = "0.16.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58e82d0239efeef8907d1995d641c22a3b4adff894be76dea90981ba47ef47bd" +checksum = "82d29225442105e6cd7df0cd0dbf0d19eee37eb90919c9ce660440a79c0fe6ea" dependencies = [ "anyhow", "async-trait", @@ -6748,14 +6849,14 @@ dependencies = [ "quote", "serde", "serde_json", - "syn 2.0.95", + "syn 2.0.96", ] [[package]] name = "swiftide-query" -version = "0.16.2" +version = "0.16.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99b299957bdde8b1305cf432de166595767826b402757049e368912e6219a3d0" +checksum = "066f009426b420446900f6e30a8e986f9bb10e3ee7847841c14f7183746abc9c" dependencies = [ "anyhow", "async-trait", @@ -6785,9 +6886,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.95" +version = "2.0.96" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46f71c0377baf4ef1cc3e3402ded576dccc315800fbc62dfc7fe04b009773b4a" +checksum = "d5d0adab1ae378d7f53bdebc67a39f1f151407ef230f0ce2883572f5d8985c80" dependencies = [ "proc-macro2", "quote", @@ -6811,7 +6912,7 @@ checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" dependencies = [ "proc-macro2", "quote", - "syn 2.0.95", + "syn 2.0.96", ] [[package]] @@ -6842,7 +6943,7 @@ version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.7.0", "core-foundation 0.9.4", "system-configuration-sys", ] @@ -7092,7 +7193,7 @@ checksum = "5999e24eaa32083191ba4e425deb75cdf25efefabe5aaccb7446dd0d4122a3f5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.95", + "syn 2.0.96", ] [[package]] @@ -7124,11 +7225,11 @@ dependencies = [ [[package]] name = "thiserror" -version = "2.0.10" +version = "2.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3ac7f54ca534db81081ef1c1e7f6ea8a3ef428d2fc069097c079443d24124d3" +checksum = "d452f284b73e6d76dd36758a0c8684b1d5be31f92b89d07fd5822175732206fc" dependencies = [ - "thiserror-impl 2.0.10", + "thiserror-impl 2.0.11", ] [[package]] @@ -7139,18 +7240,18 @@ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.95", + "syn 2.0.96", ] [[package]] name = "thiserror-impl" -version = "2.0.10" +version = "2.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e9465d30713b56a37ede7185763c3492a91be2f5fa68d958c44e41ab9248beb" +checksum = "26afc1baea8a989337eeb52b6e72a039780ce45c3edfcc9c5b9d112feeb173c2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.95", + "syn 2.0.96", ] [[package]] @@ -7264,7 +7365,7 @@ checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.95", + "syn 2.0.96", ] [[package]] @@ -7293,7 +7394,7 @@ version = "0.26.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f6d0975eaace0cf0fcadee4e4aaa5da15b5c079146f2cffb67c113be122bf37" dependencies = [ - "rustls 0.23.20", + "rustls 0.23.21", "tokio", ] @@ -7443,7 +7544,7 @@ version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "403fa3b783d4b626a8ad51d766ab03cb6d2dbfc46b1c5d4448395e6628dc9697" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.7.0", "bytes", "futures-util", "http 1.2.0", @@ -7500,7 +7601,7 @@ checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.95", + "syn 2.0.96", ] [[package]] @@ -7703,6 +7804,12 @@ dependencies = [ "static_assertions", ] +[[package]] +name = "typeid" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e13db2e0ccd5e14a544e8a246ba2312cd25223f616442d7f2cb0e3db614236e" + [[package]] name = "typenum" version = "1.17.0" @@ -7821,7 +7928,7 @@ dependencies = [ "base64 0.22.1", "log", "once_cell", - "rustls 0.23.20", + "rustls 0.23.21", "rustls-pki-types", "url", "webpki-roots", @@ -7877,9 +7984,9 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "uuid" -version = "1.11.0" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8c5f0a0af699448548ad1a2fbf920fb4bee257eae39953ba95cb84891a0446a" +checksum = "b913a3b5fe84142e269d63cc62b64319ccaf89b748fc31fe025177f767a756c4" dependencies = [ "getrandom", "md-5", @@ -7892,6 +7999,42 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" +[[package]] +name = "value-bag" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ef4c4aa54d5d05a279399bfa921ec387b7aba77caf7a682ae8d86785b8fdad2" +dependencies = [ + "value-bag-serde1", + "value-bag-sval2", +] + +[[package]] +name = "value-bag-serde1" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4bb773bd36fd59c7ca6e336c94454d9c66386416734817927ac93d81cb3c5b0b" +dependencies = [ + "erased-serde", + "serde", + "serde_fmt", +] + +[[package]] +name = "value-bag-sval2" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53a916a702cac43a88694c97657d449775667bcd14b70419441d05b7fea4a83a" +dependencies = [ + "sval", + "sval_buffer", + "sval_dynamic", + "sval_fmt", + "sval_json", + "sval_ref", + "sval_serde", +] + [[package]] name = "vcpkg" version = "0.2.15" @@ -7971,7 +8114,7 @@ dependencies = [ "log", "proc-macro2", "quote", - "syn 2.0.95", + "syn 2.0.96", "wasm-bindgen-shared", ] @@ -8006,7 +8149,7 @@ checksum = "30d7a95b763d3c45903ed6c81f156801839e5ee968bb07e534c44df0fcd330c2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.95", + "syn 2.0.96", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -8050,7 +8193,7 @@ version = "0.31.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b66249d3fc69f76fd74c82cc319300faa554e9d865dab1f7cd66cc20db10b280" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.7.0", "rustix 0.38.43", "wayland-backend", "wayland-scanner", @@ -8062,7 +8205,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "625c5029dbd43d25e6aa9615e88b829a5cad13b2819c4ae129fdbb7c31ab4c7e" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.7.0", "cursor-icon", "wayland-backend", ] @@ -8084,7 +8227,7 @@ version = "0.32.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7cd0ade57c4e6e9a8952741325c30bf82f4246885dca8bf561898b86d0c1f58e" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.7.0", "wayland-backend", "wayland-client", "wayland-scanner", @@ -8096,7 +8239,7 @@ version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "782e12f6cd923c3c316130d56205ebab53f55d6666b7faddfad36cecaeeb4022" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.7.0", "wayland-backend", "wayland-client", "wayland-protocols", @@ -8227,7 +8370,7 @@ checksum = "2bbd5b46c938e506ecbce286b6628a02171d56153ba733b6c741fc627ec9579b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.95", + "syn 2.0.96", ] [[package]] @@ -8238,7 +8381,7 @@ checksum = "053c4c462dc91d3b1504c6fe5a726dd15e216ba718e84a0e46a88fbe5ded3515" dependencies = [ "proc-macro2", "quote", - "syn 2.0.95", + "syn 2.0.96", ] [[package]] @@ -8421,9 +8564,9 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" -version = "0.6.22" +version = "0.6.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39281189af81c07ec09db316b302a3e67bf9bd7cbf6c820b50e35fee9c2fa980" +checksum = "c8d71a593cc5c42ad7876e2c1fda56f314f3754c084128833e64f1345ff8a03a" dependencies = [ "memchr", ] @@ -8551,7 +8694,7 @@ checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" dependencies = [ "proc-macro2", "quote", - "syn 2.0.95", + "syn 2.0.96", "synstructure", ] @@ -8573,7 +8716,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.95", + "syn 2.0.96", ] [[package]] @@ -8593,7 +8736,7 @@ checksum = "595eed982f7d355beb85837f651fa22e90b3c044842dc7f2c2842c086f295808" dependencies = [ "proc-macro2", "quote", - "syn 2.0.95", + "syn 2.0.96", "synstructure", ] @@ -8622,7 +8765,7 @@ checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.95", + "syn 2.0.96", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index f01261f..e004257 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,15 +20,16 @@ tokio-util = "0.7.13" strum = "0.26.3" strum_macros = "0.26.4" swiftide-docker-executor = "0.2.0" -swiftide = { version = "0.16.1", features = [ +swiftide = { version = "0.16.4", features = [ "lancedb", "openai", "tree-sitter", "redb", + "ollama", "swiftide-agents", ] } -swiftide-macros = { version = "0.16.1" } +swiftide-macros = { version = "0.16.4" } toml = "0.8.19" serde = { version = "1.0.217", features = ["derive"] } serde_json = "1.0.134" @@ -126,8 +127,8 @@ default = ["otel"] [patch.crates-io] # swiftide = { path = "../swiftide/swiftide" } # swiftide-macros = { path = "../swiftide/swiftide-macros" } -# swiftide = { git = "https://github.com/bosun-ai/swiftide", branch = "feat/document-templates" } -# swiftide-macros = { git = "https://github.com/bosun-ai/swiftide", branch = "feat/document-templates" } +# swiftide-core = { path = "../swiftide/swiftide-core" } + # The profile that 'dist' will build with [profile.dist] diff --git a/src/config/config.rs b/src/config/config.rs index 6cf66ac..63c3e03 100644 --- a/src/config/config.rs +++ b/src/config/config.rs @@ -7,8 +7,8 @@ use swiftide::integrations::treesitter::SupportedLanguages; use super::api_key::ApiKey; use super::defaults::{ - default_cache_dir, default_docker_context, default_dockerfile, default_indexing_concurrency, - default_log_dir, default_main_branch, default_project_name, + default_cache_dir, default_docker_context, default_dockerfile, default_log_dir, + default_main_branch, default_project_name, }; use super::{CommandConfiguration, LLMConfiguration, LLMConfigurations}; @@ -25,8 +25,16 @@ pub struct Config { #[serde(default = "default_log_dir")] pub log_dir: PathBuf, - #[serde(default = "default_indexing_concurrency")] - pub indexing_concurrency: usize, + #[serde(default)] + /// Concurrency for indexing + /// By default for IO-bound LLMs, we assume 4x the number of CPUs + /// For Ollama, it's the number of CPUs + indexing_concurrency: Option, + #[serde(default)] + /// Batch size for indexing + /// By default for IO-bound LLMs, we use a smaller batch size, as we can run it in parallel + /// For local embeddings it's 256 + indexing_batch_size: Option, #[serde(default)] pub docker: DockerConfiguration, @@ -152,6 +160,30 @@ impl Config { pub fn log_dir(&self) -> &Path { self.log_dir.as_path() } + + #[must_use] + pub fn indexing_concurrency(&self) -> usize { + if let Some(concurrency) = self.indexing_concurrency { + return concurrency; + }; + + match self.indexing_provider() { + LLMConfiguration::OpenAI { .. } => num_cpus::get() * 4, + LLMConfiguration::Ollama { .. } => num_cpus::get(), + } + } + + #[must_use] + pub fn indexing_batch_size(&self) -> usize { + if let Some(batch_size) = self.indexing_batch_size { + return batch_size; + }; + + match self.indexing_provider() { + LLMConfiguration::OpenAI { .. } => 12, + LLMConfiguration::Ollama { .. } => 256, + } + } } #[cfg(test)] diff --git a/src/config/defaults.rs b/src/config/defaults.rs index 68de8df..876a787 100644 --- a/src/config/defaults.rs +++ b/src/config/defaults.rs @@ -32,10 +32,6 @@ pub(super) fn default_log_dir() -> PathBuf { path } -pub(super) fn default_indexing_concurrency() -> usize { - // Assume majority is IO bound, so beef it up - num_cpus::get() * 4 -} #[must_use] pub fn default_dockerfile() -> PathBuf { "./Dockerfile".into() diff --git a/src/config/llm_configuration.rs b/src/config/llm_configuration.rs index 2403591..e03c8de 100644 --- a/src/config/llm_configuration.rs +++ b/src/config/llm_configuration.rs @@ -3,7 +3,10 @@ use anyhow::{Context as _, Result}; use serde::{Deserialize, Serialize}; use swiftide::{ chat_completion::ChatCompletion, - integrations, + integrations::{ + self, + ollama::{config::OllamaConfig, Ollama}, + }, traits::{EmbeddingModel, SimplePrompt}, }; use url::Url; @@ -32,15 +35,18 @@ pub enum LLMConfiguration { embedding_model: OpenAIEmbeddingModel, base_url: Option, }, + Ollama { + #[serde(default)] + prompt_model: Option, + #[serde(default)] + embedding_model: Option, + #[serde(default)] + base_url: Option, + }, // Groq { // api_key: SecretString, // prompt_model: String, // }, - // Ollama { - // prompt_model: Option, - // embedding_model: Option, - // vector_size: Option, - // }, // AWSBedrock { // prompt_model: String, // }, @@ -50,6 +56,12 @@ pub enum LLMConfiguration { // }, } +#[derive(Debug, Clone, Deserialize, Serialize)] +pub struct EmbeddingModelWithSize { + pub name: String, + pub vector_size: i32, +} + impl LLMConfiguration { pub(crate) fn vector_size(&self) -> i32 { match self { @@ -59,6 +71,14 @@ impl LLMConfiguration { OpenAIEmbeddingModel::TextEmbedding3Small => 1536, OpenAIEmbeddingModel::TextEmbedding3Large => 3072, }, + LLMConfiguration::Ollama { + embedding_model, .. + } => { + embedding_model + .as_ref() + .expect("Expected an embedding model for ollama") + .vector_size + } } } } @@ -124,6 +144,38 @@ fn build_openai( .context("Failed to build OpenAI client") } +fn build_ollama(llm_config: &LLMConfiguration) -> Result { + let LLMConfiguration::Ollama { + prompt_model, + embedding_model, + base_url, + .. + } = llm_config + else { + anyhow::bail!("Expected Ollama configuration") + }; + + let mut config = OllamaConfig::default(); + + if let Some(base_url) = base_url { + config.with_api_base(base_url.as_str()); + }; + + let mut builder = Ollama::builder() + .client(async_openai::Client::with_config(config)) + .to_owned(); + + if let Some(embedding_model) = embedding_model { + builder.default_embed_model(embedding_model.name.clone()); + } + + if let Some(prompt_model) = prompt_model { + builder.default_prompt_model(prompt_model); + } + + builder.build().context("Failed to build Ollama client") +} + impl TryInto> for &LLMConfiguration { type Error = anyhow::Error; @@ -139,7 +191,10 @@ impl TryInto> for &LLMConfiguration { embedding_model, prompt_model, base_url.as_ref(), - )?), + )?) as Box, + LLMConfiguration::Ollama { .. } => { + Box::new(build_ollama(self)?) as Box + } }; Ok(boxed) @@ -160,7 +215,10 @@ impl TryInto> for &LLMConfiguration { embedding_model, prompt_model, base_url.as_ref(), - )?), + )?) as Box, + LLMConfiguration::Ollama { .. } => { + Box::new(build_ollama(self)?) as Box + } }; Ok(boxed) @@ -181,7 +239,10 @@ impl TryInto> for &LLMConfiguration { embedding_model, prompt_model, base_url.as_ref(), - )?), + )?) as Box, + LLMConfiguration::Ollama { .. } => { + Box::new(build_ollama(self)?) as Box + } }; Ok(boxed) diff --git a/src/indexing/repository.rs b/src/indexing/repository.rs index 24c392f..5549f13 100644 --- a/src/indexing/repository.rs +++ b/src/indexing/repository.rs @@ -49,7 +49,7 @@ pub async fn index_repository( let processed_chunks = Arc::new(AtomicU64::new(0)); let (mut markdown, mut code) = swiftide::indexing::Pipeline::from_loader(loader) - .with_concurrency(repository.config().indexing_concurrency) + .with_concurrency(repository.config().indexing_concurrency()) .with_default_llm_client(indexing_provider) .filter_cached(redb) .split_by(|node| { @@ -109,9 +109,9 @@ pub async fn index_repository( }) .then(transformers::MetadataQAText::default()); - // Since OpenAI is IO bound, making many small embedding requests in parallel is faster + let batch_size = repository.config().indexing_batch_size(); code.merge(markdown) - .then_in_batch(transformers::Embed::new(embedding_provider).with_batch_size(12)) + .then_in_batch(transformers::Embed::new(embedding_provider).with_batch_size(batch_size)) .then(|mut chunk: Node| { chunk .metadata