diff --git a/djinn-rs/.gitignore b/.gitignore similarity index 100% rename from djinn-rs/.gitignore rename to .gitignore diff --git a/djinn-rs/Cargo.lock b/Cargo.lock similarity index 79% rename from djinn-rs/Cargo.lock rename to Cargo.lock index 29ba83e..8bbe33b 100644 --- a/djinn-rs/Cargo.lock +++ b/Cargo.lock @@ -1,6 +1,6 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "ab_glyph_rasterizer" @@ -16,9 +16,9 @@ checksum = "415ed64958754dbe991900f3940677e6a7eefb4d7367afd70d642677b0c7d19d" [[package]] name = "addr2line" -version = "0.22.0" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e4503c46a5c0c7844e948c9a4d6acd9f50cccb4de1c48eb9e291ea17470c678" +checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" dependencies = [ "gimli", ] @@ -29,6 +29,18 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +[[package]] +name = "ahash" +version = "0.8.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" +dependencies = [ + "cfg-if", + "once_cell", + "version_check", + "zerocopy", +] + [[package]] name = "aho-corasick" version = "1.1.3" @@ -38,6 +50,27 @@ dependencies = [ "memchr", ] +[[package]] +name = "allocator-api2" +version = "0.2.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45862d1c77f2228b9e10bc609d5bc203d86ebc9b87ad8d5d5167a6c9abf739d9" + +[[package]] +name = "android-tzdata" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" + +[[package]] +name = "android_system_properties" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" +dependencies = [ + "libc", +] + [[package]] name = "anstream" version = "0.6.15" @@ -89,9 +122,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.86" +version = "1.0.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" +checksum = "4c95c10ba0b00a02636238b814946408b1322d5ac4760326e6fb8ec956d85775" [[package]] name = "approx" @@ -130,7 +163,7 @@ checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.87", ] [[package]] @@ -141,7 +174,7 @@ checksum = "6e0c28dcc82d7c8ead5cb13beb15405b57b8546e93215673ff8ca0349a028107" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.87", ] [[package]] @@ -215,7 +248,7 @@ dependencies = [ "heck 0.4.1", "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.87", ] [[package]] @@ -241,9 +274,9 @@ dependencies = [ [[package]] name = "backtrace" -version = "0.3.73" +version = "0.3.71" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cc23269a4f8976d0a4d2e7109211a419fe30e8d88d677cd60b6bc79c5732e0a" +checksum = "26b05800d2e817c8b3b4b54abd461726265fa9789ae34330622f2db9ee696f9d" dependencies = [ "addr2line", "cc", @@ -345,7 +378,7 @@ checksum = "0cc8b54b395f2fcfbb3d90c47b01c7f444d94d05bdeb775811dec868ac3bbc26" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.87", ] [[package]] @@ -380,7 +413,7 @@ dependencies = [ "rand_distr 0.4.3", "rayon", "safetensors", - "thiserror", + "thiserror 1.0.63", "yoke", "zip", ] @@ -402,7 +435,7 @@ checksum = "f889aacd02fd999620a0435133d7cf3b58c81ef9dd5e47c38939b7a72345ea86" dependencies = [ "metal", "once_cell", - "thiserror", + "thiserror 1.0.63", "tracing", ] @@ -420,7 +453,7 @@ dependencies = [ "rayon", "safetensors", "serde", - "thiserror", + "thiserror 1.0.63", ] [[package]] @@ -448,11 +481,26 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7b02b629252fe8ef6460461409564e2c21d0c8e77e0944f3d189ff06c4e932ad" +[[package]] +name = "cassowary" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df8670b8c7b9dae1793364eafadf7239c40d669904660c5960d74cfd80b46a53" + +[[package]] +name = "castaway" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0abae9be0aaf9ea96a3b1b8b1b55c602ca751eba1b1500220cea4ecbafe7c0d5" +dependencies = [ + "rustversion", +] + [[package]] name = "cc" -version = "1.1.13" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72db2f7947ecee9b03b510377e8bb9077afa27176fdbff55c51027e976fdcc48" +checksum = "fd9de9f2205d5ef3fd67e685b0df337994ddd4495e2a28d185500d0e1edfea47" dependencies = [ "shlex", ] @@ -463,6 +511,31 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +[[package]] +name = "chrono" +version = "0.4.38" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" +dependencies = [ + "android-tzdata", + "iana-time-zone", + "js-sys", + "num-traits", + "serde", + "wasm-bindgen", + "windows-targets 0.52.6", +] + +[[package]] +name = "chumsky" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8eebd66744a15ded14960ab4ccdbfb51ad3b81f51f3f04a80adac98c985396c9" +dependencies = [ + "hashbrown 0.14.5", + "stacker", +] + [[package]] name = "clap" version = "4.5.16" @@ -494,7 +567,7 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.87", ] [[package]] @@ -503,6 +576,33 @@ version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97" +[[package]] +name = "color-eyre" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55146f5e46f237f7423d74111267d4597b59b0dad0ffaf7303bce9945d843ad5" +dependencies = [ + "backtrace", + "color-spantrace", + "eyre", + "indenter", + "once_cell", + "owo-colors", + "tracing-error", +] + +[[package]] +name = "color-spantrace" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd6be1b2a7e382e2b98b43b2adcca6bb0e465af0bdd38123873ae61eb17a72c2" +dependencies = [ + "once_cell", + "owo-colors", + "tracing-core", + "tracing-error", +] + [[package]] name = "color_quant" version = "1.1.0" @@ -515,6 +615,20 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0" +[[package]] +name = "compact_str" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6050c3a16ddab2e412160b31f2c871015704239bca62f72f6e5f0be631d3f644" +dependencies = [ + "castaway", + "cfg-if", + "itoa", + "rustversion", + "ryu", + "static_assertions", +] + [[package]] name = "console" version = "0.15.8" @@ -524,7 +638,7 @@ dependencies = [ "encode_unicode", "lazy_static", "libc", - "unicode-width", + "unicode-width 0.1.13", "windows-sys 0.52.0", ] @@ -598,6 +712,32 @@ version = "0.8.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" +[[package]] +name = "crossterm" +version = "0.28.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "829d955a0bb380ef178a640b91779e3987da38c9aea133b20614cfed8cdea9c6" +dependencies = [ + "bitflags 2.6.0", + "crossterm_winapi", + "futures-core", + "mio", + "parking_lot", + "rustix", + "signal-hook", + "signal-hook-mio", + "winapi", +] + +[[package]] +name = "crossterm_winapi" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "acdd7c62a3665c7f6830a51635d9ac9b23ed385797f70a83bb8bafe9c572ab2b" +dependencies = [ + "winapi", +] + [[package]] name = "crunchy" version = "0.2.2" @@ -626,8 +766,18 @@ version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7b750cb3417fd1b327431a470f388520309479ab0bf5e323505daf0290cd3850" dependencies = [ - "darling_core", - "darling_macro", + "darling_core 0.14.4", + "darling_macro 0.14.4", +] + +[[package]] +name = "darling" +version = "0.20.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f63b86c8a8826a49b8c21f08a2d07338eec8d900540f8630dc76284be802989" +dependencies = [ + "darling_core 0.20.10", + "darling_macro 0.20.10", ] [[package]] @@ -644,17 +794,52 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "darling_core" +version = "0.20.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95133861a8032aaea082871032f5815eb9e98cef03fa916ab4500513994df9e5" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim 0.11.1", + "syn 2.0.87", +] + [[package]] name = "darling_macro" version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4aab4dbc9f7611d8b55048a3a16d2d010c2c8334e46304b40ac1cc14bf3b48e" dependencies = [ - "darling_core", + "darling_core 0.14.4", "quote", "syn 1.0.109", ] +[[package]] +name = "darling_macro" +version = "0.20.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" +dependencies = [ + "darling_core 0.20.10", + "quote", + "syn 2.0.87", +] + +[[package]] +name = "deranged" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" +dependencies = [ + "powerfmt", + "serde", +] + [[package]] name = "derive-new" version = "0.5.9" @@ -674,7 +859,7 @@ checksum = "67e77553c4162a157adbf834ebae5b415acbecbeafc7a74b0e886657506a7611" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.87", ] [[package]] @@ -695,13 +880,22 @@ dependencies = [ "derive_builder_macro 0.13.1", ] +[[package]] +name = "derive_builder" +version = "0.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "507dfb09ea8b7fa618fcf76e953f4f5e192547945816d5358edffe39f6f94947" +dependencies = [ + "derive_builder_macro 0.20.2", +] + [[package]] name = "derive_builder_core" version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c11bdc11a0c47bc7d37d582b5285da6849c96681023680b906673c5707af7b0f" dependencies = [ - "darling", + "darling 0.14.4", "proc-macro2", "quote", "syn 1.0.109", @@ -713,12 +907,24 @@ version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4ec317cc3e7ef0928b0ca6e4a634a4d6c001672ae210438cf114a83e56b018d" dependencies = [ - "darling", + "darling 0.14.4", "proc-macro2", "quote", "syn 1.0.109", ] +[[package]] +name = "derive_builder_core" +version = "0.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d5bcf7b024d6835cfb3d473887cd966994907effbe9227e8c8219824d06c4e8" +dependencies = [ + "darling 0.20.10", + "proc-macro2", + "quote", + "syn 2.0.87", +] + [[package]] name = "derive_builder_macro" version = "0.12.0" @@ -739,6 +945,22 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "derive_builder_macro" +version = "0.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab63b0e2bf4d5928aff72e83a7dace85d7bba5fe12dcc3c5a572d78caffd3f3c" +dependencies = [ + "derive_builder_core 0.20.2", + "syn 2.0.87", +] + +[[package]] +name = "diff" +version = "0.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56254986775e3233ffa9c4d7d3faaf6d36a2c09d30b20687e9f88bc8bafc16c8" + [[package]] name = "dirs" version = "5.0.1" @@ -768,7 +990,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.87", ] [[package]] @@ -785,10 +1007,10 @@ dependencies = [ "markdown", "rand 0.8.5", "serde", - "thiserror", + "thiserror 1.0.63", "tokio", "tokio-stream", - "toml", + "toml 0.8.19", "tracing", "tracing-chrome", "tracing-log", @@ -823,11 +1045,11 @@ dependencies = [ "safetensors", "serde", "serde_json", - "thiserror", + "thiserror 1.0.63", "tokenizers", "tokio", "tokio-stream", - "toml", + "toml 0.8.19", "tracing", "tracing-chrome", "tracing-subscriber", @@ -848,9 +1070,9 @@ dependencies = [ "markdown", "serde", "serde_json", - "thiserror", + "thiserror 1.0.63", "tokio", - "toml", + "toml 0.8.19", "tower", "tower-http", "tracing", @@ -866,6 +1088,16 @@ dependencies = [ "reborrow", ] +[[package]] +name = "edit" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f364860e764787163c8c8f58231003839be31276e821e2ad2092ddf496b1aa09" +dependencies = [ + "tempfile", + "which", +] + [[package]] name = "either" version = "1.13.0" @@ -896,7 +1128,7 @@ dependencies = [ "heck 0.4.1", "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.87", ] [[package]] @@ -940,6 +1172,27 @@ dependencies = [ "zune-inflate", ] +[[package]] +name = "extend" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "311a6d2f1f9d60bff73d2c78a0af97ed27f79672f15c238192a5bbb64db56d00" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] + +[[package]] +name = "eyre" +version = "0.6.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cd915d99f24784cdc19fd37ef22b97e3ff0ae756c7e492e9fbfe897d61e2aec" +dependencies = [ + "indenter", + "once_cell", +] + [[package]] name = "fancy-regex" version = "0.13.0" @@ -953,9 +1206,9 @@ dependencies = [ [[package]] name = "fastrand" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" +checksum = "486f806e73c5707928240ddc295403b1b93c96a02038563881c4a2fd84b81ac4" [[package]] name = "fdeflate" @@ -991,6 +1244,12 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" +[[package]] +name = "foldhash" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f81ec6369c545a7d40e4589b5597581fa1c441fe1cce96dd1de43159910a36a2" + [[package]] name = "foreign-types" version = "0.3.2" @@ -1018,7 +1277,7 @@ checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.87", ] [[package]] @@ -1098,7 +1357,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.87", ] [[package]] @@ -1113,6 +1372,12 @@ version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" +[[package]] +name = "futures-timer" +version = "3.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f288b0a4f20f9a56b5d1da57e2227c661b7b16168e2f72365f57b63326e29b24" + [[package]] name = "futures-util" version = "0.3.30" @@ -1314,9 +1579,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.29.0" +version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" +checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" [[package]] name = "glob" @@ -1336,7 +1601,7 @@ dependencies = [ "futures-sink", "futures-util", "http 0.2.12", - "indexmap", + "indexmap 2.4.0", "slab", "tokio", "tokio-util", @@ -1357,11 +1622,32 @@ dependencies = [ "rand_distr 0.4.3", ] +[[package]] +name = "hashbrown" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" + [[package]] name = "hashbrown" version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" +dependencies = [ + "ahash", + "allocator-api2", +] + +[[package]] +name = "hashbrown" +version = "0.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a9bfc1af68b1726ea47d3d5109de126281def866b33970e10fbab11b5dafab3" +dependencies = [ + "allocator-api2", + "equivalent", + "foldhash", +] [[package]] name = "heck" @@ -1381,6 +1667,12 @@ version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + [[package]] name = "hf-hub" version = "0.3.2" @@ -1394,14 +1686,23 @@ dependencies = [ "native-tls", "num_cpus", "rand 0.8.5", - "reqwest", + "reqwest 0.11.27", "serde", "serde_json", - "thiserror", + "thiserror 1.0.63", "tokio", "ureq", ] +[[package]] +name = "home" +version = "0.5.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" +dependencies = [ + "windows-sys 0.52.0", +] + [[package]] name = "http" version = "0.2.12" @@ -1517,6 +1818,7 @@ dependencies = [ "pin-project-lite", "smallvec", "tokio", + "want", ] [[package]] @@ -1532,6 +1834,22 @@ dependencies = [ "tokio-native-tls", ] +[[package]] +name = "hyper-tls" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" +dependencies = [ + "bytes", + "http-body-util", + "hyper 1.4.1", + "hyper-util", + "native-tls", + "tokio", + "tokio-native-tls", + "tower-service", +] + [[package]] name = "hyper-util" version = "0.1.7" @@ -1539,12 +1857,40 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cde7055719c54e36e95e8719f95883f22072a48ede39db7fc17a4e1d5281e9b9" dependencies = [ "bytes", + "futures-channel", "futures-util", "http 1.1.0", "http-body 1.0.1", "hyper 1.4.1", "pin-project-lite", + "socket2", "tokio", + "tower", + "tower-service", + "tracing", +] + +[[package]] +name = "iana-time-zone" +version = "0.1.61" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220" +dependencies = [ + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "wasm-bindgen", + "windows-core", +] + +[[package]] +name = "iana-time-zone-haiku" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" +dependencies = [ + "cc", ] [[package]] @@ -1599,6 +1945,23 @@ dependencies = [ "rusttype", ] +[[package]] +name = "indenter" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683" + +[[package]] +name = "indexmap" +version = "1.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" +dependencies = [ + "autocfg", + "hashbrown 0.12.3", + "serde", +] + [[package]] name = "indexmap" version = "2.4.0" @@ -1606,7 +1969,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "93ead53efc7ea8ed3cfb0c79fc8023fbb782a5432b52830b6518941cebe6505c" dependencies = [ "equivalent", - "hashbrown", + "hashbrown 0.14.5", + "serde", ] [[package]] @@ -1619,15 +1983,49 @@ dependencies = [ "instant", "number_prefix", "portable-atomic", - "unicode-width", + "unicode-width 0.1.13", ] [[package]] -name = "instant" -version = "0.1.13" +name = "indoc" +version = "2.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" -dependencies = [ +checksum = "b248f5224d1d606005e02c97f5aa4e88eeb230488bcc03bc9ca4d7991399f2b5" + +[[package]] +name = "insta" +version = "1.41.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e9ffc4d4892617c50a928c52b2961cb5174b6fc6ebf252b2fac9d21955c48b8" +dependencies = [ + "console", + "lazy_static", + "linked-hash-map", + "serde", + "similar", + "toml 0.5.11", +] + +[[package]] +name = "instability" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b829f37dead9dc39df40c2d3376c179fdfd2ac771f53f55d3c30dc096a3c0c6e" +dependencies = [ + "darling 0.20.10", + "indoc", + "pretty_assertions", + "proc-macro2", + "quote", + "syn 2.0.87", +] + +[[package]] +name = "instant" +version = "0.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" +dependencies = [ "cfg-if", ] @@ -1661,6 +2059,15 @@ dependencies = [ "either", ] +[[package]] +name = "itertools" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" +dependencies = [ + "either", +] + [[package]] name = "itoa" version = "1.0.11" @@ -1699,9 +2106,9 @@ checksum = "03087c2bad5e1034e8cace5926dec053fb3790248370865f5117a7d0213354c8" [[package]] name = "libc" -version = "0.2.157" +version = "0.2.164" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "374af5f94e54fa97cf75e945cce8a6b201e88a1a07e688b47dfd2a59c66dbd86" +checksum = "433bfe06b8c75da9b2e3fbea6e5329ff87748f0b144ef75306e674c3f6f7c13f" [[package]] name = "libloading" @@ -1729,6 +2136,12 @@ dependencies = [ "libc", ] +[[package]] +name = "linked-hash-map" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" + [[package]] name = "linux-raw-sys" version = "0.4.14" @@ -1751,6 +2164,15 @@ version = "0.4.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" +[[package]] +name = "lru" +version = "0.12.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "234cf4f4a04dc1f57e24b96cc0cd600cf2af460d4161ac5ecdd0af8e1f3b2a38" +dependencies = [ + "hashbrown 0.15.1", +] + [[package]] name = "macro_rules_attribute" version = "0.2.0" @@ -1883,10 +2305,24 @@ checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" dependencies = [ "hermit-abi", "libc", + "log", "wasi 0.11.0+wasi-snapshot-preview1", "windows-sys 0.52.0", ] +[[package]] +name = "modelfile" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32662819d966e4b564b4250230d1362e22a9b3234840724f52a4c02b99f836ef" +dependencies = [ + "nom", + "serde", + "strum", + "thiserror 2.0.3", + "toml 0.8.19", +] + [[package]] name = "monostate" version = "0.1.13" @@ -1905,7 +2341,7 @@ checksum = "a7ce64b975ed4f123575d11afd9491f2e37bbd5813fbfbc0f09ae1fbddea74e0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.87", ] [[package]] @@ -1994,6 +2430,12 @@ dependencies = [ "num-traits", ] +[[package]] +name = "num-conv" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" + [[package]] name = "num-integer" version = "0.1.46" @@ -2063,7 +2505,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.87", ] [[package]] @@ -2093,13 +2535,70 @@ dependencies = [ [[package]] name = "object" -version = "0.36.3" +version = "0.32.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27b64972346851a39438c60b341ebc01bba47464ae329e55cf343eb93964efd9" +checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" dependencies = [ "memchr", ] +[[package]] +name = "ollama-cli" +version = "0.1.0" +dependencies = [ + "anyhow", + "async-stream", + "chrono", + "chumsky", + "clap", + "color-eyre", + "crossterm", + "derive_builder 0.20.2", + "edit", + "extend", + "futures", + "insta", + "itertools 0.13.0", + "modelfile", + "nom", + "ollama-rs", + "pretty_assertions", + "ratatui", + "rstest", + "serde", + "serde_json", + "serde_with", + "strum", + "tempfile", + "textwrap", + "thiserror 1.0.63", + "tokio", + "tokio-stream", + "toml 0.8.19", + "tracing", + "tracing-log", + "tracing-subscriber", + "unicode-width 0.2.0", + "url", +] + +[[package]] +name = "ollama-rs" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46483ac9e1f9e93da045b5875837ca3c9cf014fd6ab89b4d9736580ddefc4759" +dependencies = [ + "async-stream", + "async-trait", + "log", + "reqwest 0.12.9", + "serde", + "serde_json", + "tokio", + "tokio-stream", + "url", +] + [[package]] name = "once_cell" version = "1.19.0" @@ -2151,7 +2650,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.87", ] [[package]] @@ -2193,6 +2692,12 @@ dependencies = [ "ttf-parser", ] +[[package]] +name = "owo-colors" +version = "3.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1b04fb49957986fdce4d6ee7a65027d55d4b6d2265e5848bbb507b58ccfdb6f" + [[package]] name = "parking_lot" version = "0.12.3" @@ -2245,7 +2750,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.87", ] [[package]] @@ -2291,6 +2796,12 @@ version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da544ee218f0d287a911e9c99a39a8c9bc8fcad3cb8db5959940044ecfc67265" +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + [[package]] name = "ppv-lite86" version = "0.2.20" @@ -2300,13 +2811,23 @@ dependencies = [ "zerocopy", ] +[[package]] +name = "pretty_assertions" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ae130e2f271fbc2ac3a40fb1d07180839cdbbe443c7a27e1e3c13c5cac0116d" +dependencies = [ + "diff", + "yansi", +] + [[package]] name = "proc-macro-crate" -version = "3.1.0" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" +checksum = "8ecf48c7ca261d60b74ab1a7b20da18bede46776b2e55535cb958eb595c5fa7b" dependencies = [ - "toml_edit 0.21.1", + "toml_edit", ] [[package]] @@ -2343,9 +2864,9 @@ checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" [[package]] name = "proc-macro2" -version = "1.0.86" +version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" +checksum = "f139b0662de085916d1fb67d2b4169d1addddda1919e696f3252b740b629986e" dependencies = [ "unicode-ident", ] @@ -2356,6 +2877,15 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8bccbff07d5ed689c4087d20d7307a52ab6141edeedf487c3876a55b86cf63df" +[[package]] +name = "psm" +version = "0.1.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "200b9ff220857e53e184257720a14553b2f4aa02577d2ed9842d45d4b9654810" +dependencies = [ + "cc", +] + [[package]] name = "pulp" version = "0.18.22" @@ -2379,9 +2909,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.36" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ "proc-macro2", ] @@ -2476,6 +3006,27 @@ dependencies = [ "rand_core 0.5.1", ] +[[package]] +name = "ratatui" +version = "0.28.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdef7f9be5c0122f890d58bdf4d964349ba6a6161f705907526d891efabba57d" +dependencies = [ + "bitflags 2.6.0", + "cassowary", + "compact_str", + "crossterm", + "instability", + "itertools 0.13.0", + "lru", + "paste", + "strum", + "strum_macros", + "unicode-segmentation", + "unicode-truncate", + "unicode-width 0.1.13", +] + [[package]] name = "raw-cpuid" version = "10.7.0" @@ -2545,7 +3096,7 @@ checksum = "bd283d9651eeda4b2a83a43c1c91b266c40fd76ecd39a50a8c630ae69dc72891" dependencies = [ "getrandom 0.2.15", "libredox", - "thiserror", + "thiserror 1.0.63", ] [[package]] @@ -2598,6 +3149,12 @@ version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" +[[package]] +name = "relative-path" +version = "1.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba39f3699c378cd8970968dcbff9c43159ea4cfbd88d43c00b22f2ef10a435d2" + [[package]] name = "reqwest" version = "0.11.27" @@ -2613,7 +3170,7 @@ dependencies = [ "http 0.2.12", "http-body 0.4.6", "hyper 0.14.30", - "hyper-tls", + "hyper-tls 0.5.0", "ipnet", "js-sys", "log", @@ -2622,7 +3179,7 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite", - "rustls-pemfile", + "rustls-pemfile 1.0.4", "serde", "serde_json", "serde_urlencoded", @@ -2638,6 +3195,47 @@ dependencies = [ "winreg", ] +[[package]] +name = "reqwest" +version = "0.12.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a77c62af46e79de0a562e1a9849205ffcb7fc1238876e9bd743357570e04046f" +dependencies = [ + "base64 0.22.1", + "bytes", + "futures-core", + "futures-util", + "http 1.1.0", + "http-body 1.0.1", + "http-body-util", + "hyper 1.4.1", + "hyper-tls 0.6.0", + "hyper-util", + "ipnet", + "js-sys", + "log", + "mime", + "native-tls", + "once_cell", + "percent-encoding", + "pin-project-lite", + "rustls-pemfile 2.2.0", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper 1.0.1", + "tokio", + "tokio-native-tls", + "tokio-util", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "wasm-streams", + "web-sys", + "windows-registry", +] + [[package]] name = "ring" version = "0.17.8" @@ -2653,17 +3251,56 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "rstest" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a2c585be59b6b5dd66a9d2084aa1d8bd52fbdb806eafdeffb52791147862035" +dependencies = [ + "futures", + "futures-timer", + "rstest_macros", + "rustc_version", +] + +[[package]] +name = "rstest_macros" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "825ea780781b15345a146be27eaefb05085e337e869bff01b4306a4fd4a9ad5a" +dependencies = [ + "cfg-if", + "glob", + "proc-macro-crate", + "proc-macro2", + "quote", + "regex", + "relative-path", + "rustc_version", + "syn 2.0.87", + "unicode-ident", +] + [[package]] name = "rustc-demangle" version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" +[[package]] +name = "rustc_version" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" +dependencies = [ + "semver", +] + [[package]] name = "rustix" -version = "0.38.34" +version = "0.38.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" +checksum = "d7f649912bc1495e167a6edee79151c84b1bad49748cb4f1f1167f459f6224f6" dependencies = [ "bitflags 2.6.0", "errno", @@ -2696,11 +3333,20 @@ dependencies = [ "base64 0.21.7", ] +[[package]] +name = "rustls-pemfile" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dce314e5fee3f39953d46bb63bb8a46d40c2f8fb7cc5a3b6cab2bde9721d6e50" +dependencies = [ + "rustls-pki-types", +] + [[package]] name = "rustls-pki-types" -version = "1.8.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc0a2ce646f8655401bb81e7927b812614bd5d91dbc968696be50603510fcaf0" +checksum = "16f1201b3c9a7ee8039bcadc17b7e605e2945b27eee7631788c1bd2b0643674b" [[package]] name = "rustls-webpki" @@ -2801,6 +3447,12 @@ dependencies = [ "libc", ] +[[package]] +name = "semver" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" + [[package]] name = "seq-macro" version = "0.3.5" @@ -2809,29 +3461,29 @@ checksum = "a3f0bf26fd526d2a95683cd0f87bf103b8539e2ca1ef48ce002d67aad59aa0b4" [[package]] name = "serde" -version = "1.0.208" +version = "1.0.215" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cff085d2cb684faa248efb494c39b68e522822ac0de72ccf08109abde717cfb2" +checksum = "6513c1ad0b11a9376da888e3e0baa0077f1aed55c17f50e7b2397136129fb88f" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.208" +version = "1.0.215" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24008e81ff7613ed8e5ba0cfaf24e2c2f1e5b8a0495711e44fcd4882fca62bcf" +checksum = "ad1e866f866923f252f05c889987993144fb74e722403468a4ebd70c3cd756c0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.87", ] [[package]] name = "serde_json" -version = "1.0.125" +version = "1.0.133" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83c8e735a073ccf5be70aa8066aa984eaf2fa000db6c8d0100ae605b366d31ed" +checksum = "c7fceb2473b9166b2294ef05efcb65a3db80803f0b03ef86a5fc88a2b85ee377" dependencies = [ "itoa", "memchr", @@ -2879,6 +3531,36 @@ dependencies = [ "serde", ] +[[package]] +name = "serde_with" +version = "3.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e28bdad6db2b8340e449f7108f020b3b092e8583a9e3fb82713e1d4e71fe817" +dependencies = [ + "base64 0.22.1", + "chrono", + "hex", + "indexmap 1.9.3", + "indexmap 2.4.0", + "serde", + "serde_derive", + "serde_json", + "serde_with_macros", + "time", +] + +[[package]] +name = "serde_with_macros" +version = "3.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d846214a9854ef724f3da161b426242d8de7c1fc7de2f89bb1efcb154dca79d" +dependencies = [ + "darling 0.20.10", + "proc-macro2", + "quote", + "syn 2.0.87", +] + [[package]] name = "sharded-slab" version = "0.1.7" @@ -2894,6 +3576,27 @@ version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" +[[package]] +name = "signal-hook" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8621587d4798caf8eb44879d42e56b9a93ea5dcd315a6487c357130095b62801" +dependencies = [ + "libc", + "signal-hook-registry", +] + +[[package]] +name = "signal-hook-mio" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34db1a06d485c9142248b7a054f034b349b212551f3dfd19c94d45a754a217cd" +dependencies = [ + "libc", + "mio", + "signal-hook", +] + [[package]] name = "signal-hook-registry" version = "1.4.2" @@ -2922,6 +3625,12 @@ version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe" +[[package]] +name = "similar" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1de1d4f81173b03af4c0cbed3c898f6bff5b870e4a7f5d6f4057d62a7a4b686e" + [[package]] name = "slab" version = "0.4.9" @@ -2937,6 +3646,12 @@ version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" +[[package]] +name = "smawk" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7c388c1b5e93756d0c740965c41e8822f866621d41acbdf6336a6a168f8840c" + [[package]] name = "socket2" version = "0.5.7" @@ -2974,6 +3689,25 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" +[[package]] +name = "stacker" +version = "0.1.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "799c883d55abdb5e98af1a7b3f23b9b6de8ecada0ecac058672d7635eb48ca7b" +dependencies = [ + "cc", + "cfg-if", + "libc", + "psm", + "windows-sys 0.59.0", +] + +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + [[package]] name = "strsim" version = "0.10.0" @@ -2986,6 +3720,28 @@ version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" +[[package]] +name = "strum" +version = "0.26.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fec0f0aef304996cf250b31b5a10dee7980c85da9d759361292b8bca5a18f06" +dependencies = [ + "strum_macros", +] + +[[package]] +name = "strum_macros" +version = "0.26.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be" +dependencies = [ + "heck 0.5.0", + "proc-macro2", + "quote", + "rustversion", + "syn 2.0.87", +] + [[package]] name = "subtle" version = "2.6.1" @@ -3005,9 +3761,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.75" +version = "2.0.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6af063034fc1935ede7be0122941bafa9bacb949334d090b77ca98b5817c7d9" +checksum = "25aa4ce346d03a6dcd68dd8b4010bcb74e54e62c90c573f394c46eae99aba32d" dependencies = [ "proc-macro2", "quote", @@ -3036,6 +3792,9 @@ name = "sync_wrapper" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" +dependencies = [ + "futures-core", +] [[package]] name = "synstructure" @@ -3045,7 +3804,7 @@ checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.87", ] [[package]] @@ -3058,7 +3817,7 @@ dependencies = [ "byteorder", "enum-as-inner", "libc", - "thiserror", + "thiserror 1.0.63", "walkdir", ] @@ -3085,9 +3844,9 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.12.0" +version = "3.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04cbcdd0c794ebb0d4cf35e88edd2f7d2c4c3e9a5a6dab322839b321c6a87a64" +checksum = "28cce251fcbc87fac86a866eeb0d6c2d536fc16d06f184bb61aeae11aa4cee0c" dependencies = [ "cfg-if", "fastrand", @@ -3096,13 +3855,33 @@ dependencies = [ "windows-sys 0.59.0", ] +[[package]] +name = "textwrap" +version = "0.16.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23d434d3f8967a09480fb04132ebe0a3e088c173e6d0ee7897abbdf4eab0f8b9" +dependencies = [ + "smawk", + "unicode-linebreak", + "unicode-width 0.1.13", +] + [[package]] name = "thiserror" version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" dependencies = [ - "thiserror-impl", + "thiserror-impl 1.0.63", +] + +[[package]] +name = "thiserror" +version = "2.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c006c85c7651b3cf2ada4584faa36773bd07bac24acfb39f3c431b36d7e667aa" +dependencies = [ + "thiserror-impl 2.0.3", ] [[package]] @@ -3113,7 +3892,18 @@ checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.87", +] + +[[package]] +name = "thiserror-impl" +version = "2.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f077553d607adc1caf65430528a576c757a71ed73944b66ebb58ef2bbd243568" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", ] [[package]] @@ -3137,6 +3927,37 @@ dependencies = [ "weezl", ] +[[package]] +name = "time" +version = "0.3.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" +dependencies = [ + "deranged", + "itoa", + "num-conv", + "powerfmt", + "serde", + "time-core", + "time-macros", +] + +[[package]] +name = "time-core" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" + +[[package]] +name = "time-macros" +version = "0.2.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" +dependencies = [ + "num-conv", + "time-core", +] + [[package]] name = "tinyvec" version = "1.8.0" @@ -3179,7 +4000,7 @@ dependencies = [ "serde", "serde_json", "spm_precompiled", - "thiserror", + "thiserror 1.0.63", "unicode-normalization-alignments", "unicode-segmentation", "unicode_categories", @@ -3187,9 +4008,9 @@ dependencies = [ [[package]] name = "tokio" -version = "1.39.3" +version = "1.41.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9babc99b9923bfa4804bd74722ff02c0381021eafa4db9949217e3be8e84fff5" +checksum = "22cfb5bee7a6a52939ca9224d6ac897bb669134078daa8735560897f69de4d33" dependencies = [ "backtrace", "bytes", @@ -3211,7 +4032,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.87", ] [[package]] @@ -3226,9 +4047,9 @@ dependencies = [ [[package]] name = "tokio-stream" -version = "0.1.15" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "267ac89e0bec6e691e5813911606935d77c476ff49024f98abcea3e7b15e37af" +checksum = "4f4e6ce100d0eb49a2734f8c0812bcd324cf357d21810932c5df6b96ef2b86f1" dependencies = [ "futures-core", "pin-project-lite", @@ -3249,6 +4070,15 @@ dependencies = [ "tokio", ] +[[package]] +name = "toml" +version = "0.5.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" +dependencies = [ + "serde", +] + [[package]] name = "toml" version = "0.8.19" @@ -3258,7 +4088,7 @@ dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit 0.22.20", + "toml_edit", ] [[package]] @@ -3270,28 +4100,17 @@ dependencies = [ "serde", ] -[[package]] -name = "toml_edit" -version = "0.21.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" -dependencies = [ - "indexmap", - "toml_datetime", - "winnow 0.5.40", -] - [[package]] name = "toml_edit" version = "0.22.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "583c44c02ad26b0c3f3066fe629275e50627026c51ac2e595cca4c230ce1ce1d" dependencies = [ - "indexmap", + "indexmap 2.4.0", "serde", "serde_spanned", "toml_datetime", - "winnow 0.6.18", + "winnow", ] [[package]] @@ -3367,7 +4186,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.87", ] [[package]] @@ -3391,6 +4210,16 @@ dependencies = [ "valuable", ] +[[package]] +name = "tracing-error" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d686ec1c0f384b1277f097b2f279a2ecc11afe8c133c1aabf036a27cb4cd206e" +dependencies = [ + "tracing", + "tracing-subscriber", +] + [[package]] name = "tracing-log" version = "0.2.0" @@ -3402,6 +4231,16 @@ dependencies = [ "tracing-core", ] +[[package]] +name = "tracing-serde" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc6b213177105856957181934e4920de57730fc69bf42c37ee5bb664d406d9e1" +dependencies = [ + "serde", + "tracing-core", +] + [[package]] name = "tracing-subscriber" version = "0.3.18" @@ -3412,12 +4251,15 @@ dependencies = [ "nu-ansi-term", "once_cell", "regex", + "serde", + "serde_json", "sharded-slab", "smallvec", "thread_local", "tracing", "tracing-core", "tracing-log", + "tracing-serde", ] [[package]] @@ -3455,9 +4297,15 @@ checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" [[package]] name = "unicode-ident" -version = "1.0.12" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" + +[[package]] +name = "unicode-linebreak" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b09c83c3c29d37506a3e260c08c03743a6bb66a9cd432c6934ab501a190571f" [[package]] name = "unicode-normalization" @@ -3483,12 +4331,29 @@ version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" +[[package]] +name = "unicode-truncate" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3644627a5af5fa321c95b9b235a72fd24cd29c648c2c379431e6628655627bf" +dependencies = [ + "itertools 0.13.0", + "unicode-segmentation", + "unicode-width 0.1.13", +] + [[package]] name = "unicode-width" version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0336d538f7abc86d282a4189614dfaa90810dfc2c6f6427eaf88e16311dd225d" +[[package]] +name = "unicode-width" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fc81956842c57dac11422a97c3b8195a1ff727f06e85c84ed2e8aa277c9a0fd" + [[package]] name = "unicode_categories" version = "0.1.1" @@ -3529,6 +4394,7 @@ dependencies = [ "form_urlencoded", "idna", "percent-encoding", + "serde", ] [[package]] @@ -3608,7 +4474,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.87", "wasm-bindgen-shared", ] @@ -3642,7 +4508,7 @@ checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.87", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -3653,6 +4519,19 @@ version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484" +[[package]] +name = "wasm-streams" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e072d4e72f700fb3443d8fe94a39315df013eef1104903cdb0a2abd322bbecd" +dependencies = [ + "futures-util", + "js-sys", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + [[package]] name = "web-sys" version = "0.3.70" @@ -3678,6 +4557,18 @@ version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "53a85b86a771b1c87058196170769dd264f66c0782acf1ae6cc51bfd64b39082" +[[package]] +name = "which" +version = "4.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" +dependencies = [ + "either", + "home", + "once_cell", + "rustix", +] + [[package]] name = "wide" version = "0.7.28" @@ -3719,6 +4610,45 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +[[package]] +name = "windows-core" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-registry" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e400001bb720a623c1c69032f8e3e4cf09984deec740f007dd2b03ec864804b0" +dependencies = [ + "windows-result", + "windows-strings", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-result" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-strings" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" +dependencies = [ + "windows-result", + "windows-targets 0.52.6", +] + [[package]] name = "windows-sys" version = "0.48.0" @@ -3867,15 +4797,6 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" -[[package]] -name = "winnow" -version = "0.5.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" -dependencies = [ - "memchr", -] - [[package]] name = "winnow" version = "0.6.18" @@ -3895,6 +4816,12 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "yansi" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfe53a6657fd280eaa890a3bc59152892ffa3e30101319d168b781ed6529b049" + [[package]] name = "yoke" version = "0.7.4" @@ -3915,7 +4842,7 @@ checksum = "28cc31741b18cb6f1d5ff12f5b7523e3d6eb0852bbbad19d73905511d9849b95" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.87", "synstructure", ] @@ -3937,7 +4864,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.87", ] [[package]] @@ -3957,7 +4884,7 @@ checksum = "0ea7b4a3637ea8669cedf0f1fd5c286a17f3de97b8dd5a70a6c167a1730e63a5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.75", + "syn 2.0.87", "synstructure", ] @@ -3977,9 +4904,9 @@ dependencies = [ "crc32fast", "crossbeam-utils", "displaydoc", - "indexmap", + "indexmap 2.4.0", "num_enum", - "thiserror", + "thiserror 1.0.63", ] [[package]] diff --git a/djinn-rs/Cargo.toml b/Cargo.toml similarity index 92% rename from djinn-rs/Cargo.toml rename to Cargo.toml index b80601d..d49d857 100644 --- a/djinn-rs/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [workspace] -members = [ "djinn-cli","djinn-core", "djinn-server"] -default-members = ["djinn-cli"] +members = [ "djinn-cli","djinn-core", "djinn-server", "ollama-cli" ] +default-members = ["djinn-cli", "ollama-cli"] resolver = "2" [workspace.package] diff --git a/README.md b/README.md index ab2b9da..7af4c63 100644 --- a/README.md +++ b/README.md @@ -1,22 +1,37 @@ -# djinn +# `djinn-rs` -Right now the Rust implementation is most complete. +a Rust playground +for running language models +and some other machine learning models. -Run with command line arguments: +## `djinn-cli` +the main entrypoint +for running either +a server (with `djinn-server`) +or a one shot inference. -```sh -$ cd djinn-rs -$ cargo run -- --help -# example prompt -$ cargo run --release -- llama --disable-flash-attention --model-version v1 --dtype f32 - "In a world" --sample-len 256 --repeat-penalty 50 -``` +## `djinn-core` + +core ML functionality and model implementations. + +## `djinn-server` -## supported models +an HTTP server +with an API +and HTMX front-end +for running models -- Llama 1 -- YOLOv8 +# examples + +run the server on a Macbook M-series: + +```sh +cargo run --release --features djinn-core/mac -- server-config --name test +``` -### TODO -- Llama 2 -- [LoRA](https://github.com/EricLBuehler/candle-lora) +breakdown: + - `cargo run --release` to build in release mode for best performance + - `--features djinn-core/mac` to enable CoreML acceleration + - `--` everything before this are `cargo` args and everything after are `djinn` args + - `server-config` command to run the server from a config file + - `--name test` to run the config named `test`, in `./configs/server/test.toml` diff --git a/djinn-rs/api/djinn/bruno.json b/api/djinn/bruno.json similarity index 100% rename from djinn-rs/api/djinn/bruno.json rename to api/djinn/bruno.json diff --git a/djinn-rs/api/djinn/complete.bru b/api/djinn/complete.bru similarity index 100% rename from djinn-rs/api/djinn/complete.bru rename to api/djinn/complete.bru diff --git a/djinn-rs/api/djinn/environments/hoss.bru b/api/djinn/environments/hoss.bru similarity index 100% rename from djinn-rs/api/djinn/environments/hoss.bru rename to api/djinn/environments/hoss.bru diff --git a/djinn-rs/api/djinn/healthcheck.bru b/api/djinn/healthcheck.bru similarity index 100% rename from djinn-rs/api/djinn/healthcheck.bru rename to api/djinn/healthcheck.bru diff --git a/djinn-rs/api/djinn/index.bru b/api/djinn/index.bru similarity index 100% rename from djinn-rs/api/djinn/index.bru rename to api/djinn/index.bru diff --git a/djinn-rs/configs/model/q_mistral.toml b/configs/model/q_mistral.toml similarity index 100% rename from djinn-rs/configs/model/q_mistral.toml rename to configs/model/q_mistral.toml diff --git a/djinn-rs/configs/model/starcoder.toml b/configs/model/starcoder.toml similarity index 100% rename from djinn-rs/configs/model/starcoder.toml rename to configs/model/starcoder.toml diff --git a/djinn-rs/configs/server/test.toml b/configs/server/test.toml similarity index 100% rename from djinn-rs/configs/server/test.toml rename to configs/server/test.toml diff --git a/djinn-rs/djinn-cli/Cargo.toml b/djinn-cli/Cargo.toml similarity index 100% rename from djinn-rs/djinn-cli/Cargo.toml rename to djinn-cli/Cargo.toml diff --git a/djinn-rs/djinn-cli/src/main.rs b/djinn-cli/src/main.rs similarity index 100% rename from djinn-rs/djinn-cli/src/main.rs rename to djinn-cli/src/main.rs diff --git a/djinn-rs/djinn-cli/src/mistral.rs b/djinn-cli/src/mistral.rs similarity index 100% rename from djinn-rs/djinn-cli/src/mistral.rs rename to djinn-cli/src/mistral.rs diff --git a/djinn-rs/djinn-cli/src/server.rs b/djinn-cli/src/server.rs similarity index 100% rename from djinn-rs/djinn-cli/src/server.rs rename to djinn-cli/src/server.rs diff --git a/djinn-rs/djinn-core/Cargo.toml b/djinn-core/Cargo.toml similarity index 100% rename from djinn-rs/djinn-core/Cargo.toml rename to djinn-core/Cargo.toml diff --git a/djinn-rs/djinn-core/data/font/roboto-mono-stripped.ttf b/djinn-core/data/font/roboto-mono-stripped.ttf similarity index 100% rename from djinn-rs/djinn-core/data/font/roboto-mono-stripped.ttf rename to djinn-core/data/font/roboto-mono-stripped.ttf diff --git a/djinn-rs/djinn-core/src/coco_classes.rs b/djinn-core/src/coco_classes.rs similarity index 100% rename from djinn-rs/djinn-core/src/coco_classes.rs rename to djinn-core/src/coco_classes.rs diff --git a/djinn-rs/djinn-core/src/config.rs b/djinn-core/src/config.rs similarity index 100% rename from djinn-rs/djinn-core/src/config.rs rename to djinn-core/src/config.rs diff --git a/djinn-rs/djinn-core/src/device.rs b/djinn-core/src/device.rs similarity index 100% rename from djinn-rs/djinn-core/src/device.rs rename to djinn-core/src/device.rs diff --git a/djinn-rs/djinn-core/src/error.rs b/djinn-core/src/error.rs similarity index 100% rename from djinn-rs/djinn-core/src/error.rs rename to djinn-core/src/error.rs diff --git a/djinn-rs/djinn-core/src/font.rs b/djinn-core/src/font.rs similarity index 100% rename from djinn-rs/djinn-core/src/font.rs rename to djinn-core/src/font.rs diff --git a/djinn-rs/djinn-core/src/hf_hub_ext.rs b/djinn-core/src/hf_hub_ext.rs similarity index 100% rename from djinn-rs/djinn-core/src/hf_hub_ext.rs rename to djinn-core/src/hf_hub_ext.rs diff --git a/djinn-rs/djinn-core/src/lib.rs b/djinn-core/src/lib.rs similarity index 100% rename from djinn-rs/djinn-core/src/lib.rs rename to djinn-core/src/lib.rs diff --git a/djinn-rs/djinn-core/src/lm/config.rs b/djinn-core/src/lm/config.rs similarity index 100% rename from djinn-rs/djinn-core/src/lm/config.rs rename to djinn-core/src/lm/config.rs diff --git a/djinn-rs/djinn-core/src/lm/mistral/mod.rs b/djinn-core/src/lm/mistral/mod.rs similarity index 100% rename from djinn-rs/djinn-core/src/lm/mistral/mod.rs rename to djinn-core/src/lm/mistral/mod.rs diff --git a/djinn-rs/djinn-core/src/lm/mod.rs b/djinn-core/src/lm/mod.rs similarity index 100% rename from djinn-rs/djinn-core/src/lm/mod.rs rename to djinn-core/src/lm/mod.rs diff --git a/djinn-rs/djinn-core/src/lm/model.rs b/djinn-core/src/lm/model.rs similarity index 100% rename from djinn-rs/djinn-core/src/lm/model.rs rename to djinn-core/src/lm/model.rs diff --git a/djinn-rs/djinn-core/src/token_output_stream.rs b/djinn-core/src/token_output_stream.rs similarity index 100% rename from djinn-rs/djinn-core/src/token_output_stream.rs rename to djinn-core/src/token_output_stream.rs diff --git a/djinn-rs/djinn-core/src/yolov8/args.rs b/djinn-core/src/yolov8/args.rs similarity index 100% rename from djinn-rs/djinn-core/src/yolov8/args.rs rename to djinn-core/src/yolov8/args.rs diff --git a/djinn-rs/djinn-core/src/yolov8/mod.rs b/djinn-core/src/yolov8/mod.rs similarity index 100% rename from djinn-rs/djinn-core/src/yolov8/mod.rs rename to djinn-core/src/yolov8/mod.rs diff --git a/djinn-rs/djinn-core/src/yolov8/model.rs b/djinn-core/src/yolov8/model.rs similarity index 100% rename from djinn-rs/djinn-core/src/yolov8/model.rs rename to djinn-core/src/yolov8/model.rs diff --git a/djinn-rs/README.md b/djinn-rs/README.md deleted file mode 100644 index 7af4c63..0000000 --- a/djinn-rs/README.md +++ /dev/null @@ -1,37 +0,0 @@ -# `djinn-rs` - -a Rust playground -for running language models -and some other machine learning models. - -## `djinn-cli` -the main entrypoint -for running either -a server (with `djinn-server`) -or a one shot inference. - -## `djinn-core` - -core ML functionality and model implementations. - -## `djinn-server` - -an HTTP server -with an API -and HTMX front-end -for running models - -# examples - -run the server on a Macbook M-series: - -```sh -cargo run --release --features djinn-core/mac -- server-config --name test -``` - -breakdown: - - `cargo run --release` to build in release mode for best performance - - `--features djinn-core/mac` to enable CoreML acceleration - - `--` everything before this are `cargo` args and everything after are `djinn` args - - `server-config` command to run the server from a config file - - `--name test` to run the config named `test`, in `./configs/server/test.toml` diff --git a/djinn-rs/djinn-server/Cargo.toml b/djinn-server/Cargo.toml similarity index 100% rename from djinn-rs/djinn-server/Cargo.toml rename to djinn-server/Cargo.toml diff --git a/djinn-rs/djinn-server/assets/about.txt b/djinn-server/assets/about.txt similarity index 100% rename from djinn-rs/djinn-server/assets/about.txt rename to djinn-server/assets/about.txt diff --git a/djinn-rs/djinn-server/assets/android-chrome-192x192.png b/djinn-server/assets/android-chrome-192x192.png similarity index 100% rename from djinn-rs/djinn-server/assets/android-chrome-192x192.png rename to djinn-server/assets/android-chrome-192x192.png diff --git a/djinn-rs/djinn-server/assets/android-chrome-512x512.png b/djinn-server/assets/android-chrome-512x512.png similarity index 100% rename from djinn-rs/djinn-server/assets/android-chrome-512x512.png rename to djinn-server/assets/android-chrome-512x512.png diff --git a/djinn-rs/djinn-server/assets/apple-touch-icon.png b/djinn-server/assets/apple-touch-icon.png similarity index 100% rename from djinn-rs/djinn-server/assets/apple-touch-icon.png rename to djinn-server/assets/apple-touch-icon.png diff --git a/djinn-rs/djinn-server/assets/favicon-16x16.png b/djinn-server/assets/favicon-16x16.png similarity index 100% rename from djinn-rs/djinn-server/assets/favicon-16x16.png rename to djinn-server/assets/favicon-16x16.png diff --git a/djinn-rs/djinn-server/assets/favicon-32x32.png b/djinn-server/assets/favicon-32x32.png similarity index 100% rename from djinn-rs/djinn-server/assets/favicon-32x32.png rename to djinn-server/assets/favicon-32x32.png diff --git a/djinn-rs/djinn-server/assets/favicon.ico b/djinn-server/assets/favicon.ico similarity index 100% rename from djinn-rs/djinn-server/assets/favicon.ico rename to djinn-server/assets/favicon.ico diff --git a/djinn-rs/djinn-server/assets/site.webmanifest b/djinn-server/assets/site.webmanifest similarity index 100% rename from djinn-rs/djinn-server/assets/site.webmanifest rename to djinn-server/assets/site.webmanifest diff --git a/djinn-rs/djinn-server/assets/styles.css b/djinn-server/assets/styles.css similarity index 100% rename from djinn-rs/djinn-server/assets/styles.css rename to djinn-server/assets/styles.css diff --git a/djinn-rs/djinn-server/src/complete/mod.rs b/djinn-server/src/complete/mod.rs similarity index 100% rename from djinn-rs/djinn-server/src/complete/mod.rs rename to djinn-server/src/complete/mod.rs diff --git a/djinn-rs/djinn-server/src/error.rs b/djinn-server/src/error.rs similarity index 100% rename from djinn-rs/djinn-server/src/error.rs rename to djinn-server/src/error.rs diff --git a/djinn-rs/djinn-server/src/lib.rs b/djinn-server/src/lib.rs similarity index 100% rename from djinn-rs/djinn-server/src/lib.rs rename to djinn-server/src/lib.rs diff --git a/djinn-rs/djinn-server/src/server/mod.rs b/djinn-server/src/server/mod.rs similarity index 100% rename from djinn-rs/djinn-server/src/server/mod.rs rename to djinn-server/src/server/mod.rs diff --git a/ollama/.gitignore b/ollama-cli/.gitignore similarity index 100% rename from ollama/.gitignore rename to ollama-cli/.gitignore diff --git a/ollama/Cargo.lock b/ollama-cli/Cargo.lock similarity index 100% rename from ollama/Cargo.lock rename to ollama-cli/Cargo.lock diff --git a/ollama/Cargo.toml b/ollama-cli/Cargo.toml similarity index 100% rename from ollama/Cargo.toml rename to ollama-cli/Cargo.toml diff --git a/ollama/bruno/OpenAI/chat.bru b/ollama-cli/bruno/OpenAI/chat.bru similarity index 100% rename from ollama/bruno/OpenAI/chat.bru rename to ollama-cli/bruno/OpenAI/chat.bru diff --git a/ollama/bruno/bruno.json b/ollama-cli/bruno/bruno.json similarity index 100% rename from ollama/bruno/bruno.json rename to ollama-cli/bruno/bruno.json diff --git a/ollama/bruno/chat.bru b/ollama-cli/bruno/chat.bru similarity index 100% rename from ollama/bruno/chat.bru rename to ollama-cli/bruno/chat.bru diff --git a/ollama/bruno/embeddings.bru b/ollama-cli/bruno/embeddings.bru similarity index 100% rename from ollama/bruno/embeddings.bru rename to ollama-cli/bruno/embeddings.bru diff --git a/ollama/bruno/environments/hoss.bru b/ollama-cli/bruno/environments/hoss.bru similarity index 100% rename from ollama/bruno/environments/hoss.bru rename to ollama-cli/bruno/environments/hoss.bru diff --git a/ollama/bruno/environments/local.bru b/ollama-cli/bruno/environments/local.bru similarity index 100% rename from ollama/bruno/environments/local.bru rename to ollama-cli/bruno/environments/local.bru diff --git a/ollama/bruno/environments/local_proxy.bru b/ollama-cli/bruno/environments/local_proxy.bru similarity index 100% rename from ollama/bruno/environments/local_proxy.bru rename to ollama-cli/bruno/environments/local_proxy.bru diff --git a/ollama/bruno/environments/tunnel.bru b/ollama-cli/bruno/environments/tunnel.bru similarity index 100% rename from ollama/bruno/environments/tunnel.bru rename to ollama-cli/bruno/environments/tunnel.bru diff --git a/ollama/bruno/generate.bru b/ollama-cli/bruno/generate.bru similarity index 100% rename from ollama/bruno/generate.bru rename to ollama-cli/bruno/generate.bru diff --git a/ollama/bruno/list models.bru b/ollama-cli/bruno/list models.bru similarity index 100% rename from ollama/bruno/list models.bru rename to ollama-cli/bruno/list models.bru diff --git a/ollama/bruno/proxied/chat.bru b/ollama-cli/bruno/proxied/chat.bru similarity index 100% rename from ollama/bruno/proxied/chat.bru rename to ollama-cli/bruno/proxied/chat.bru diff --git a/ollama/bruno/proxied/health check.bru b/ollama-cli/bruno/proxied/health check.bru similarity index 100% rename from ollama/bruno/proxied/health check.bru rename to ollama-cli/bruno/proxied/health check.bru diff --git a/ollama/bruno/pull a model.bru b/ollama-cli/bruno/pull a model.bru similarity index 100% rename from ollama/bruno/pull a model.bru rename to ollama-cli/bruno/pull a model.bru diff --git a/ollama/bruno/show info.bru b/ollama-cli/bruno/show info.bru similarity index 100% rename from ollama/bruno/show info.bru rename to ollama-cli/bruno/show info.bru diff --git a/ollama/scripts/nushell.nu b/ollama-cli/scripts/nushell.nu similarity index 100% rename from ollama/scripts/nushell.nu rename to ollama-cli/scripts/nushell.nu diff --git a/ollama/src/bytes_size.rs b/ollama-cli/src/bytes_size.rs similarity index 100% rename from ollama/src/bytes_size.rs rename to ollama-cli/src/bytes_size.rs diff --git a/ollama/src/error.rs b/ollama-cli/src/error.rs similarity index 100% rename from ollama/src/error.rs rename to ollama-cli/src/error.rs diff --git a/ollama/src/lm.rs b/ollama-cli/src/lm.rs similarity index 100% rename from ollama/src/lm.rs rename to ollama-cli/src/lm.rs diff --git a/ollama/src/main.rs b/ollama-cli/src/main.rs similarity index 100% rename from ollama/src/main.rs rename to ollama-cli/src/main.rs diff --git a/ollama/src/ollama/chat.rs b/ollama-cli/src/ollama/chat.rs similarity index 100% rename from ollama/src/ollama/chat.rs rename to ollama-cli/src/ollama/chat.rs diff --git a/ollama/src/ollama/embeddings.rs b/ollama-cli/src/ollama/embeddings.rs similarity index 100% rename from ollama/src/ollama/embeddings.rs rename to ollama-cli/src/ollama/embeddings.rs diff --git a/ollama/src/ollama/generate.rs b/ollama-cli/src/ollama/generate.rs similarity index 100% rename from ollama/src/ollama/generate.rs rename to ollama-cli/src/ollama/generate.rs diff --git a/ollama/src/ollama/mod.rs b/ollama-cli/src/ollama/mod.rs similarity index 100% rename from ollama/src/ollama/mod.rs rename to ollama-cli/src/ollama/mod.rs diff --git a/ollama/src/tui/chat/mod.rs b/ollama-cli/src/tui/chat/mod.rs similarity index 100% rename from ollama/src/tui/chat/mod.rs rename to ollama-cli/src/tui/chat/mod.rs diff --git a/ollama/src/tui/event.rs b/ollama-cli/src/tui/event.rs similarity index 100% rename from ollama/src/tui/event.rs rename to ollama-cli/src/tui/event.rs diff --git a/ollama/src/tui/input/mod.rs b/ollama-cli/src/tui/input/mod.rs similarity index 100% rename from ollama/src/tui/input/mod.rs rename to ollama-cli/src/tui/input/mod.rs diff --git a/ollama/src/tui/messages/fullscreen.rs b/ollama-cli/src/tui/messages/fullscreen.rs similarity index 100% rename from ollama/src/tui/messages/fullscreen.rs rename to ollama-cli/src/tui/messages/fullscreen.rs diff --git a/ollama/src/tui/messages/highlight_spacing.rs b/ollama-cli/src/tui/messages/highlight_spacing.rs similarity index 100% rename from ollama/src/tui/messages/highlight_spacing.rs rename to ollama-cli/src/tui/messages/highlight_spacing.rs diff --git a/ollama/src/tui/messages/mod.rs b/ollama-cli/src/tui/messages/mod.rs similarity index 96% rename from ollama/src/tui/messages/mod.rs rename to ollama-cli/src/tui/messages/mod.rs index 9e011ad..f095041 100644 --- a/ollama/src/tui/messages/mod.rs +++ b/ollama-cli/src/tui/messages/mod.rs @@ -21,8 +21,6 @@ pub mod widget_item; pub mod widget_rendering; pub mod widget_state; -const TEST_OUTPUT: &str = include_str!("../../../example_output.txt"); - #[derive(Clone, Debug)] pub struct MessagesViewModel { /// Streaming response from the model before it's finished. @@ -37,7 +35,7 @@ impl Default for MessagesViewModel { fn default() -> Self { Self { model_stream: Default::default(), - messages: VecDeque::from([Message::Assistant(TEST_OUTPUT.into())]), + messages: VecDeque::from([Message::Assistant("".into())]), state: Default::default(), } } diff --git a/ollama/src/tui/messages/state.rs b/ollama-cli/src/tui/messages/state.rs similarity index 100% rename from ollama/src/tui/messages/state.rs rename to ollama-cli/src/tui/messages/state.rs diff --git a/ollama/src/tui/messages/view.rs b/ollama-cli/src/tui/messages/view.rs similarity index 100% rename from ollama/src/tui/messages/view.rs rename to ollama-cli/src/tui/messages/view.rs diff --git a/ollama/src/tui/messages/widget.rs b/ollama-cli/src/tui/messages/widget.rs similarity index 100% rename from ollama/src/tui/messages/widget.rs rename to ollama-cli/src/tui/messages/widget.rs diff --git a/ollama/src/tui/messages/widget_item.rs b/ollama-cli/src/tui/messages/widget_item.rs similarity index 100% rename from ollama/src/tui/messages/widget_item.rs rename to ollama-cli/src/tui/messages/widget_item.rs diff --git a/ollama/src/tui/messages/widget_rendering.rs b/ollama-cli/src/tui/messages/widget_rendering.rs similarity index 100% rename from ollama/src/tui/messages/widget_rendering.rs rename to ollama-cli/src/tui/messages/widget_rendering.rs diff --git a/ollama/src/tui/messages/widget_state.rs b/ollama-cli/src/tui/messages/widget_state.rs similarity index 100% rename from ollama/src/tui/messages/widget_state.rs rename to ollama-cli/src/tui/messages/widget_state.rs diff --git a/ollama/src/tui/mod.rs b/ollama-cli/src/tui/mod.rs similarity index 100% rename from ollama/src/tui/mod.rs rename to ollama-cli/src/tui/mod.rs diff --git a/ollama/src/tui/model_context.rs b/ollama-cli/src/tui/model_context.rs similarity index 100% rename from ollama/src/tui/model_context.rs rename to ollama-cli/src/tui/model_context.rs diff --git a/ollama/src/tui/models/mod.rs b/ollama-cli/src/tui/models/mod.rs similarity index 100% rename from ollama/src/tui/models/mod.rs rename to ollama-cli/src/tui/models/mod.rs diff --git a/ollama/src/tui/models/model_info.rs b/ollama-cli/src/tui/models/model_info.rs similarity index 100% rename from ollama/src/tui/models/model_info.rs rename to ollama-cli/src/tui/models/model_info.rs diff --git a/ollama/src/tui/models/model_list.rs b/ollama-cli/src/tui/models/model_list.rs similarity index 100% rename from ollama/src/tui/models/model_list.rs rename to ollama-cli/src/tui/models/model_list.rs diff --git a/ollama/src/tui/models/modelfile.rs b/ollama-cli/src/tui/models/modelfile.rs similarity index 100% rename from ollama/src/tui/models/modelfile.rs rename to ollama-cli/src/tui/models/modelfile.rs diff --git a/ollama/src/tui/widgets_ext.rs b/ollama-cli/src/tui/widgets_ext.rs similarity index 100% rename from ollama/src/tui/widgets_ext.rs rename to ollama-cli/src/tui/widgets_ext.rs diff --git a/ollama/typos.toml b/ollama-cli/typos.toml similarity index 100% rename from ollama/typos.toml rename to ollama-cli/typos.toml diff --git a/djinn-rs/rust-toolchain.toml b/rust-toolchain.toml similarity index 100% rename from djinn-rs/rust-toolchain.toml rename to rust-toolchain.toml diff --git a/djinn-rs/scripts/nushell.nu b/scripts/nushell.nu similarity index 100% rename from djinn-rs/scripts/nushell.nu rename to scripts/nushell.nu