difftreelog
refactor use nix bindings instead of REPL
in: trunk
33 files changed
Cargo.lockdiffbeforeafterboth222223[[package]]23[[package]]24name = "adler2"24name = "adler2"25version = "2.0.0"25version = "2.0.1"26source = "registry+https://github.com/rust-lang/crates.io-index"26source = "registry+https://github.com/rust-lang/crates.io-index"27checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627"27checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa"282829[[package]]29[[package]]30name = "aead"30name = "aead"636364[[package]]64[[package]]65name = "age"65name = "age"66version = "0.11.0"66version = "0.11.1"67source = "registry+https://github.com/rust-lang/crates.io-index"67source = "registry+https://github.com/rust-lang/crates.io-index"68checksum = "2020562e68d7a02c2743707b262c62484b340a296924a5e4146d5a0a96ca8103"68checksum = "57fc171f4874fa10887e47088f81a55fcf030cd421aa31ec2b370cafebcc608a"69dependencies = [69dependencies = [70 "aes",70 "aes",71 "aes-gcm",71 "aes-gcm",127127128[[package]]128[[package]]129name = "alejandra"129name = "alejandra"130version = "3.1.0"130version = "4.0.0"131source = "git+https://github.com/kamadorueda/alejandra#264e23546663a5676a77174cab31340a81aa2cc0"131source = "git+https://github.com/kamadorueda/alejandra#c68bef57c1db3add865493d9cb741a14618bdc28"132dependencies = [132dependencies = [133 "mimalloc",133 "mimalloc",134 "rnix",134 "rnix",135 "rowan",135 "rowan",136 "serde",136]137]137138138[[package]]139[[package]]152153153[[package]]154[[package]]154name = "anstream"155name = "anstream"155version = "0.6.18"156version = "0.6.20"156source = "registry+https://github.com/rust-lang/crates.io-index"157source = "registry+https://github.com/rust-lang/crates.io-index"157checksum = "8acc5369981196006228e28809f761875c0327210a891e941f4c683b3a99529b"158checksum = "3ae563653d1938f79b1ab1b5e668c87c76a9930414574a6583a7b7e11a8e6192"158dependencies = [159dependencies = [159 "anstyle",160 "anstyle",160 "anstyle-parse",161 "anstyle-parse",167168168[[package]]169[[package]]169name = "anstyle"170name = "anstyle"170version = "1.0.10"171version = "1.0.11"171source = "registry+https://github.com/rust-lang/crates.io-index"172source = "registry+https://github.com/rust-lang/crates.io-index"172checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9"173checksum = "862ed96ca487e809f1c8e5a8447f6ee2cf102f846893800b20cebdf541fc6bbd"173174174[[package]]175[[package]]175name = "anstyle-parse"176name = "anstyle-parse"176version = "0.2.6"177version = "0.2.7"177source = "registry+https://github.com/rust-lang/crates.io-index"178source = "registry+https://github.com/rust-lang/crates.io-index"178checksum = "3b2d16507662817a6a20a9ea92df6652ee4f94f914589377d69f3b21bc5798a9"179checksum = "4e7644824f0aa2c7b9384579234ef10eb7efb6a0deb83f9630a49594dd9c15c2"179dependencies = [180dependencies = [180 "utf8parse",181 "utf8parse",181]182]182183183[[package]]184[[package]]184name = "anstyle-query"185name = "anstyle-query"185version = "1.1.2"186version = "1.1.4"186source = "registry+https://github.com/rust-lang/crates.io-index"187source = "registry+https://github.com/rust-lang/crates.io-index"187checksum = "79947af37f4177cfead1110013d678905c37501914fba0efea834c3fe9a8d60c"188checksum = "9e231f6134f61b71076a3eab506c379d4f36122f2af15a9ff04415ea4c3339e2"188dependencies = [189dependencies = [189 "windows-sys 0.59.0",190 "windows-sys 0.60.2",190]191]191192192[[package]]193[[package]]193name = "anstyle-wincon"194name = "anstyle-wincon"194version = "3.0.6"195version = "3.0.10"195source = "registry+https://github.com/rust-lang/crates.io-index"196source = "registry+https://github.com/rust-lang/crates.io-index"196checksum = "2109dbce0e72be3ec00bed26e6a7479ca384ad226efdd66db8fa2e3a38c83125"197checksum = "3e0633414522a32ffaac8ac6cc8f748e090c5717661fddeea04219e2344f5f2a"197dependencies = [198dependencies = [198 "anstyle",199 "anstyle",200 "once_cell_polyfill",199 "windows-sys 0.59.0",201 "windows-sys 0.60.2",200]202]201203202[[package]]204[[package]]203name = "anyhow"205name = "anyhow"204version = "1.0.93"206version = "1.0.99"205source = "registry+https://github.com/rust-lang/crates.io-index"207source = "registry+https://github.com/rust-lang/crates.io-index"206checksum = "4c95c10ba0b00a02636238b814946408b1322d5ac4760326e6fb8ec956d85775"208checksum = "b0674a1ddeecb70197781e945de4b3b8ffb61fa939a5597bcf48503737663100"207209208[[package]]210[[package]]209name = "arc-swap"211name = "arc-swap"241243242[[package]]244[[package]]243name = "async-trait"245name = "async-trait"244version = "0.1.88"246version = "0.1.89"245source = "registry+https://github.com/rust-lang/crates.io-index"247source = "registry+https://github.com/rust-lang/crates.io-index"246checksum = "e539d3fca749fcee5236ab05e93a52867dd549cc157c8cb7f99595f3cedffdb5"248checksum = "9035ad2d096bed7955a320ee7e2230574d28fd3c3a0f186cbea1ff3c7eed5dbb"247dependencies = [249dependencies = [248 "proc-macro2",250 "proc-macro2",249 "quote",251 "quote",258260259[[package]]261[[package]]260name = "autocfg"262name = "autocfg"261version = "1.4.0"263version = "1.5.0"262source = "registry+https://github.com/rust-lang/crates.io-index"264source = "registry+https://github.com/rust-lang/crates.io-index"263checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26"265checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8"264266265[[package]]267[[package]]266name = "axum"268name = "axum"283 "pin-project-lite",285 "pin-project-lite",284 "rustversion",286 "rustversion",285 "serde",287 "serde",286 "sync_wrapper 1.0.1",288 "sync_wrapper",287 "tower 0.5.1",289 "tower 0.5.2",288 "tower-layer",290 "tower-layer",289 "tower-service",291 "tower-service",290]292]304 "mime",306 "mime",305 "pin-project-lite",307 "pin-project-lite",306 "rustversion",308 "rustversion",307 "sync_wrapper 1.0.1",309 "sync_wrapper",308 "tower-layer",310 "tower-layer",309 "tower-service",311 "tower-service",310]312]311313312[[package]]314[[package]]313name = "backtrace"315name = "backtrace"314version = "0.3.74"316version = "0.3.75"315source = "registry+https://github.com/rust-lang/crates.io-index"317source = "registry+https://github.com/rust-lang/crates.io-index"316checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a"318checksum = "6806a6321ec58106fea15becdad98371e28d92ccbc7c8f1b3b6dd724fe8f1002"317dependencies = [319dependencies = [318 "addr2line",320 "addr2line",319 "cfg-if",321 "cfg-if",320 "libc",322 "libc",321 "miniz_oxide",323 "miniz_oxide",322 "object",324 "object",323 "rustc-demangle",325 "rustc-demangle",324 "windows-targets",326 "windows-targets 0.52.6",325]327]326328327[[package]]329[[package]]338340339[[package]]341[[package]]340name = "base64ct"342name = "base64ct"341version = "1.6.0"343version = "1.8.0"342source = "registry+https://github.com/rust-lang/crates.io-index"344source = "registry+https://github.com/rust-lang/crates.io-index"343checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b"345checksum = "55248b47b0caf0546f7988906588779981c43bb1bc9d0c44087278f80cdb44ba"344346345[[package]]347[[package]]346name = "basic-toml"348name = "basic-toml"347version = "0.1.9"349version = "0.1.10"348source = "registry+https://github.com/rust-lang/crates.io-index"350source = "registry+https://github.com/rust-lang/crates.io-index"349checksum = "823388e228f614e9558c6804262db37960ec8821856535f5c3f59913140558f8"351checksum = "ba62675e8242a4c4e806d12f11d136e626e6c8361d6b829310732241652a178a"350dependencies = [352dependencies = [351 "serde",353 "serde",352]354]379 "tracing-indicatif",381 "tracing-indicatif",380]382]383384[[package]]385name = "bindgen"386version = "0.72.1"387source = "registry+https://github.com/rust-lang/crates.io-index"388checksum = "993776b509cfb49c750f11b8f07a46fa23e0a1386ffc01fb1e7d343efc387895"389dependencies = [390 "bitflags",391 "cexpr",392 "clang-sys",393 "itertools 0.13.0",394 "log",395 "prettyplease",396 "proc-macro2",397 "quote",398 "regex",399 "rustc-hash 2.1.1",400 "shlex",401 "syn",402]381403382[[package]]404[[package]]383name = "bitflags"405name = "bitflags"384version = "2.9.1"406version = "2.9.3"385source = "registry+https://github.com/rust-lang/crates.io-index"407source = "registry+https://github.com/rust-lang/crates.io-index"386checksum = "1b8e56985ec62d17e9c1001dc89c88ecd7dc08e47eba5ec7c29c7b5eeecde967"408checksum = "34efbcccd345379ca2868b2b2c9d3782e9cc58ba87bc7d79d5b53d9c9ae6f25d"387dependencies = [409dependencies = [388 "serde",410 "serde",389]411]418440419[[package]]441[[package]]420name = "bumpalo"442name = "bumpalo"421version = "3.16.0"443version = "3.19.0"422source = "registry+https://github.com/rust-lang/crates.io-index"444source = "registry+https://github.com/rust-lang/crates.io-index"423checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c"445checksum = "46c5e41b57b8bba42a04676d81cb89e9ee8e859a1a66f80a5a72e1cb76b34d43"424446425[[package]]447[[package]]426name = "bytecount"448name = "bytecount"427version = "0.6.8"449version = "0.6.9"428source = "registry+https://github.com/rust-lang/crates.io-index"450source = "registry+https://github.com/rust-lang/crates.io-index"429checksum = "5ce89b21cab1437276d2650d57e971f9d548a2d9037cc231abdc0562b97498ce"451checksum = "175812e0be2bccb6abe50bb8d566126198344f707e304f45c648fd8f2cc0365e"430452431[[package]]453[[package]]432name = "byteorder"454name = "byteorder"436458437[[package]]459[[package]]438name = "bytes"460name = "bytes"439version = "1.8.0"461version = "1.10.1"440source = "registry+https://github.com/rust-lang/crates.io-index"462source = "registry+https://github.com/rust-lang/crates.io-index"441checksum = "9ac0150caa2ae65ca5bd83f25c7de183dea78d4d366469f148435e2acfbad0da"463checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a"442464443[[package]]465[[package]]444name = "cbc"466name = "cbc"450]472]451473452[[package]]474[[package]]453name = "cbitset"475name = "cc"454version = "0.2.0"476version = "1.2.34"455source = "registry+https://github.com/rust-lang/crates.io-index"477source = "registry+https://github.com/rust-lang/crates.io-index"456checksum = "29b6ad25ae296159fb0da12b970b2fe179b234584d7cd294c891e2bbb284466b"478checksum = "42bc4aea80032b7bf409b0bc7ccad88853858911b7713a8062fdc0623867bedc"457dependencies = [479dependencies = [458 "num-traits",480 "shlex",459]481]460482461[[package]]483[[package]]462name = "cc"484name = "cexpr"463version = "1.2.1"485version = "0.6.0"464source = "registry+https://github.com/rust-lang/crates.io-index"486source = "registry+https://github.com/rust-lang/crates.io-index"465checksum = "fd9de9f2205d5ef3fd67e685b0df337994ddd4495e2a28d185500d0e1edfea47"487checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766"466dependencies = [488dependencies = [467 "shlex",489 "nom 7.1.3",468]490]469491470[[package]]492[[package]]471name = "cfg-if"493name = "cfg-if"472version = "1.0.0"494version = "1.0.3"473source = "registry+https://github.com/rust-lang/crates.io-index"495source = "registry+https://github.com/rust-lang/crates.io-index"474checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"496checksum = "2fd1289c04a9ea8cb22300a459a72a385d7c73d3259e2ed7dcb2af674838cfa9"475497476[[package]]498[[package]]477name = "cfg_aliases"499name = "cfg_aliases"529 "zeroize",551 "zeroize",530]552]553554[[package]]555name = "clang-sys"556version = "1.8.1"557source = "registry+https://github.com/rust-lang/crates.io-index"558checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4"559dependencies = [560 "glob",561 "libc",562 "libloading",563]531564532[[package]]565[[package]]533name = "clap"566name = "clap"534version = "4.5.21"567version = "4.5.46"535source = "registry+https://github.com/rust-lang/crates.io-index"568source = "registry+https://github.com/rust-lang/crates.io-index"536checksum = "fb3b4b9e5a7c7514dfa52869339ee98b3156b0bfb4e8a77c4ff4babb64b1604f"569checksum = "2c5e4fcf9c21d2e544ca1ee9d8552de13019a42aa7dbf32747fa7aaf1df76e57"537dependencies = [570dependencies = [538 "clap_builder",571 "clap_builder",539 "clap_derive",572 "clap_derive",540]573]541574542[[package]]575[[package]]543name = "clap_builder"576name = "clap_builder"544version = "4.5.21"577version = "4.5.46"545source = "registry+https://github.com/rust-lang/crates.io-index"578source = "registry+https://github.com/rust-lang/crates.io-index"546checksum = "b17a95aa67cc7b5ebd32aa5370189aa0d79069ef1c64ce893bd30fb24bff20ec"579checksum = "fecb53a0e6fcfb055f686001bc2e2592fa527efaf38dbe81a6a9563562e57d41"547dependencies = [580dependencies = [548 "anstream",581 "anstream",549 "anstyle",582 "anstyle",550 "clap_lex",583 "clap_lex",551 "strsim",584 "strsim",552 "terminal_size",585 "terminal_size",553 "unicase",586 "unicase",554 "unicode-width 0.2.0",587 "unicode-width 0.2.1",555]588]556589557[[package]]590[[package]]558name = "clap_complete"591name = "clap_complete"559version = "4.5.38"592version = "4.5.57"560source = "registry+https://github.com/rust-lang/crates.io-index"593source = "registry+https://github.com/rust-lang/crates.io-index"561checksum = "d9647a559c112175f17cf724dc72d3645680a883c58481332779192b0d8e7a01"594checksum = "4d9501bd3f5f09f7bbee01da9a511073ed30a80cd7a509f1214bb74eadea71ad"562dependencies = [595dependencies = [563 "clap",596 "clap",564]597]565598566[[package]]599[[package]]567name = "clap_derive"600name = "clap_derive"568version = "4.5.18"601version = "4.5.45"569source = "registry+https://github.com/rust-lang/crates.io-index"602source = "registry+https://github.com/rust-lang/crates.io-index"570checksum = "4ac6a0c7b1a9e9a5186361f67dfa1b88213572f427fb9ab038efb2bd8c582dab"603checksum = "14cb31bb0a7d536caef2639baa7fad459e15c3144efefa6dbd1c84562c4739f6"571dependencies = [604dependencies = [572 "heck",605 "heck",573 "proc-macro2",606 "proc-macro2",577610578[[package]]611[[package]]579name = "clap_lex"612name = "clap_lex"580version = "0.7.3"613version = "0.7.5"581source = "registry+https://github.com/rust-lang/crates.io-index"614source = "registry+https://github.com/rust-lang/crates.io-index"582checksum = "afb84c814227b90d6895e01398aee0d8033c00e7466aca416fb6a8e0eb19d8a7"615checksum = "b94f61472cee1439c0b966b47e3aca9ae07e45d070759512cd390ea2bebc6675"616617[[package]]618name = "codespan-reporting"619version = "0.12.0"620source = "registry+https://github.com/rust-lang/crates.io-index"621checksum = "fe6d2e5af09e8c8ad56c969f2157a3d4238cebc7c55f0a517728c38f7b200f81"622dependencies = [623 "serde",624 "termcolor",625 "unicode-width 0.2.1",626]583627584[[package]]628[[package]]585name = "colorchoice"629name = "colorchoice"586version = "1.0.3"630version = "1.0.4"587source = "registry+https://github.com/rust-lang/crates.io-index"631source = "registry+https://github.com/rust-lang/crates.io-index"588checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990"632checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75"589633590[[package]]634[[package]]591name = "console"635name = "console"592version = "0.15.8"636version = "0.16.0"593source = "registry+https://github.com/rust-lang/crates.io-index"637source = "registry+https://github.com/rust-lang/crates.io-index"594checksum = "0e1f83fc076bd6dd27517eacdf25fef6c4dfe5f1d7448bafaaf3a26f13b5e4eb"638checksum = "2e09ced7ebbccb63b4c65413d821f2e00ce54c5ca4514ddc6b3c892fdbcbc69d"595dependencies = [639dependencies = [596 "encode_unicode",640 "encode_unicode",597 "lazy_static",598 "libc",641 "libc",642 "once_cell",599 "unicode-width 0.1.11",643 "unicode-width 0.2.1",600 "windows-sys 0.52.0",644 "windows-sys 0.60.2",601]645]602646603[[package]]647[[package]]632676633[[package]]677[[package]]634name = "countme"678name = "countme"635version = "2.0.4"679version = "3.0.1"636source = "registry+https://github.com/rust-lang/crates.io-index"680source = "registry+https://github.com/rust-lang/crates.io-index"637checksum = "328b822bdcba4d4e402be8d9adb6eebf269f969f8eadef977a553ff3c4fbcb58"681checksum = "7704b5fdd17b18ae31c4c1da5a2e0305a2bf17b5249300a9ee9ed7b72114c636"638682639[[package]]683[[package]]640name = "cpufeatures"684name = "cpufeatures"641version = "0.2.15"685version = "0.2.17"642source = "registry+https://github.com/rust-lang/crates.io-index"686source = "registry+https://github.com/rust-lang/crates.io-index"643checksum = "0ca741a962e1b0bff6d724a1a0958b686406e853bb14061f218562e1896f95e6"687checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280"644dependencies = [688dependencies = [645 "libc",689 "libc",646]690]647648[[package]]649name = "crossbeam-utils"650version = "0.8.20"651source = "registry+https://github.com/rust-lang/crates.io-index"652checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80"653691654[[package]]692[[package]]655name = "crossterm"693name = "crossterm"664 "filedescriptor",702 "filedescriptor",665 "mio",703 "mio",666 "parking_lot",704 "parking_lot",667 "rustix 1.0.7",705 "rustix 1.0.8",668 "signal-hook",706 "signal-hook",669 "signal-hook-mio",707 "signal-hook-mio",670 "winapi",708 "winapi",690 "typenum",728 "typenum",691]729]730731[[package]]732name = "ctor"733version = "0.5.0"734source = "registry+https://github.com/rust-lang/crates.io-index"735checksum = "67773048316103656a637612c4a62477603b777d91d9c62ff2290f9cde178fdb"736dependencies = [737 "ctor-proc-macro",738 "dtor",739]740741[[package]]742name = "ctor-proc-macro"743version = "0.0.6"744source = "registry+https://github.com/rust-lang/crates.io-index"745checksum = "e2931af7e13dc045d8e9d26afccc6fa115d64e115c9c84b1166288b46f6782c2"692746693[[package]]747[[package]]694name = "ctr"748name = "ctr"726 "syn",780 "syn",727]781]782783[[package]]784name = "cxx"785version = "1.0.173"786source = "registry+https://github.com/rust-lang/crates.io-index"787checksum = "6c64ed3da1c337cbaae7223cdcff8b4dddf698d188cd3eaddd1116f6b0295950"788dependencies = [789 "cc",790 "cxxbridge-cmd",791 "cxxbridge-flags",792 "cxxbridge-macro",793 "foldhash",794 "link-cplusplus",795]728796729[[package]]797[[package]]730name = "dashmap"798name = "cxx-build"731version = "6.1.0"799version = "1.0.173"732source = "registry+https://github.com/rust-lang/crates.io-index"800source = "registry+https://github.com/rust-lang/crates.io-index"733checksum = "5041cc499144891f3790297212f32a74fb938e5136a14943f338ef9e0ae276cf"801checksum = "ae0a26a75a05551f5ae3d75b3557543d06682284eaa7419113162d602cb45766"734dependencies = [802dependencies = [735 "cfg-if",803 "cc",736 "crossbeam-utils",804 "codespan-reporting",737 "hashbrown 0.14.5",805 "indexmap 2.11.0",738 "lock_api",806 "proc-macro2",739 "once_cell",807 "quote",740 "parking_lot_core",808 "scratch",809 "syn",741]810]811812[[package]]813name = "cxxbridge-cmd"814version = "1.0.173"815source = "registry+https://github.com/rust-lang/crates.io-index"816checksum = "952d408b6002b7db4b36da07c682a9cbb34f2db0efa03e976ae50a388414e16c"817dependencies = [818 "clap",819 "codespan-reporting",820 "indexmap 2.11.0",821 "proc-macro2",822 "quote",823 "syn",824]825826[[package]]827name = "cxxbridge-flags"828version = "1.0.173"829source = "registry+https://github.com/rust-lang/crates.io-index"830checksum = "ccbd201b471c75c6abb6321cace706d1982d270e308b891c11a3262d320f5265"831832[[package]]833name = "cxxbridge-macro"834version = "1.0.173"835source = "registry+https://github.com/rust-lang/crates.io-index"836checksum = "2bea8b915bbc4cb4288f242aa7ca18b23ecc6965e4d6e7c1b07905e3fe2e0c41"837dependencies = [838 "indexmap 2.11.0",839 "proc-macro2",840 "quote",841 "rustversion",842 "syn",843]742844743[[package]]845[[package]]744name = "der"846name = "der"745version = "0.7.9"847version = "0.7.10"746source = "registry+https://github.com/rust-lang/crates.io-index"848source = "registry+https://github.com/rust-lang/crates.io-index"747checksum = "f55bf8e7b65898637379c1b74eb1551107c8294ed26d855ceb9fd1a09cfc9bc0"849checksum = "e7c1832837b905bbfb5101e07cc24c8deddf52f93225eee6ead5f4d63d53ddcb"748dependencies = [850dependencies = [749 "const-oid",851 "const-oid",750 "zeroize",852 "zeroize",751]853]752854753[[package]]855[[package]]754name = "deranged"856name = "deranged"755version = "0.4.0"857version = "0.5.2"756source = "registry+https://github.com/rust-lang/crates.io-index"858source = "registry+https://github.com/rust-lang/crates.io-index"757checksum = "9c9e6a11ca8224451684bc0d7d5a7adbf8f2fd6887261a1cfc3c0432f9d4068e"859checksum = "75d7cc94194b4dd0fa12845ef8c911101b7f37633cda14997a6e82099aa0b693"758dependencies = [860dependencies = [759 "powerfmt",861 "powerfmt",760 "serde",862 "serde",813 "litrs",915 "litrs",814]916]917918[[package]]919name = "dtor"920version = "0.1.0"921source = "registry+https://github.com/rust-lang/crates.io-index"922checksum = "e58a0764cddb55ab28955347b45be00ade43d4d6f3ba4bf3dc354e4ec9432934"923dependencies = [924 "dtor-proc-macro",925]926927[[package]]928name = "dtor-proc-macro"929version = "0.0.6"930source = "registry+https://github.com/rust-lang/crates.io-index"931checksum = "f678cf4a922c215c63e0de95eb1ff08a958a81d47e485cf9da1e27bf6305cfa5"815932816[[package]]933[[package]]817name = "ed25519"934name = "ed25519"825942826[[package]]943[[package]]827name = "ed25519-dalek"944name = "ed25519-dalek"828version = "2.1.1"945version = "2.2.0"829source = "registry+https://github.com/rust-lang/crates.io-index"946source = "registry+https://github.com/rust-lang/crates.io-index"830checksum = "4a3daa8e81a3963a60642bcc1f90a670680bd4a77535faa384e9d1c79d620871"947checksum = "70e796c081cee67dc755e1a36a0a172b897fab85fc3f6bc48307991f64e4eca9"831dependencies = [948dependencies = [832 "curve25519-dalek",949 "curve25519-dalek",833 "ed25519",950 "ed25519",839956840[[package]]957[[package]]841name = "either"958name = "either"842version = "1.13.0"959version = "1.15.0"843source = "registry+https://github.com/rust-lang/crates.io-index"960source = "registry+https://github.com/rust-lang/crates.io-index"844checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0"961checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719"845962846[[package]]963[[package]]847name = "encode_unicode"964name = "encode_unicode"848version = "0.3.6"965version = "1.0.0"849source = "registry+https://github.com/rust-lang/crates.io-index"966source = "registry+https://github.com/rust-lang/crates.io-index"850checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f"967checksum = "34aa73646ffb006b8f5147f3dc182bd4bcb190227ce861fc4a4844bf8e3cb2c0"968969[[package]]970name = "env_filter"971version = "0.1.3"972source = "registry+https://github.com/rust-lang/crates.io-index"973checksum = "186e05a59d4c50738528153b83b0b0194d3a29507dfec16eccd4b342903397d0"974dependencies = [975 "log",976]977978[[package]]979name = "env_logger"980version = "0.11.8"981source = "registry+https://github.com/rust-lang/crates.io-index"982checksum = "13c863f0904021b108aa8b2f55046443e6b1ebde8fd4a15c399893aae4fa069f"983dependencies = [984 "anstream",985 "anstyle",986 "env_filter",987 "log",988]851989852[[package]]990[[package]]853name = "equivalent"991name = "equivalent"854version = "1.0.1"992version = "1.0.2"855source = "registry+https://github.com/rust-lang/crates.io-index"993source = "registry+https://github.com/rust-lang/crates.io-index"856checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5"994checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f"857995858[[package]]996[[package]]859name = "errno"997name = "errno"860version = "0.3.12"998version = "0.3.13"861source = "registry+https://github.com/rust-lang/crates.io-index"999source = "registry+https://github.com/rust-lang/crates.io-index"862checksum = "cea14ef9355e3beab063703aa9dab15afd25f0667c341310c1e5274bb1d0da18"1000checksum = "778e2ac28f6c47af28e4907f13ffd1e1ddbd400980a9abd7c8df189bf578a5ad"863dependencies = [1001dependencies = [864 "libc",1002 "libc",865 "windows-sys 0.59.0",1003 "windows-sys 0.60.2",866]1004]8671005868[[package]]1006[[package]]869name = "fastrand"1007name = "fastrand"870version = "2.2.0"1008version = "2.3.0"871source = "registry+https://github.com/rust-lang/crates.io-index"1009source = "registry+https://github.com/rust-lang/crates.io-index"872checksum = "486f806e73c5707928240ddc295403b1b93c96a02038563881c4a2fd84b81ac4"1010checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be"8731011874[[package]]1012[[package]]875name = "fiat-crypto"1013name = "fiat-crypto"8791017880[[package]]1018[[package]]881name = "filedescriptor"1019name = "filedescriptor"882version = "0.8.2"1020version = "0.8.3"883source = "registry+https://github.com/rust-lang/crates.io-index"1021source = "registry+https://github.com/rust-lang/crates.io-index"884checksum = "7199d965852c3bac31f779ef99cbb4537f80e952e2d6aa0ffeb30cce00f4f46e"1022checksum = "e40758ed24c9b2eeb76c35fb0aebc66c626084edd827e07e1552279814c6682d"885dependencies = [1023dependencies = [886 "libc",1024 "libc",887 "thiserror 1.0.69",1025 "thiserror 1.0.69",8991037900[[package]]1038[[package]]901name = "fixedbitset"1039name = "fixedbitset"902version = "0.4.2"1040version = "0.5.7"903source = "registry+https://github.com/rust-lang/crates.io-index"1041source = "registry+https://github.com/rust-lang/crates.io-index"904checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80"1042checksum = "1d674e81391d1e1ab681a28d99df07927c6d4aa5b027d7da16ba32d1d21ecd99"9051043906[[package]]1044[[package]]907name = "fleet"1045name = "fleet"963 "nixlike",1101 "nixlike",964 "nom 8.0.0",1102 "nom 8.0.0",965 "openssh",1103 "openssh",966 "rand 0.9.1",1104 "rand 0.9.2",967 "serde",1105 "serde",968 "serde_json",1106 "serde_json",969 "tabled",1107 "tabled",985 "ed25519-dalek",1123 "ed25519-dalek",986 "fleet-shared",1124 "fleet-shared",987 "hex",1125 "hex",988 "rand 0.9.1",1126 "rand 0.9.2",989 "x25519-dalek",1127 "x25519-dalek",990]1128]99111291035 "fluent-syntax",1173 "fluent-syntax",1036 "intl-memoizer",1174 "intl-memoizer",1037 "intl_pluralrules",1175 "intl_pluralrules",1038 "rustc-hash",1176 "rustc-hash 1.1.0",1039 "self_cell 0.10.3",1177 "self_cell 0.10.3",1040 "smallvec",1178 "smallvec",1041 "unic-langid",1179 "unic-langid",1065source = "registry+https://github.com/rust-lang/crates.io-index"1203source = "registry+https://github.com/rust-lang/crates.io-index"1066checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"1204checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"12051206[[package]]1207name = "foldhash"1208version = "0.2.0"1209source = "registry+https://github.com/rust-lang/crates.io-index"1210checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb"106712111068[[package]]1212[[package]]1069name = "futures"1213name = "futures"116613101167[[package]]1311[[package]]1168name = "getrandom"1312name = "getrandom"1169version = "0.2.15"1313version = "0.2.16"1170source = "registry+https://github.com/rust-lang/crates.io-index"1314source = "registry+https://github.com/rust-lang/crates.io-index"1171checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7"1315checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592"1172dependencies = [1316dependencies = [1173 "cfg-if",1317 "cfg-if",1174 "libc",1318 "libc",1175 "wasi 0.11.0+wasi-snapshot-preview1",1319 "wasi 0.11.1+wasi-snapshot-preview1",1176]1320]117713211178[[package]]1322[[package]]1184 "cfg-if",1328 "cfg-if",1185 "libc",1329 "libc",1186 "r-efi",1330 "r-efi",1187 "wasi 0.14.2+wasi-0.2.4",1331 "wasi 0.14.3+wasi-0.2.4",1188]1332]118913331190[[package]]1334[[package]]1203source = "registry+https://github.com/rust-lang/crates.io-index"1347source = "registry+https://github.com/rust-lang/crates.io-index"1204checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f"1348checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f"13491350[[package]]1351name = "glob"1352version = "0.3.3"1353source = "registry+https://github.com/rust-lang/crates.io-index"1354checksum = "0cc23270f6e1808e30a928bdc84dea0b9b4136a8bc82338574f23baf47bbd280"120513551206[[package]]1356[[package]]1207name = "h2"1357name = "h2"1208version = "0.4.6"1358version = "0.4.12"1209source = "registry+https://github.com/rust-lang/crates.io-index"1359source = "registry+https://github.com/rust-lang/crates.io-index"1210checksum = "524e8ac6999421f49a846c2d4411f337e53497d8ec55d67753beffa43c5d9205"1360checksum = "f3c0b69cfcb4e1b9f1bf2f53f95f766e4661169728ec61cd3fe5a0166f2d1386"1211dependencies = [1361dependencies = [1212 "atomic-waker",1362 "atomic-waker",1213 "bytes",1363 "bytes",1214 "fnv",1364 "fnv",1215 "futures-core",1365 "futures-core",1216 "futures-sink",1366 "futures-sink",1217 "http",1367 "http",1218 "indexmap 2.6.0",1368 "indexmap 2.11.0",1219 "slab",1369 "slab",1220 "tokio",1370 "tokio",1221 "tokio-util",1371 "tokio-util",1222 "tracing",1372 "tracing",1223]1373]12241225[[package]]1226name = "hashbrown"1227version = "0.9.1"1228source = "registry+https://github.com/rust-lang/crates.io-index"1229checksum = "d7afe4a420e3fe79967a00898cc1f4db7c8a49a9333a29f8a4bd76a253d5cd04"123013741231[[package]]1375[[package]]1232name = "hashbrown"1376name = "hashbrown"124213861243[[package]]1387[[package]]1244name = "hashbrown"1388name = "hashbrown"1245version = "0.15.1"1389version = "0.15.5"1246source = "registry+https://github.com/rust-lang/crates.io-index"1390source = "registry+https://github.com/rust-lang/crates.io-index"1247checksum = "3a9bfc1af68b1726ea47d3d5109de126281def866b33970e10fbab11b5dafab3"1391checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1"124813921249[[package]]1393[[package]]1250name = "heck"1394name = "heck"125413981255[[package]]1399[[package]]1256name = "hermit-abi"1400name = "hermit-abi"1257version = "0.3.9"1401version = "0.5.2"1258source = "registry+https://github.com/rust-lang/crates.io-index"1402source = "registry+https://github.com/rust-lang/crates.io-index"1259checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024"1403checksum = "fc0fef456e4baa96da950455cd02c081ca953b141298e41db3fc7e36b1da849c"12601261[[package]]1262name = "hermit-abi"1263version = "0.4.0"1264source = "registry+https://github.com/rust-lang/crates.io-index"1265checksum = "fbf6a919d6cf397374f7dfeeea91d974c7c0a7221d0d0f4f20d859d329e53fcc"126614041267[[package]]1405[[package]]1268name = "hex"1406name = "hex"131014481311[[package]]1449[[package]]1312name = "http"1450name = "http"1313version = "1.1.0"1451version = "1.3.1"1314source = "registry+https://github.com/rust-lang/crates.io-index"1452source = "registry+https://github.com/rust-lang/crates.io-index"1315checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258"1453checksum = "f4a85d31aea989eead29a3aaf9e1115a180df8282431156e533de47660892565"1316dependencies = [1454dependencies = [1317 "bytes",1455 "bytes",1318 "fnv",1456 "fnv",133114691332[[package]]1470[[package]]1333name = "http-body-util"1471name = "http-body-util"1334version = "0.1.2"1472version = "0.1.3"1335source = "registry+https://github.com/rust-lang/crates.io-index"1473source = "registry+https://github.com/rust-lang/crates.io-index"1336checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f"1474checksum = "b021d93e26becf5dc7e1b75b1bed1fd93124b374ceb73f43d4d4eafec896a64a"1337dependencies = [1475dependencies = [1338 "bytes",1476 "bytes",1339 "futures-util",1477 "futures-core",1340 "http",1478 "http",1341 "http-body",1479 "http-body",1342 "pin-project-lite",1480 "pin-project-lite",1343]1481]134414821345[[package]]1483[[package]]1346name = "httparse"1484name = "httparse"1347version = "1.9.5"1485version = "1.10.1"1348source = "registry+https://github.com/rust-lang/crates.io-index"1486source = "registry+https://github.com/rust-lang/crates.io-index"1349checksum = "7d71d3574edd2771538b901e6549113b4006ece66150fb69c0fb6d9a2adae946"1487checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87"135014881351[[package]]1489[[package]]1352name = "httpdate"1490name = "httpdate"136215001363[[package]]1501[[package]]1364name = "hyper"1502name = "hyper"1365version = "1.5.0"1503version = "1.7.0"1366source = "registry+https://github.com/rust-lang/crates.io-index"1504source = "registry+https://github.com/rust-lang/crates.io-index"1367checksum = "bbbff0a806a4728c99295b254c8838933b5b082d75e3cb70c8dab21fdfbcfa9a"1505checksum = "eb3aa54a13a0dfe7fbe3a59e0c76093041720fdc77b110cc0fc260fafb4dc51e"1368dependencies = [1506dependencies = [1507 "atomic-waker",1369 "bytes",1508 "bytes",1370 "futures-channel",1509 "futures-channel",1371 "futures-util",1510 "futures-core",1372 "h2",1511 "h2",1373 "http",1512 "http",1374 "http-body",1513 "http-body",1375 "httparse",1514 "httparse",1376 "httpdate",1515 "httpdate",1377 "itoa",1516 "itoa",1378 "pin-project-lite",1517 "pin-project-lite",1518 "pin-utils",1379 "smallvec",1519 "smallvec",1380 "tokio",1520 "tokio",1381 "want",1521 "want",139615361397[[package]]1537[[package]]1398name = "hyper-util"1538name = "hyper-util"1399version = "0.1.10"1539version = "0.1.16"1400source = "registry+https://github.com/rust-lang/crates.io-index"1540source = "registry+https://github.com/rust-lang/crates.io-index"1401checksum = "df2dcfbe0677734ab2f3ffa7fa7bfd4706bfdc1ef393f2ee30184aed67e631b4"1541checksum = "8d9b05277c7e8da2c93a568989bb6207bef0112e8d17df7a6eda4a3cf143bc5e"1402dependencies = [1542dependencies = [1403 "bytes",1543 "bytes",1404 "futures-channel",1544 "futures-channel",1545 "futures-core",1405 "futures-util",1546 "futures-util",1406 "http",1547 "http",1407 "http-body",1548 "http-body",1408 "hyper",1549 "hyper",1550 "libc",1409 "pin-project-lite",1551 "pin-project-lite",1410 "socket2",1552 "socket2 0.6.0",1411 "tokio",1553 "tokio",1412 "tower-service",1554 "tower-service",1413 "tracing",1555 "tracing",1414]1556]141515571416[[package]]1558[[package]]1417name = "i18n-config"1559name = "i18n-config"1418version = "0.4.7"1560version = "0.4.8"1419source = "registry+https://github.com/rust-lang/crates.io-index"1561source = "registry+https://github.com/rust-lang/crates.io-index"1420checksum = "8e88074831c0be5b89181b05e6748c4915f77769ecc9a4c372f88b169a8509c9"1562checksum = "3e06b90c8a0d252e203c94344b21e35a30f3a3a85dc7db5af8f8df9f3e0c63ef"1421dependencies = [1563dependencies = [1422 "basic-toml",1564 "basic-toml",1423 "log",1565 "log",142915711430[[package]]1572[[package]]1431name = "i18n-embed"1573name = "i18n-embed"1432version = "0.15.2"1574version = "0.15.4"1433source = "registry+https://github.com/rust-lang/crates.io-index"1575source = "registry+https://github.com/rust-lang/crates.io-index"1434checksum = "a7839d8c7bb8da7bd58c1112d3a1aeb7f178ff3df4ae87783e758ca3bfb750b7"1576checksum = "669ffc2c93f97e6ddf06ddbe999fcd6782e3342978bb85f7d3c087c7978404c4"1435dependencies = [1577dependencies = [1436 "arc-swap",1578 "arc-swap",1437 "fluent",1579 "fluent",1438 "fluent-langneg",1580 "fluent-langneg",1439 "fluent-syntax",1581 "fluent-syntax",1440 "i18n-embed-impl",1582 "i18n-embed-impl",1441 "intl-memoizer",1583 "intl-memoizer",1442 "lazy_static",1443 "log",1584 "log",1444 "parking_lot",1585 "parking_lot",1445 "rust-embed",1586 "rust-embed",145015911451[[package]]1592[[package]]1452name = "i18n-embed-fl"1593name = "i18n-embed-fl"1453version = "0.9.2"1594version = "0.9.4"1454source = "registry+https://github.com/rust-lang/crates.io-index"1595source = "registry+https://github.com/rust-lang/crates.io-index"1455checksum = "f6e9571c3cba9eba538eaa5ee40031b26debe76f0c7e17bafc97ea57a76cd82e"1596checksum = "04b2969d0b3fc6143776c535184c19722032b43e6a642d710fa3f88faec53c2d"1456dependencies = [1597dependencies = [1457 "dashmap",1458 "find-crate",1598 "find-crate",1459 "fluent",1599 "fluent",1460 "fluent-syntax",1600 "fluent-syntax",1461 "i18n-config",1601 "i18n-config",1462 "i18n-embed",1602 "i18n-embed",1463 "lazy_static",1464 "proc-macro-error2",1603 "proc-macro-error2",1465 "proc-macro2",1604 "proc-macro2",1466 "quote",1605 "quote",148416231485[[package]]1624[[package]]1486name = "iana-time-zone"1625name = "iana-time-zone"1487version = "0.1.61"1626version = "0.1.63"1488source = "registry+https://github.com/rust-lang/crates.io-index"1627source = "registry+https://github.com/rust-lang/crates.io-index"1489checksum = "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220"1628checksum = "b0c919e5debc312ad217002b8048a17b7d83f80703865bbfcfebb0458b0b27d8"1490dependencies = [1629dependencies = [1491 "android_system_properties",1630 "android_system_properties",1492 "core-foundation-sys",1631 "core-foundation-sys",1493 "iana-time-zone-haiku",1632 "iana-time-zone-haiku",1494 "js-sys",1633 "js-sys",1634 "log",1495 "wasm-bindgen",1635 "wasm-bindgen",1496 "windows-core",1636 "windows-core",1497]1637]151716571518[[package]]1658[[package]]1519name = "indexmap"1659name = "indexmap"1520version = "2.6.0"1660version = "2.11.0"1521source = "registry+https://github.com/rust-lang/crates.io-index"1661source = "registry+https://github.com/rust-lang/crates.io-index"1522checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da"1662checksum = "f2481980430f9f78649238835720ddccc57e52df14ffce1c6f37391d61b563e9"1523dependencies = [1663dependencies = [1524 "equivalent",1664 "equivalent",1525 "hashbrown 0.15.1",1665 "hashbrown 0.15.5",1526]1666]152716671528[[package]]1668[[package]]1529name = "indicatif"1669name = "indicatif"1530version = "0.17.9"1670version = "0.18.0"1531source = "registry+https://github.com/rust-lang/crates.io-index"1671source = "registry+https://github.com/rust-lang/crates.io-index"1532checksum = "cbf675b85ed934d3c67b5c5469701eec7db22689d0a2139d856e0925fa28b281"1672checksum = "70a646d946d06bedbbc4cac4c218acf4bbf2d87757a784857025f4d447e4e1cd"1533dependencies = [1673dependencies = [1534 "console",1674 "console",1535 "number_prefix",1536 "portable-atomic",1675 "portable-atomic",1537 "unicode-width 0.2.0",1676 "unicode-width 0.2.1",1677 "unit-prefix",1538 "vt100",1678 "vt100",1539 "web-time",1679 "web-time",1540]1680]154716871548[[package]]1688[[package]]1549name = "inout"1689name = "inout"1550version = "0.1.3"1690version = "0.1.4"1551source = "registry+https://github.com/rust-lang/crates.io-index"1691source = "registry+https://github.com/rust-lang/crates.io-index"1552checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5"1692checksum = "879f10e63c20629ecabbb64a8010319738c66a5cd0c29b02d63d272b03751d01"1553dependencies = [1693dependencies = [1554 "block-padding",1694 "block-padding",1555 "generic-array",1695 "generic-array",1556]1696]155716971558[[package]]1698[[package]]1559name = "intl-memoizer"1699name = "intl-memoizer"1560version = "0.5.2"1700version = "0.5.3"1561source = "registry+https://github.com/rust-lang/crates.io-index"1701source = "registry+https://github.com/rust-lang/crates.io-index"1562checksum = "fe22e020fce238ae18a6d5d8c502ee76a52a6e880d99477657e6acc30ec57bda"1702checksum = "310da2e345f5eb861e7a07ee182262e94975051db9e4223e909ba90f392f163f"1563dependencies = [1703dependencies = [1564 "type-map",1704 "type-map",1565 "unic-langid",1705 "unic-langid",1574 "unic-langid",1714 "unic-langid",1575]1715]17161717[[package]]1718name = "io-uring"1719version = "0.7.10"1720source = "registry+https://github.com/rust-lang/crates.io-index"1721checksum = "046fa2d4d00aea763528b4950358d0ead425372445dc8ff86312b3c69ff7727b"1722dependencies = [1723 "bitflags",1724 "cfg-if",1725 "libc",1726]157617271577[[package]]1728[[package]]1578name = "io_tee"1729name = "io_tee"158217331583[[package]]1734[[package]]1584name = "is-terminal"1735name = "is-terminal"1585version = "0.4.13"1736version = "0.4.16"1586source = "registry+https://github.com/rust-lang/crates.io-index"1737source = "registry+https://github.com/rust-lang/crates.io-index"1587checksum = "261f68e344040fbd0edea105bef17c66edf46f984ddb1115b775ce31be948f4b"1738checksum = "e04d7f318608d35d4b61ddd75cbdaee86b023ebe2bd5a66ee0915f0bf93095a9"1588dependencies = [1739dependencies = [1589 "hermit-abi 0.4.0",1740 "hermit-abi",1590 "libc",1741 "libc",1591 "windows-sys 0.52.0",1742 "windows-sys 0.59.0",1592]1743]159317441594[[package]]1745[[package]]162317741624[[package]]1775[[package]]1625name = "itoa"1776name = "itoa"1626version = "1.0.11"1777version = "1.0.15"1627source = "registry+https://github.com/rust-lang/crates.io-index"1778source = "registry+https://github.com/rust-lang/crates.io-index"1628checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b"1779checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c"162917801630[[package]]1781[[package]]1631name = "js-sys"1782name = "js-sys"1632version = "0.3.72"1783version = "0.3.77"1633source = "registry+https://github.com/rust-lang/crates.io-index"1784source = "registry+https://github.com/rust-lang/crates.io-index"1634checksum = "6a88f1bda2bd75b0452a14784937d796722fdebfe50df998aeb3f0b7603019a9"1785checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f"1635dependencies = [1786dependencies = [1787 "once_cell",1636 "wasm-bindgen",1788 "wasm-bindgen",1637]1789]16381790164717991648[[package]]1800[[package]]1649name = "libc"1801name = "libc"1650version = "0.2.174"1802version = "0.2.175"1651source = "registry+https://github.com/rust-lang/crates.io-index"1803source = "registry+https://github.com/rust-lang/crates.io-index"1652checksum = "1171693293099992e19cddea4e8b849964e9846f4acee11b3948bcc337be8776"1804checksum = "6a82ae493e598baaea5209805c49bbf2ea7de956d50d7da0da1164f9c6d28543"18051806[[package]]1807name = "libloading"1808version = "0.8.8"1809source = "registry+https://github.com/rust-lang/crates.io-index"1810checksum = "07033963ba89ebaf1584d767badaa2e8fcec21aedea6b8c0346d487d49c28667"1811dependencies = [1812 "cfg-if",1813 "windows-targets 0.53.3",1814]165318151654[[package]]1816[[package]]1655name = "libm"1817name = "libm"1656version = "0.2.11"1818version = "0.2.15"1657source = "registry+https://github.com/rust-lang/crates.io-index"1819source = "registry+https://github.com/rust-lang/crates.io-index"1658checksum = "8355be11b20d696c8f18f6cc018c4e372165b1fa8126cef092399c9951984ffa"1820checksum = "f9fbbcab51052fe104eb5e5d351cf728d30a5be1fe14d9be8a3b097481fb97de"165918211660[[package]]1822[[package]]1661name = "libmimalloc-sys"1823name = "libmimalloc-sys"1662version = "0.1.39"1824version = "0.1.44"1663source = "registry+https://github.com/rust-lang/crates.io-index"1825source = "registry+https://github.com/rust-lang/crates.io-index"1664checksum = "23aa6811d3bd4deb8a84dde645f943476d13b248d818edcf8ce0b2f37f036b44"1826checksum = "667f4fec20f29dfc6bc7357c582d91796c169ad7e2fce709468aefeb2c099870"1665dependencies = [1827dependencies = [1666 "cc",1828 "cc",1667 "libc",1829 "libc",1668]1830]18311832[[package]]1833name = "link-cplusplus"1834version = "1.0.10"1835source = "registry+https://github.com/rust-lang/crates.io-index"1836checksum = "4a6f6da007f968f9def0d65a05b187e2960183de70c160204ecfccf0ee330212"1837dependencies = [1838 "cc",1839]166918401670[[package]]1841[[package]]1671name = "linked-hash-map"1842name = "linked-hash-map"167518461676[[package]]1847[[package]]1677name = "linux-raw-sys"1848name = "linux-raw-sys"1678version = "0.4.14"1849version = "0.4.15"1679source = "registry+https://github.com/rust-lang/crates.io-index"1850source = "registry+https://github.com/rust-lang/crates.io-index"1680checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89"1851checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab"168118521682[[package]]1853[[package]]1683name = "linux-raw-sys"1854name = "linux-raw-sys"168718581688[[package]]1859[[package]]1689name = "litrs"1860name = "litrs"1690version = "0.4.1"1861version = "0.4.2"1691source = "registry+https://github.com/rust-lang/crates.io-index"1862source = "registry+https://github.com/rust-lang/crates.io-index"1692checksum = "b4ce301924b7887e9d637144fdade93f9dfff9b60981d4ac161db09720d39aa5"1863checksum = "f5e54036fe321fd421e10d732f155734c4e4afd610dd556d9a82833ab3ee0bed"169318641694[[package]]1865[[package]]1695name = "lock_api"1866name = "lock_api"1696version = "0.4.12"1867version = "0.4.13"1697source = "registry+https://github.com/rust-lang/crates.io-index"1868source = "registry+https://github.com/rust-lang/crates.io-index"1698checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17"1869checksum = "96936507f153605bddfcda068dd804796c84324ed2510809e5b2a624c81da765"1699dependencies = [1870dependencies = [1700 "autocfg",1871 "autocfg",1701 "scopeguard",1872 "scopeguard",1702]1873]170318741704[[package]]1875[[package]]1705name = "log"1876name = "log"1706version = "0.4.22"1877version = "0.4.27"1707source = "registry+https://github.com/rust-lang/crates.io-index"1878source = "registry+https://github.com/rust-lang/crates.io-index"1708checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24"1879checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94"170918801710[[package]]1881[[package]]1711name = "matchers"1882name = "matchers"1712version = "0.1.0"1883version = "0.2.0"1713source = "registry+https://github.com/rust-lang/crates.io-index"1884source = "registry+https://github.com/rust-lang/crates.io-index"1714checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558"1885checksum = "d1525a2a28c7f4fa0fc98bb91ae755d1e2d1505079e05539e35bc876b5d65ae9"1715dependencies = [1886dependencies = [1716 "regex-automata 0.1.10",1887 "regex-automata",1717]1888]171818891719[[package]]1890[[package]]172418951725[[package]]1896[[package]]1726name = "memchr"1897name = "memchr"1727version = "2.7.4"1898version = "2.7.5"1728source = "registry+https://github.com/rust-lang/crates.io-index"1899source = "registry+https://github.com/rust-lang/crates.io-index"1729checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3"1900checksum = "32a282da65faaf38286cf3be983213fcf1d2e2a58700e808f83f4ea9a4804bc0"173019011731[[package]]1902[[package]]1732name = "memoffset"1903name = "memoffset"1733version = "0.6.5"1904version = "0.9.1"1734source = "registry+https://github.com/rust-lang/crates.io-index"1905source = "registry+https://github.com/rust-lang/crates.io-index"1735checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce"1906checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a"1736dependencies = [1907dependencies = [1737 "autocfg",1908 "autocfg",1738]1909]173919101740[[package]]1911[[package]]1741name = "mimalloc"1912name = "mimalloc"1742version = "0.1.43"1913version = "0.1.48"1743source = "registry+https://github.com/rust-lang/crates.io-index"1914source = "registry+https://github.com/rust-lang/crates.io-index"1744checksum = "68914350ae34959d83f732418d51e2427a794055d0b9529f48259ac07af65633"1915checksum = "e1ee66a4b64c74f4ef288bcbb9192ad9c3feaad75193129ac8509af543894fd8"1745dependencies = [1916dependencies = [1746 "libmimalloc-sys",1917 "libmimalloc-sys",1747]1918]176019311761[[package]]1932[[package]]1762name = "miniz_oxide"1933name = "miniz_oxide"1763version = "0.8.0"1934version = "0.8.9"1764source = "registry+https://github.com/rust-lang/crates.io-index"1935source = "registry+https://github.com/rust-lang/crates.io-index"1765checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1"1936checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316"1766dependencies = [1937dependencies = [1767 "adler2",1938 "adler2",1768]1939]176919401770[[package]]1941[[package]]1771name = "mio"1942name = "mio"1772version = "1.0.2"1943version = "1.0.4"1773source = "registry+https://github.com/rust-lang/crates.io-index"1944source = "registry+https://github.com/rust-lang/crates.io-index"1774checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec"1945checksum = "78bed444cc8a2160f01cbcf811ef18cac863ad68ae8ca62092e8db51d51c761c"1775dependencies = [1946dependencies = [1776 "hermit-abi 0.3.9",1777 "libc",1947 "libc",1778 "log",1948 "log",1779 "wasi 0.11.0+wasi-snapshot-preview1",1949 "wasi 0.11.1+wasi-snapshot-preview1",1780 "windows-sys 0.52.0",1950 "windows-sys 0.59.0",1781]1951]178219521783[[package]]1953[[package]]1784name = "multimap"1954name = "multimap"1785version = "0.10.0"1955version = "0.10.1"1786source = "registry+https://github.com/rust-lang/crates.io-index"1956source = "registry+https://github.com/rust-lang/crates.io-index"1787checksum = "defc4c55412d89136f966bbb339008b474350e5e6e78d2714439c386b3137a03"1957checksum = "1d87ecb2933e8aeadb3e3a02b828fed80a7528047e68b4f424523a0981a3a084"178819581789[[package]]1959[[package]]1790name = "nix"1960name = "nix"1804dependencies = [1974dependencies = [1805 "anyhow",1975 "anyhow",1806 "better-command",1976 "better-command",1977 "bindgen",1978 "ctor",1979 "cxx",1980 "cxx-build",1807 "futures",1981 "futures",1808 "itertools 0.14.0",1982 "itertools 0.14.0",1809 "nixlike",1983 "nixlike",1984 "pkg-config",1810 "r2d2",1985 "r2d2",1811 "regex",1986 "regex",1812 "serde",1987 "serde",1813 "serde_json",1988 "serde_json",1989 "test-log",1814 "thiserror 2.0.12",1990 "thiserror 2.0.16",1815 "tokio",1991 "tokio",1816 "tokio-util",1992 "tokio-util",1817 "tracing",1993 "tracing",1994 "tracing-indicatif",1818 "unindent",1995 "unindent",1819]1996]182019971829 "serde",2006 "serde",1830 "serde-transcode",2007 "serde-transcode",1831 "serde_json",2008 "serde_json",1832 "thiserror 2.0.12",2009 "thiserror 2.0.16",1833]2010]183420111835[[package]]2012[[package]]185320301854[[package]]2031[[package]]1855name = "nu-ansi-term"2032name = "nu-ansi-term"1856version = "0.46.0"2033version = "0.50.1"1857source = "registry+https://github.com/rust-lang/crates.io-index"2034source = "registry+https://github.com/rust-lang/crates.io-index"1858checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84"2035checksum = "d4a28e057d01f97e61255210fcff094d74ed0466038633e95017f5beb68e4399"1859dependencies = [2036dependencies = [1860 "overload",1861 "winapi",2037 "windows-sys 0.52.0",1862]2038]186320391864[[package]]2040[[package]]1915]2091]191620921917[[package]]2093[[package]]1918name = "number_prefix"2094name = "object"1919version = "0.4.0"2095version = "0.36.7"1920source = "registry+https://github.com/rust-lang/crates.io-index"2096source = "registry+https://github.com/rust-lang/crates.io-index"1921checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3"2097checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87"2098dependencies = [2099 "memchr",2100]192221011923[[package]]2102[[package]]1924name = "object"2103name = "once_cell"1925version = "0.36.5"2104version = "1.21.3"1926source = "registry+https://github.com/rust-lang/crates.io-index"2105source = "registry+https://github.com/rust-lang/crates.io-index"1927checksum = "aedf0a2d09c573ed1d8d85b30c119153926a2b36dce0ab28322c09a117a4683e"2106checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d"1928dependencies = [1929 "memchr",1930]193121071932[[package]]2108[[package]]1933name = "once_cell"2109name = "once_cell_polyfill"1934version = "1.20.2"2110version = "1.70.1"1935source = "registry+https://github.com/rust-lang/crates.io-index"2111source = "registry+https://github.com/rust-lang/crates.io-index"1936checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775"2112checksum = "a4895175b425cb1f87721b59f0f286c2092bd4af812243672510e1ac53e2e0ad"193721131938[[package]]2114[[package]]1939name = "opaque-debug"2115name = "opaque-debug"1951 "once_cell",2127 "once_cell",1952 "shell-escape",2128 "shell-escape",1953 "tempfile",2129 "tempfile",1954 "thiserror 2.0.12",2130 "thiserror 2.0.16",1955 "tokio",2131 "tokio",1956]2132]19571958[[package]]1959name = "overload"1960version = "0.1.1"1961source = "registry+https://github.com/rust-lang/crates.io-index"1962checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39"196321331964[[package]]2134[[package]]1965name = "owo-colors"2135name = "owo-colors"1966version = "4.2.1"2136version = "4.2.2"1967source = "registry+https://github.com/rust-lang/crates.io-index"2137source = "registry+https://github.com/rust-lang/crates.io-index"1968checksum = "26995317201fa17f3656c36716aed4a7c81743a9634ac4c99c0eeda495db0cec"2138checksum = "48dd4f4a2c8405440fd0462561f0e5806bd0f77e86f51c761481bdd4018b545e"1969dependencies = [2139dependencies = [1970 "supports-color 2.1.0",2140 "supports-color 2.1.0",1971 "supports-color 3.0.1",2141 "supports-color 3.0.2",1972]2142]197321431974[[package]]2144[[package]]1979dependencies = [2149dependencies = [1980 "bytecount",2150 "bytecount",1981 "fnv",2151 "fnv",1982 "unicode-width 0.2.0",2152 "unicode-width 0.2.1",1983]2153]198421541985[[package]]2155[[package]]1986name = "parking_lot"2156name = "parking_lot"1987version = "0.12.3"2157version = "0.12.4"1988source = "registry+https://github.com/rust-lang/crates.io-index"2158source = "registry+https://github.com/rust-lang/crates.io-index"1989checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27"2159checksum = "70d58bf43669b5795d1576d0641cfb6fbb2057bf629506267a92807158584a13"1990dependencies = [2160dependencies = [1991 "lock_api",2161 "lock_api",1992 "parking_lot_core",2162 "parking_lot_core",1993]2163]199421641995[[package]]2165[[package]]1996name = "parking_lot_core"2166name = "parking_lot_core"1997version = "0.9.10"2167version = "0.9.11"1998source = "registry+https://github.com/rust-lang/crates.io-index"2168source = "registry+https://github.com/rust-lang/crates.io-index"1999checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8"2169checksum = "bc838d2a56b5b1a6c25f55575dfc605fabb63bb2365f6c2353ef9159aa69e4a5"2000dependencies = [2170dependencies = [2001 "cfg-if",2171 "cfg-if",2002 "libc",2172 "libc",2003 "redox_syscall",2173 "redox_syscall",2004 "smallvec",2174 "smallvec",2005 "windows-targets",2175 "windows-targets 0.52.6",2006]2176]200721772008[[package]]2178[[package]]205022202051[[package]]2221[[package]]2052name = "pem"2222name = "pem"2053version = "3.0.4"2223version = "3.0.5"2054source = "registry+https://github.com/rust-lang/crates.io-index"2224source = "registry+https://github.com/rust-lang/crates.io-index"2055checksum = "8e459365e590736a54c3fa561947c84837534b8e9af6fc5bf781307e82658fae"2225checksum = "38af38e8470ac9dee3ce1bae1af9c1671fffc44ddfd8bd1d0a3445bf349a8ef3"2056dependencies = [2226dependencies = [2057 "base64 0.22.1",2227 "base64 0.22.1",2058 "serde",2228 "serde",2059]2229]206022302061[[package]]2231[[package]]2062name = "percent-encoding"2232name = "percent-encoding"2063version = "2.3.1"2233version = "2.3.2"2064source = "registry+https://github.com/rust-lang/crates.io-index"2234source = "registry+https://github.com/rust-lang/crates.io-index"2065checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e"2235checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220"206622362067[[package]]2237[[package]]2068name = "petgraph"2238name = "petgraph"2069version = "0.6.5"2239version = "0.7.1"2070source = "registry+https://github.com/rust-lang/crates.io-index"2240source = "registry+https://github.com/rust-lang/crates.io-index"2071checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db"2241checksum = "3672b37090dbd86368a4145bc067582552b29c27377cad4e0a306c97f9bd7772"2072dependencies = [2242dependencies = [2073 "fixedbitset",2243 "fixedbitset",2074 "indexmap 2.6.0",2244 "indexmap 2.11.0",2075]2245]207622462077[[package]]2247[[package]]2078name = "pin-project"2248name = "pin-project"2079version = "1.1.7"2249version = "1.1.10"2080source = "registry+https://github.com/rust-lang/crates.io-index"2250source = "registry+https://github.com/rust-lang/crates.io-index"2081checksum = "be57f64e946e500c8ee36ef6331845d40a93055567ec57e8fae13efd33759b95"2251checksum = "677f1add503faace112b9f1373e43e9e054bfdd22ff1a63c1bc485eaec6a6a8a"2082dependencies = [2252dependencies = [2083 "pin-project-internal",2253 "pin-project-internal",2084]2254]208522552086[[package]]2256[[package]]2087name = "pin-project-internal"2257name = "pin-project-internal"2088version = "1.1.7"2258version = "1.1.10"2089source = "registry+https://github.com/rust-lang/crates.io-index"2259source = "registry+https://github.com/rust-lang/crates.io-index"2090checksum = "3c0f5fad0874fc7abcd4d750e76917eaebbecaa2c20bde22e1dbeeba8beb758c"2260checksum = "6e918e4ff8c4549eb882f14b3a4bc8c8bc93de829416eacf579f1207a8fbf861"2091dependencies = [2261dependencies = [2092 "proc-macro2",2262 "proc-macro2",2093 "quote",2263 "quote",209622662097[[package]]2267[[package]]2098name = "pin-project-lite"2268name = "pin-project-lite"2099version = "0.2.15"2269version = "0.2.16"2100source = "registry+https://github.com/rust-lang/crates.io-index"2270source = "registry+https://github.com/rust-lang/crates.io-index"2101checksum = "915a1e146535de9163f3987b8944ed8cf49a18bb0056bcebcdcece385cece4ff"2271checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b"210222722103[[package]]2273[[package]]2104name = "pin-utils"2274name = "pin-utils"2127 "spki",2297 "spki",2128]2298]22992300[[package]]2301name = "pkg-config"2302version = "0.3.32"2303source = "registry+https://github.com/rust-lang/crates.io-index"2304checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c"212923052130[[package]]2306[[package]]2131name = "poly1305"2307name = "poly1305"215223282153[[package]]2329[[package]]2154name = "portable-atomic"2330name = "portable-atomic"2155version = "1.9.0"2331version = "1.11.1"2156source = "registry+https://github.com/rust-lang/crates.io-index"2332source = "registry+https://github.com/rust-lang/crates.io-index"2157checksum = "cc9c68a3f6da06753e9335d63e27f6b9754dd1920d941135b7ea8224f141adb2"2333checksum = "f84267b20a16ea918e43c6a88433c2d54fa145c92a811b5b047ccbe153674483"215823342159[[package]]2335[[package]]2160name = "powerfmt"2336name = "powerfmt"216423402165[[package]]2341[[package]]2166name = "ppv-lite86"2342name = "ppv-lite86"2167version = "0.2.20"2343version = "0.2.21"2168source = "registry+https://github.com/rust-lang/crates.io-index"2344source = "registry+https://github.com/rust-lang/crates.io-index"2169checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04"2345checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9"2170dependencies = [2346dependencies = [2171 "zerocopy",2347 "zerocopy",2172]2348]217323492174[[package]]2350[[package]]2175name = "prettyplease"2351name = "prettyplease"2176version = "0.2.25"2352version = "0.2.37"2177source = "registry+https://github.com/rust-lang/crates.io-index"2353source = "registry+https://github.com/rust-lang/crates.io-index"2178checksum = "64d1ec885c64d0457d564db4ec299b2dae3f9c02808b8ad9c3a089c591b18033"2354checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b"2179dependencies = [2355dependencies = [2180 "proc-macro2",2356 "proc-macro2",2181 "syn",2357 "syn",220523812206[[package]]2382[[package]]2207name = "proc-macro2"2383name = "proc-macro2"2208version = "1.0.89"2384version = "1.0.101"2209source = "registry+https://github.com/rust-lang/crates.io-index"2385source = "registry+https://github.com/rust-lang/crates.io-index"2210checksum = "f139b0662de085916d1fb67d2b4169d1addddda1919e696f3252b740b629986e"2386checksum = "89ae43fd86e4158d6db51ad8e2b80f313af9cc74f5c0e03ccb87de09998732de"2211dependencies = [2387dependencies = [2212 "unicode-ident",2388 "unicode-ident",2213]2389]221423902215[[package]]2391[[package]]2216name = "prost"2392name = "prost"2217version = "0.13.3"2393version = "0.13.5"2218source = "registry+https://github.com/rust-lang/crates.io-index"2394source = "registry+https://github.com/rust-lang/crates.io-index"2219checksum = "7b0487d90e047de87f984913713b85c601c05609aad5b0df4b4573fbf69aa13f"2395checksum = "2796faa41db3ec313a31f7624d9286acf277b52de526150b7e69f3debf891ee5"2220dependencies = [2396dependencies = [2221 "bytes",2397 "bytes",2222 "prost-derive",2398 "prost-derive",2223]2399]222424002225[[package]]2401[[package]]2226name = "prost-build"2402name = "prost-build"2227version = "0.13.3"2403version = "0.13.5"2228source = "registry+https://github.com/rust-lang/crates.io-index"2404source = "registry+https://github.com/rust-lang/crates.io-index"2229checksum = "0c1318b19085f08681016926435853bbf7858f9c082d0999b80550ff5d9abe15"2405checksum = "be769465445e8c1474e9c5dac2018218498557af32d9ed057325ec9a41ae81bf"2230dependencies = [2406dependencies = [2231 "bytes",2232 "heck",2407 "heck",2233 "itertools 0.13.0",2408 "itertools 0.14.0",2234 "log",2409 "log",2235 "multimap",2410 "multimap",2236 "once_cell",2411 "once_cell",224524202246[[package]]2421[[package]]2247name = "prost-derive"2422name = "prost-derive"2248version = "0.13.3"2423version = "0.13.5"2249source = "registry+https://github.com/rust-lang/crates.io-index"2424source = "registry+https://github.com/rust-lang/crates.io-index"2250checksum = "e9552f850d5f0964a4e4d0bf306459ac29323ddfbae05e35a7c0d35cb0803cc5"2425checksum = "8a56d757972c98b346a9b766e3f02746cde6dd1cd1d1d563472929fdd74bec4d"2251dependencies = [2426dependencies = [2252 "anyhow",2427 "anyhow",2253 "itertools 0.13.0",2428 "itertools 0.14.0",2254 "proc-macro2",2429 "proc-macro2",2255 "quote",2430 "quote",2256 "syn",2431 "syn",2257]2432]225824332259[[package]]2434[[package]]2260name = "prost-types"2435name = "prost-types"2261version = "0.13.3"2436version = "0.13.5"2262source = "registry+https://github.com/rust-lang/crates.io-index"2437source = "registry+https://github.com/rust-lang/crates.io-index"2263checksum = "4759aa0d3a6232fb8dbdb97b61de2c20047c68aca932c7ed76da9d788508d670"2438checksum = "52c2c1bf36ddb1a1c396b3601a3cec27c2462e45f07c386894ec3ccf5332bd16"2264dependencies = [2439dependencies = [2265 "prost",2440 "prost",2266]2441]226724422268[[package]]2443[[package]]2269name = "quote"2444name = "quote"2270version = "1.0.37"2445version = "1.0.40"2271source = "registry+https://github.com/rust-lang/crates.io-index"2446source = "registry+https://github.com/rust-lang/crates.io-index"2272checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af"2447checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d"2273dependencies = [2448dependencies = [2274 "proc-macro2",2449 "proc-macro2",2275]2450]230424792305[[package]]2480[[package]]2306name = "rand"2481name = "rand"2307version = "0.9.1"2482version = "0.9.2"2308source = "registry+https://github.com/rust-lang/crates.io-index"2483source = "registry+https://github.com/rust-lang/crates.io-index"2309checksum = "9fbfd9d094a40bf3ae768db9361049ace4c0e04a4fd6b359518bd7b73a73dd97"2484checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1"2310dependencies = [2485dependencies = [2311 "rand_chacha 0.9.0",2486 "rand_chacha 0.9.0",2312 "rand_core 0.9.3",2487 "rand_core 0.9.3",2338source = "registry+https://github.com/rust-lang/crates.io-index"2513source = "registry+https://github.com/rust-lang/crates.io-index"2339checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c"2514checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c"2340dependencies = [2515dependencies = [2341 "getrandom 0.2.15",2516 "getrandom 0.2.16",2342]2517]234325182344[[package]]2519[[package]]235225272353[[package]]2528[[package]]2354name = "rcgen"2529name = "rcgen"2355version = "0.13.1"2530version = "0.13.2"2356source = "registry+https://github.com/rust-lang/crates.io-index"2531source = "registry+https://github.com/rust-lang/crates.io-index"2357checksum = "54077e1872c46788540de1ea3d7f4ccb1983d12f9aa909b234468676c1a36779"2532checksum = "75e669e5202259b5314d1ea5397316ad400819437857b90861765f24c4cf80a2"2358dependencies = [2533dependencies = [2359 "pem",2534 "pem",2360 "ring",2535 "ring",236525402366[[package]]2541[[package]]2367name = "redox_syscall"2542name = "redox_syscall"2368version = "0.5.7"2543version = "0.5.17"2369source = "registry+https://github.com/rust-lang/crates.io-index"2544source = "registry+https://github.com/rust-lang/crates.io-index"2370checksum = "9b6dfecf2c74bce2466cabf93f6664d6998a69eb21e39f4207930065b27b771f"2545checksum = "5407465600fb0548f1442edf71dd20683c6ed326200ace4b1ef0763521bb3b77"2371dependencies = [2546dependencies = [2372 "bitflags",2547 "bitflags",2373]2548]237425492375[[package]]2550[[package]]2376name = "regex"2551name = "regex"2377version = "1.11.1"2552version = "1.11.2"2378source = "registry+https://github.com/rust-lang/crates.io-index"2553source = "registry+https://github.com/rust-lang/crates.io-index"2379checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191"2554checksum = "23d7fd106d8c02486a8d64e778353d1cffe08ce79ac2e82f540c86d0facf6912"2380dependencies = [2555dependencies = [2381 "aho-corasick",2556 "aho-corasick",2382 "memchr",2557 "memchr",2383 "regex-automata 0.4.9",2558 "regex-automata",2384 "regex-syntax 0.8.5",2559 "regex-syntax",2385]2560]23862387[[package]]2388name = "regex-automata"2389version = "0.1.10"2390source = "registry+https://github.com/rust-lang/crates.io-index"2391checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132"2392dependencies = [2393 "regex-syntax 0.6.29",2394]239525612396[[package]]2562[[package]]2397name = "regex-automata"2563name = "regex-automata"2398version = "0.4.9"2564version = "0.4.10"2399source = "registry+https://github.com/rust-lang/crates.io-index"2565source = "registry+https://github.com/rust-lang/crates.io-index"2400checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908"2566checksum = "6b9458fa0bfeeac22b5ca447c63aaf45f28439a709ccd244698632f9aa6394d6"2401dependencies = [2567dependencies = [2402 "aho-corasick",2568 "aho-corasick",2403 "memchr",2569 "memchr",2404 "regex-syntax 0.8.5",2570 "regex-syntax",2405]2571]24062407[[package]]2408name = "regex-syntax"2409version = "0.6.29"2410source = "registry+https://github.com/rust-lang/crates.io-index"2411checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1"241225722413[[package]]2573[[package]]2414name = "regex-syntax"2574name = "regex-syntax"2415version = "0.8.5"2575version = "0.8.6"2416source = "registry+https://github.com/rust-lang/crates.io-index"2576source = "registry+https://github.com/rust-lang/crates.io-index"2417checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c"2577checksum = "caf4aa5b0f434c91fe5c7f1ecb6a5ece2130b02ad2a590589dda5146df959001"241825782419[[package]]2579[[package]]2420name = "ring"2580name = "ring"2421version = "0.17.8"2581version = "0.17.14"2422source = "registry+https://github.com/rust-lang/crates.io-index"2582source = "registry+https://github.com/rust-lang/crates.io-index"2423checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d"2583checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7"2424dependencies = [2584dependencies = [2425 "cc",2585 "cc",2426 "cfg-if",2586 "cfg-if",2427 "getrandom 0.2.15",2587 "getrandom 0.2.16",2428 "libc",2588 "libc",2429 "spin",2430 "untrusted",2589 "untrusted",2431 "windows-sys 0.52.0",2590 "windows-sys 0.52.0",2432]2591]245526142456[[package]]2615[[package]]2457name = "rnix"2616name = "rnix"2458version = "0.10.2"2617version = "0.12.0"2459source = "registry+https://github.com/rust-lang/crates.io-index"2618source = "registry+https://github.com/rust-lang/crates.io-index"2460checksum = "8024a523e8836f1a5d051203dc00d833357fee94e351b51348dfaeca5364daa9"2619checksum = "6f15e00b0ab43abd70d50b6f8cd021290028f9b7fdd7cdfa6c35997173bc1ba9"2461dependencies = [2620dependencies = [2462 "cbitset",2463 "rowan",2621 "rowan",2464 "smol_str",2465]2622]246626232467[[package]]2624[[package]]2468name = "ron"2625name = "ron"2469version = "0.10.1"2626version = "0.11.0"2470source = "registry+https://github.com/rust-lang/crates.io-index"2627source = "registry+https://github.com/rust-lang/crates.io-index"2471checksum = "beceb6f7bf81c73e73aeef6dd1356d9a1b2b4909e1f0fc3e59b034f9572d7b7f"2628checksum = "db09040cc89e461f1a265139777a2bde7f8d8c67c4936f700c63ce3e2904d468"2472dependencies = [2629dependencies = [2473 "base64 0.22.1",2630 "base64 0.22.1",2474 "bitflags",2631 "bitflags",247926362480[[package]]2637[[package]]2481name = "rowan"2638name = "rowan"2482version = "0.12.6"2639version = "0.15.17"2483source = "registry+https://github.com/rust-lang/crates.io-index"2640source = "registry+https://github.com/rust-lang/crates.io-index"2484checksum = "a1b36e449f3702f3b0c821411db1cbdf30fb451726a9456dce5dabcd44420043"2641checksum = "d4f1e4a001f863f41ea8d0e6a0c34b356d5b733db50dadab3efef640bafb779b"2485dependencies = [2642dependencies = [2486 "countme",2643 "countme",2487 "hashbrown 0.9.1",2644 "hashbrown 0.14.5",2488 "memoffset",2645 "memoffset",2489 "rustc-hash",2646 "rustc-hash 1.1.0",2490 "text-size",2647 "text-size",2491]2648]249226492493[[package]]2650[[package]]2494name = "rsa"2651name = "rsa"2495version = "0.9.6"2652version = "0.9.8"2496source = "registry+https://github.com/rust-lang/crates.io-index"2653source = "registry+https://github.com/rust-lang/crates.io-index"2497checksum = "5d0e5124fcb30e76a7e79bfee683a2746db83784b86289f6251b54b7950a0dfc"2654checksum = "78928ac1ed176a5ca1d17e578a1825f3d81ca54cf41053a592584b020cfd691b"2498dependencies = [2655dependencies = [2499 "const-oid",2656 "const-oid",2500 "digest",2657 "digest",251226692513[[package]]2670[[package]]2514name = "rust-embed"2671name = "rust-embed"2515version = "8.5.0"2672version = "8.7.2"2516source = "registry+https://github.com/rust-lang/crates.io-index"2673source = "registry+https://github.com/rust-lang/crates.io-index"2517checksum = "fa66af4a4fdd5e7ebc276f115e895611a34739a9c1c01028383d612d550953c0"2674checksum = "025908b8682a26ba8d12f6f2d66b987584a4a87bc024abc5bbc12553a8cd178a"2518dependencies = [2675dependencies = [2519 "rust-embed-impl",2676 "rust-embed-impl",2520 "rust-embed-utils",2677 "rust-embed-utils",252326802524[[package]]2681[[package]]2525name = "rust-embed-impl"2682name = "rust-embed-impl"2526version = "8.5.0"2683version = "8.7.2"2527source = "registry+https://github.com/rust-lang/crates.io-index"2684source = "registry+https://github.com/rust-lang/crates.io-index"2528checksum = "6125dbc8867951125eec87294137f4e9c2c96566e61bf72c45095a7c77761478"2685checksum = "6065f1a4392b71819ec1ea1df1120673418bf386f50de1d6f54204d836d4349c"2529dependencies = [2686dependencies = [2530 "proc-macro2",2687 "proc-macro2",2531 "quote",2688 "quote",253626932537[[package]]2694[[package]]2538name = "rust-embed-utils"2695name = "rust-embed-utils"2539version = "8.5.0"2696version = "8.7.2"2540source = "registry+https://github.com/rust-lang/crates.io-index"2697source = "registry+https://github.com/rust-lang/crates.io-index"2541checksum = "2e5347777e9aacb56039b0e1f28785929a8a3b709e87482e7442c72e7c12529d"2698checksum = "f6cc0c81648b20b70c491ff8cce00c1c3b223bb8ed2b5d41f0e54c6c4c0a3594"2542dependencies = [2699dependencies = [2543 "sha2",2700 "sha2",2544 "walkdir",2701 "walkdir",2545]2702]254627032547[[package]]2704[[package]]2548name = "rustc-demangle"2705name = "rustc-demangle"2549version = "0.1.24"2706version = "0.1.26"2550source = "registry+https://github.com/rust-lang/crates.io-index"2707source = "registry+https://github.com/rust-lang/crates.io-index"2551checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f"2708checksum = "56f7d92ca342cea22a06f2121d944b4fd82af56988c270852495420f961d4ace"255227092553[[package]]2710[[package]]2554name = "rustc-hash"2711name = "rustc-hash"2555version = "1.1.0"2712version = "1.1.0"2556source = "registry+https://github.com/rust-lang/crates.io-index"2713source = "registry+https://github.com/rust-lang/crates.io-index"2557checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2"2714checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2"27152716[[package]]2717name = "rustc-hash"2718version = "2.1.1"2719source = "registry+https://github.com/rust-lang/crates.io-index"2720checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d"255827212559[[package]]2722[[package]]2560name = "rustc_version"2723name = "rustc_version"256727302568[[package]]2731[[package]]2569name = "rustix"2732name = "rustix"2570version = "0.38.40"2733version = "0.38.44"2571source = "registry+https://github.com/rust-lang/crates.io-index"2734source = "registry+https://github.com/rust-lang/crates.io-index"2572checksum = "99e4ea3e1cdc4b559b8e5650f9c8e5998e3e5c1343b4eaf034565f32318d63c0"2735checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154"2573dependencies = [2736dependencies = [2574 "bitflags",2737 "bitflags",2575 "errno",2738 "errno",2576 "libc",2739 "libc",2577 "linux-raw-sys 0.4.14",2740 "linux-raw-sys 0.4.15",2578 "windows-sys 0.52.0",2741 "windows-sys 0.59.0",2579]2742]258027432581[[package]]2744[[package]]2582name = "rustix"2745name = "rustix"2583version = "1.0.7"2746version = "1.0.8"2584source = "registry+https://github.com/rust-lang/crates.io-index"2747source = "registry+https://github.com/rust-lang/crates.io-index"2585checksum = "c71e83d6afe7ff64890ec6b71d6a69bb8a610ab78ce364b3352876bb4c801266"2748checksum = "11181fbabf243db407ef8df94a6ce0b2f9a733bd8be4ad02b4eda9602296cac8"2586dependencies = [2749dependencies = [2587 "bitflags",2750 "bitflags",2588 "errno",2751 "errno",2589 "libc",2752 "libc",2590 "linux-raw-sys 0.9.4",2753 "linux-raw-sys 0.9.4",2591 "windows-sys 0.59.0",2754 "windows-sys 0.60.2",2592]2755]259327562594[[package]]2757[[package]]2595name = "rustls"2758name = "rustls"2596version = "0.23.17"2759version = "0.23.31"2597source = "registry+https://github.com/rust-lang/crates.io-index"2760source = "registry+https://github.com/rust-lang/crates.io-index"2598checksum = "7f1a745511c54ba6d4465e8d5dfbd81b45791756de28d4981af70d6dca128f1e"2761checksum = "c0ebcbd2f03de0fc1122ad9bb24b127a5a6cd51d72604a3f3c50ac459762b6cc"2599dependencies = [2762dependencies = [2600 "log",2763 "log",2601 "once_cell",2764 "once_cell",261727802618[[package]]2781[[package]]2619name = "rustls-pki-types"2782name = "rustls-pki-types"2620version = "1.10.0"2783version = "1.12.0"2621source = "registry+https://github.com/rust-lang/crates.io-index"2784source = "registry+https://github.com/rust-lang/crates.io-index"2622checksum = "16f1201b3c9a7ee8039bcadc17b7e605e2945b27eee7631788c1bd2b0643674b"2785checksum = "229a4a4c221013e7e1f1a043678c5cc39fe5171437c88fb47151a21e6f5b5c79"2786dependencies = [2787 "zeroize",2788]262327892624[[package]]2790[[package]]2625name = "rustls-webpki"2791name = "rustls-webpki"2626version = "0.102.8"2792version = "0.103.4"2627source = "registry+https://github.com/rust-lang/crates.io-index"2793source = "registry+https://github.com/rust-lang/crates.io-index"2628checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9"2794checksum = "0a17884ae0c1b773f1ccd2bd4a8c72f16da897310a98b0e84bf349ad5ead92fc"2629dependencies = [2795dependencies = [2630 "ring",2796 "ring",2631 "rustls-pki-types",2797 "rustls-pki-types",263428002635[[package]]2801[[package]]2636name = "rustversion"2802name = "rustversion"2637version = "1.0.18"2803version = "1.0.22"2638source = "registry+https://github.com/rust-lang/crates.io-index"2804source = "registry+https://github.com/rust-lang/crates.io-index"2639checksum = "0e819f2bc632f285be6d7cd36e25940d45b2391dd6d9b939e79de557f7014248"2805checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d"264028062641[[package]]2807[[package]]2642name = "ryu"2808name = "ryu"2643version = "1.0.18"2809version = "1.0.20"2644source = "registry+https://github.com/rust-lang/crates.io-index"2810source = "registry+https://github.com/rust-lang/crates.io-index"2645checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f"2811checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f"264628122647[[package]]2813[[package]]2648name = "salsa20"2814name = "salsa20"2677source = "registry+https://github.com/rust-lang/crates.io-index"2843source = "registry+https://github.com/rust-lang/crates.io-index"2678checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"2844checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"28452846[[package]]2847name = "scratch"2848version = "1.0.9"2849source = "registry+https://github.com/rust-lang/crates.io-index"2850checksum = "d68f2ec51b097e4c1a75b681a8bec621909b5e91f15bb7b840c4f2f7b01148b2"267928512680[[package]]2852[[package]]2681name = "scrypt"2853name = "scrypt"2703source = "registry+https://github.com/rust-lang/crates.io-index"2875source = "registry+https://github.com/rust-lang/crates.io-index"2704checksum = "e14e4d63b804dc0c7ec4a1e52bcb63f02c7ac94476755aa579edac21e01f915d"2876checksum = "e14e4d63b804dc0c7ec4a1e52bcb63f02c7ac94476755aa579edac21e01f915d"2705dependencies = [2877dependencies = [2706 "self_cell 1.0.4",2878 "self_cell 1.2.0",2707]2879]270828802709[[package]]2881[[package]]2710name = "self_cell"2882name = "self_cell"2711version = "1.0.4"2883version = "1.2.0"2712source = "registry+https://github.com/rust-lang/crates.io-index"2884source = "registry+https://github.com/rust-lang/crates.io-index"2713checksum = "d369a96f978623eb3dc28807c4852d6cc617fed53da5d3c400feff1ef34a714a"2885checksum = "0f7d95a54511e0c7be3f51e8867aa8cf35148d7b9445d44de2f943e2b206e749"271428862715[[package]]2887[[package]]2716name = "semver"2888name = "semver"2717version = "1.0.23"2889version = "1.0.26"2718source = "registry+https://github.com/rust-lang/crates.io-index"2890source = "registry+https://github.com/rust-lang/crates.io-index"2719checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b"2891checksum = "56e6fa9c48d24d85fb3de5ad847117517440f6beceb7798af16b4a87d616b8d0"272028922721[[package]]2893[[package]]2722name = "serde"2894name = "serde"273829102739[[package]]2911[[package]]2740name = "serde_bytes"2912name = "serde_bytes"2741version = "0.11.15"2913version = "0.11.17"2742source = "registry+https://github.com/rust-lang/crates.io-index"2914source = "registry+https://github.com/rust-lang/crates.io-index"2743checksum = "387cc504cb06bb40a96c8e04e951fe01854cf6bc921053c954e4a606d9675c6a"2915checksum = "8437fd221bde2d4ca316d61b90e337e9e702b3820b87d63caa9ba6c02bd06d96"2744dependencies = [2916dependencies = [2745 "serde",2917 "serde",2746]2918]275829302759[[package]]2931[[package]]2760name = "serde_json"2932name = "serde_json"2761version = "1.0.140"2933version = "1.0.143"2762source = "registry+https://github.com/rust-lang/crates.io-index"2934source = "registry+https://github.com/rust-lang/crates.io-index"2763checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373"2935checksum = "d401abef1d108fbd9cbaebc3e46611f4b1021f714a0597a71f41ee463f5f4a5a"2764dependencies = [2936dependencies = [2765 "itoa",2937 "itoa",2766 "memchr",2938 "memchr",277029422771[[package]]2943[[package]]2772name = "sha2"2944name = "sha2"2773version = "0.10.8"2945version = "0.10.9"2774source = "registry+https://github.com/rust-lang/crates.io-index"2946source = "registry+https://github.com/rust-lang/crates.io-index"2775checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8"2947checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283"2776dependencies = [2948dependencies = [2777 "cfg-if",2949 "cfg-if",2778 "cpufeatures",2950 "cpufeatures",280229742803[[package]]2975[[package]]2804name = "signal-hook"2976name = "signal-hook"2805version = "0.3.17"2977version = "0.3.18"2806source = "registry+https://github.com/rust-lang/crates.io-index"2978source = "registry+https://github.com/rust-lang/crates.io-index"2807checksum = "8621587d4798caf8eb44879d42e56b9a93ea5dcd315a6487c357130095b62801"2979checksum = "d881a16cf4426aa584979d30bd82cb33429027e42122b169753d6ef1085ed6e2"2808dependencies = [2980dependencies = [2809 "libc",2981 "libc",2810 "signal-hook-registry",2982 "signal-hook-registry",282329952824[[package]]2996[[package]]2825name = "signal-hook-registry"2997name = "signal-hook-registry"2826version = "1.4.2"2998version = "1.4.6"2827source = "registry+https://github.com/rust-lang/crates.io-index"2999source = "registry+https://github.com/rust-lang/crates.io-index"2828checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1"3000checksum = "b2a4719bff48cee6b39d12c020eeb490953ad2443b7055bd0b21fca26bd8c28b"2829dependencies = [3001dependencies = [2830 "libc",3002 "libc",2831]3003]284230142843[[package]]3015[[package]]2844name = "slab"3016name = "slab"2845version = "0.4.9"3017version = "0.4.11"2846source = "registry+https://github.com/rust-lang/crates.io-index"3018source = "registry+https://github.com/rust-lang/crates.io-index"2847checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67"3019checksum = "7a2ae44ef20feb57a68b23d846850f861394c2e02dc425a50098ae8c90267589"2848dependencies = [2849 "autocfg",2850]285130202852[[package]]3021[[package]]2853name = "smallvec"3022name = "smallvec"2854version = "1.13.2"3023version = "1.15.1"2855source = "registry+https://github.com/rust-lang/crates.io-index"3024source = "registry+https://github.com/rust-lang/crates.io-index"2856checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67"3025checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03"285730262858[[package]]3027[[package]]2859name = "smol_str"3028name = "socket2"2860version = "0.1.24"3029version = "0.5.10"2861source = "registry+https://github.com/rust-lang/crates.io-index"3030source = "registry+https://github.com/rust-lang/crates.io-index"2862checksum = "fad6c857cbab2627dcf01ec85a623ca4e7dcb5691cbaa3d7fb7653671f0d09c9"3031checksum = "e22376abed350d73dd1cd119b57ffccad95b4e585a7cda43e286245ce23c0678"2863dependencies = [3032dependencies = [2864 "serde",3033 "libc",3034 "windows-sys 0.52.0",2865]3035]286630362867[[package]]3037[[package]]2868name = "socket2"3038name = "socket2"2869version = "0.5.7"3039version = "0.6.0"2870source = "registry+https://github.com/rust-lang/crates.io-index"3040source = "registry+https://github.com/rust-lang/crates.io-index"2871checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c"3041checksum = "233504af464074f9d066d7b5416c5f9b894a5862a6506e306f7b816cdd6f1807"2872dependencies = [3042dependencies = [2873 "libc",3043 "libc",2874 "windows-sys 0.52.0",3044 "windows-sys 0.59.0",2875]3045]287630462877[[package]]3047[[package]]291430842915[[package]]3085[[package]]2916name = "supports-color"3086name = "supports-color"2917version = "3.0.1"3087version = "3.0.2"2918source = "registry+https://github.com/rust-lang/crates.io-index"3088source = "registry+https://github.com/rust-lang/crates.io-index"2919checksum = "8775305acf21c96926c900ad056abeef436701108518cf890020387236ac5a77"3089checksum = "c64fc7232dd8d2e4ac5ce4ef302b1d81e0b80d055b9d77c7c4f51f6aa4c867d6"2920dependencies = [3090dependencies = [2921 "is_ci",3091 "is_ci",2922]3092]292330932924[[package]]3094[[package]]2925name = "syn"3095name = "syn"2926version = "2.0.87"3096version = "2.0.106"2927source = "registry+https://github.com/rust-lang/crates.io-index"3097source = "registry+https://github.com/rust-lang/crates.io-index"2928checksum = "25aa4ce346d03a6dcd68dd8b4010bcb74e54e62c90c573f394c46eae99aba32d"3098checksum = "ede7c438028d4436d71104916910f5bb611972c5cfd7f89b8300a8186e6fada6"2929dependencies = [3099dependencies = [2930 "proc-macro2",3100 "proc-macro2",2931 "quote",3101 "quote",2932 "unicode-ident",3102 "unicode-ident",2933]3103]29342935[[package]]2936name = "sync_wrapper"2937version = "0.1.2"2938source = "registry+https://github.com/rust-lang/crates.io-index"2939checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160"294031042941[[package]]3105[[package]]2942name = "sync_wrapper"3106name = "sync_wrapper"2943version = "1.0.1"3107version = "1.0.2"2944source = "registry+https://github.com/rust-lang/crates.io-index"3108source = "registry+https://github.com/rust-lang/crates.io-index"2945checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394"3109checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263"294631102947[[package]]3111[[package]]2948name = "tabled"3112name = "tabled"297031342971[[package]]3135[[package]]2972name = "tempfile"3136name = "tempfile"2973version = "3.20.0"3137version = "3.21.0"2974source = "registry+https://github.com/rust-lang/crates.io-index"3138source = "registry+https://github.com/rust-lang/crates.io-index"2975checksum = "e8a64e3985349f2441a1a9ef0b853f869006c3855f2cda6862a94d26ebb9d6a1"3139checksum = "15b61f8f20e3a6f7e0649d825294eaf317edce30f82cf6026e7e4cb9222a7d1e"2976dependencies = [3140dependencies = [2977 "fastrand",3141 "fastrand",2978 "getrandom 0.3.3",3142 "getrandom 0.3.3",2979 "once_cell",3143 "once_cell",2980 "rustix 1.0.7",3144 "rustix 1.0.8",2981 "windows-sys 0.59.0",3145 "windows-sys 0.60.2",2982]3146]31473148[[package]]3149name = "termcolor"3150version = "1.4.1"3151source = "registry+https://github.com/rust-lang/crates.io-index"3152checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755"3153dependencies = [3154 "winapi-util",3155]298331562984[[package]]3157[[package]]2985name = "terminal_size"3158name = "terminal_size"2986version = "0.4.0"3159version = "0.4.3"2987source = "registry+https://github.com/rust-lang/crates.io-index"3160source = "registry+https://github.com/rust-lang/crates.io-index"2988checksum = "4f599bd7ca042cfdf8f4512b277c02ba102247820f9d9d4a9f521f496751a6ef"3161checksum = "60b8cb979cb11c32ce1603f8137b22262a9d131aaa5c37b5678025f22b8becd0"2989dependencies = [3162dependencies = [2990 "rustix 0.38.40",3163 "rustix 1.0.8",2991 "windows-sys 0.59.0",3164 "windows-sys 0.60.2",2992]3165]299331662994[[package]]3167[[package]]3002 "tokio",3175 "tokio",3003]3176]31773178[[package]]3179name = "test-log"3180version = "0.2.18"3181source = "registry+https://github.com/rust-lang/crates.io-index"3182checksum = "1e33b98a582ea0be1168eba097538ee8dd4bbe0f2b01b22ac92ea30054e5be7b"3183dependencies = [3184 "env_logger",3185 "test-log-macros",3186 "tracing-subscriber",3187]31883189[[package]]3190name = "test-log-macros"3191version = "0.2.18"3192source = "registry+https://github.com/rust-lang/crates.io-index"3193checksum = "451b374529930d7601b1eef8d32bc79ae870b6079b069401709c2a8bf9e75f36"3194dependencies = [3195 "proc-macro2",3196 "quote",3197 "syn",3198]300431993005[[package]]3200[[package]]3006name = "testing_table"3201name = "testing_table"3007version = "0.3.0"3202version = "0.3.0"3008source = "registry+https://github.com/rust-lang/crates.io-index"3203source = "registry+https://github.com/rust-lang/crates.io-index"3009checksum = "0f8daae29995a24f65619e19d8d31dea5b389f3d853d8bf297bbf607cd0014cc"3204checksum = "0f8daae29995a24f65619e19d8d31dea5b389f3d853d8bf297bbf607cd0014cc"3010dependencies = [3205dependencies = [3011 "unicode-width 0.2.0",3206 "unicode-width 0.2.1",3012]3207]301332083014[[package]]3209[[package]]305632513057[[package]]3252[[package]]3058name = "thiserror"3253name = "thiserror"3059version = "2.0.12"3254version = "2.0.16"3060source = "registry+https://github.com/rust-lang/crates.io-index"3255source = "registry+https://github.com/rust-lang/crates.io-index"3061checksum = "567b8a2dae586314f7be2a752ec7474332959c6460e02bde30d702a66d488708"3256checksum = "3467d614147380f2e4e374161426ff399c91084acd2363eaf549172b3d5e60c0"3062dependencies = [3257dependencies = [3063 "thiserror-impl 2.0.12",3258 "thiserror-impl 2.0.16",3064]3259]306532603066[[package]]3261[[package]]307632713077[[package]]3272[[package]]3078name = "thiserror-impl"3273name = "thiserror-impl"3079version = "2.0.12"3274version = "2.0.16"3080source = "registry+https://github.com/rust-lang/crates.io-index"3275source = "registry+https://github.com/rust-lang/crates.io-index"3081checksum = "7f7cf42b4507d8ea322120659672cf1b9dbb93f8f2d4ecfd6e51350ff5b17a1d"3276checksum = "6c5e1be1c48b9172ee610da68fd9cd2770e7a4056cb3fc98710ee6906f0c7960"3082dependencies = [3277dependencies = [3083 "proc-macro2",3278 "proc-macro2",3084 "quote",3279 "quote",308732823088[[package]]3283[[package]]3089name = "thread_local"3284name = "thread_local"3090version = "1.1.8"3285version = "1.1.9"3091source = "registry+https://github.com/rust-lang/crates.io-index"3286source = "registry+https://github.com/rust-lang/crates.io-index"3092checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c"3287checksum = "f60246a4944f24f6e018aa17cdeffb7818b76356965d03b07d6a9886e8962185"3093dependencies = [3288dependencies = [3094 "cfg-if",3289 "cfg-if",3095 "once_cell",3096]3290]309732913098[[package]]3292[[package]]3099name = "time"3293name = "time"3100version = "0.3.41"3294version = "0.3.42"3101source = "registry+https://github.com/rust-lang/crates.io-index"3295source = "registry+https://github.com/rust-lang/crates.io-index"3102checksum = "8a7619e19bc266e0f9c5e6686659d394bc57973859340060a69221e57dbc0c40"3296checksum = "8ca967379f9d8eb8058d86ed467d81d03e81acd45757e4ca341c24affbe8e8e3"3103dependencies = [3297dependencies = [3104 "deranged",3298 "deranged",3105 "num-conv",3299 "num-conv",311133053112[[package]]3306[[package]]3113name = "time-core"3307name = "time-core"3114version = "0.1.4"3308version = "0.1.5"3115source = "registry+https://github.com/rust-lang/crates.io-index"3309source = "registry+https://github.com/rust-lang/crates.io-index"3116checksum = "c9e9a38711f559d9e3ce1cdb06dd7c5b8ea546bc90052da6d06bb76da74bb07c"3310checksum = "a9108bb380861b07264b950ded55a44a14a4adc68b9f5efd85aafc3aa4d40a68"311733113118[[package]]3312[[package]]3119name = "time-macros"3313name = "time-macros"3120version = "0.2.22"3314version = "0.2.23"3121source = "registry+https://github.com/rust-lang/crates.io-index"3315source = "registry+https://github.com/rust-lang/crates.io-index"3122checksum = "3526739392ec93fd8b359c8e98514cb3e8e021beb4e5f597b00a0221f8ed8a49"3316checksum = "7182799245a7264ce590b349d90338f1c1affad93d2639aed5f8f69c090b334c"3123dependencies = [3317dependencies = [3124 "num-conv",3318 "num-conv",3125 "time-core",3319 "time-core",3126]3320]312733213128[[package]]3322[[package]]3129name = "tinystr"3323name = "tinystr"3130version = "0.7.6"3324version = "0.8.1"3131source = "registry+https://github.com/rust-lang/crates.io-index"3325source = "registry+https://github.com/rust-lang/crates.io-index"3132checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f"3326checksum = "5d4f6d1145dcb577acf783d4e601bc1d76a13337bb54e6233add580b07344c8b"3133dependencies = [3327dependencies = [3134 "displaydoc",3328 "displaydoc",3329 "zerovec",3135]3330]313633313137[[package]]3332[[package]]3138name = "tokio"3333name = "tokio"3139version = "1.45.1"3334version = "1.47.1"3140source = "registry+https://github.com/rust-lang/crates.io-index"3335source = "registry+https://github.com/rust-lang/crates.io-index"3141checksum = "75ef51a33ef1da925cea3e4eb122833cb377c61439ca401b770f54902b806779"3336checksum = "89e49afdadebb872d3145a5638b59eb0691ea23e46ca484037cfab3b76b95038"3142dependencies = [3337dependencies = [3143 "backtrace",3338 "backtrace",3144 "bytes",3339 "bytes",3340 "io-uring",3145 "libc",3341 "libc",3146 "mio",3342 "mio",3147 "pin-project-lite",3343 "pin-project-lite",3148 "signal-hook-registry",3344 "signal-hook-registry",3345 "slab",3149 "socket2",3346 "socket2 0.6.0",3150 "tokio-macros",3347 "tokio-macros",3151 "windows-sys 0.52.0",3348 "windows-sys 0.59.0",3152]3349]315333503154[[package]]3351[[package]]316433613165[[package]]3362[[package]]3166name = "tokio-rustls"3363name = "tokio-rustls"3167version = "0.26.0"3364version = "0.26.2"3168source = "registry+https://github.com/rust-lang/crates.io-index"3365source = "registry+https://github.com/rust-lang/crates.io-index"3169checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4"3366checksum = "8e727b36a1a0e8b74c376ac2211e40c2c8af09fb4013c60d910495810f008e9b"3170dependencies = [3367dependencies = [3171 "rustls",3368 "rustls",3172 "rustls-pki-types",3173 "tokio",3369 "tokio",3174]3370]317533713176[[package]]3372[[package]]3177name = "tokio-stream"3373name = "tokio-stream"3178version = "0.1.16"3374version = "0.1.17"3179source = "registry+https://github.com/rust-lang/crates.io-index"3375source = "registry+https://github.com/rust-lang/crates.io-index"3180checksum = "4f4e6ce100d0eb49a2734f8c0812bcd324cf357d21810932c5df6b96ef2b86f1"3376checksum = "eca58d7bba4a75707817a2c44174253f9236b2d5fbd055602e9d5c07c139a047"3181dependencies = [3377dependencies = [3182 "futures-core",3378 "futures-core",3183 "pin-project-lite",3379 "pin-project-lite",318733833188[[package]]3384[[package]]3189name = "tokio-util"3385name = "tokio-util"3190version = "0.7.15"3386version = "0.7.16"3191source = "registry+https://github.com/rust-lang/crates.io-index"3387source = "registry+https://github.com/rust-lang/crates.io-index"3192checksum = "66a539a9ad6d5d281510d5bd368c973d636c02dbf8a67300bfb6b950696ad7df"3388checksum = "14307c986784f72ef81c89db7d9e28d6ac26d16213b109ea501696195e6e3ce5"3193dependencies = [3389dependencies = [3194 "bytes",3390 "bytes",3195 "futures-core",3391 "futures-core",3229 "pin-project",3425 "pin-project",3230 "prost",3426 "prost",3231 "rustls-pemfile",3427 "rustls-pemfile",3232 "socket2",3428 "socket2 0.5.10",3233 "tokio",3429 "tokio",3234 "tokio-rustls",3430 "tokio-rustls",3235 "tokio-stream",3431 "tokio-stream",327534713276[[package]]3472[[package]]3277name = "tower"3473name = "tower"3278version = "0.5.1"3474version = "0.5.2"3279source = "registry+https://github.com/rust-lang/crates.io-index"3475source = "registry+https://github.com/rust-lang/crates.io-index"3280checksum = "2873938d487c3cfb9aed7546dc9f2711d867c9f90c46b889989a2cb84eba6b4f"3476checksum = "d039ad9159c98b70ecfd540b2573b97f7f52c3e8d9f8ad57a24b916a536975f9"3281dependencies = [3477dependencies = [3282 "futures-core",3478 "futures-core",3283 "futures-util",3479 "futures-util",3284 "pin-project-lite",3480 "pin-project-lite",3285 "sync_wrapper 0.1.2",3481 "sync_wrapper",3286 "tower-layer",3482 "tower-layer",3287 "tower-service",3483 "tower-service",3288]3484]331835143319[[package]]3515[[package]]3320name = "tracing"3516name = "tracing"3321version = "0.1.40"3517version = "0.1.41"3322source = "registry+https://github.com/rust-lang/crates.io-index"3518source = "registry+https://github.com/rust-lang/crates.io-index"3323checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef"3519checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0"3324dependencies = [3520dependencies = [3325 "pin-project-lite",3521 "pin-project-lite",3326 "tracing-attributes",3522 "tracing-attributes",332935253330[[package]]3526[[package]]3331name = "tracing-attributes"3527name = "tracing-attributes"3332version = "0.1.27"3528version = "0.1.30"3333source = "registry+https://github.com/rust-lang/crates.io-index"3529source = "registry+https://github.com/rust-lang/crates.io-index"3334checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7"3530checksum = "81383ab64e72a7a8b8e13130c49e3dab29def6d0c7d76a03087b3cf71c5c6903"3335dependencies = [3531dependencies = [3336 "proc-macro2",3532 "proc-macro2",3337 "quote",3533 "quote",334035363341[[package]]3537[[package]]3342name = "tracing-core"3538name = "tracing-core"3343version = "0.1.32"3539version = "0.1.34"3344source = "registry+https://github.com/rust-lang/crates.io-index"3540source = "registry+https://github.com/rust-lang/crates.io-index"3345checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54"3541checksum = "b9d12581f227e93f094d3af2ae690a574abb8a2b9b7a96e7cfe9647b2b617678"3346dependencies = [3542dependencies = [3347 "once_cell",3543 "once_cell",3348 "valuable",3544 "valuable",3349]3545]335035463351[[package]]3547[[package]]3352name = "tracing-indicatif"3548name = "tracing-indicatif"3353version = "0.3.6"3549version = "0.3.13"3354source = "registry+https://github.com/rust-lang/crates.io-index"3550source = "registry+https://github.com/rust-lang/crates.io-index"3355checksum = "069580424efe11d97c3fef4197fa98c004fa26672cc71ad8770d224e23b1951d"3551checksum = "04d4e11e0e27acef25a47f27e9435355fecdc488867fa2bc90e75b0700d2823d"3356dependencies = [3552dependencies = [3357 "indicatif",3553 "indicatif",3358 "tracing",3554 "tracing",337335693374[[package]]3570[[package]]3375name = "tracing-serde"3571name = "tracing-serde"3376version = "0.1.3"3572version = "0.2.0"3377source = "registry+https://github.com/rust-lang/crates.io-index"3573source = "registry+https://github.com/rust-lang/crates.io-index"3378checksum = "bc6b213177105856957181934e4920de57730fc69bf42c37ee5bb664d406d9e1"3574checksum = "704b1aeb7be0d0a84fc9828cae51dab5970fee5088f83d1dd7ee6f6246fc6ff1"3379dependencies = [3575dependencies = [3380 "serde",3576 "serde",3381 "tracing-core",3577 "tracing-core",3382]3578]338335793384[[package]]3580[[package]]3385name = "tracing-subscriber"3581name = "tracing-subscriber"3386version = "0.3.18"3582version = "0.3.20"3387source = "registry+https://github.com/rust-lang/crates.io-index"3583source = "registry+https://github.com/rust-lang/crates.io-index"3388checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b"3584checksum = "2054a14f5307d601f88daf0553e1cbf472acc4f2c51afab632431cdcd72124d5"3389dependencies = [3585dependencies = [3390 "matchers",3586 "matchers",3391 "nu-ansi-term",3587 "nu-ansi-term",3392 "once_cell",3588 "once_cell",3393 "regex",3589 "regex-automata",3394 "serde",3590 "serde",3395 "serde_json",3591 "serde_json",3396 "sharded-slab",3592 "sharded-slab",341036063411[[package]]3607[[package]]3412name = "type-map"3608name = "type-map"3413version = "0.5.0"3609version = "0.5.1"3414source = "registry+https://github.com/rust-lang/crates.io-index"3610source = "registry+https://github.com/rust-lang/crates.io-index"3415checksum = "deb68604048ff8fa93347f02441e4487594adc20bb8a084f9e564d2b827a0a9f"3611checksum = "cb30dbbd9036155e74adad6812e9898d03ec374946234fbcebd5dfc7b9187b90"3416dependencies = [3612dependencies = [3417 "rustc-hash",3613 "rustc-hash 2.1.1",3418]3614]341936153420[[package]]3616[[package]]3421name = "typenum"3617name = "typenum"3422version = "1.17.0"3618version = "1.18.0"3423source = "registry+https://github.com/rust-lang/crates.io-index"3619source = "registry+https://github.com/rust-lang/crates.io-index"3424checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825"3620checksum = "1dccffe3ce07af9386bfd29e80c0ab1a8205a2fc34e4bcd40364df902cfa8f3f"342536213426[[package]]3622[[package]]3427name = "unic-langid"3623name = "unic-langid"3428version = "0.9.5"3624version = "0.9.6"3429source = "registry+https://github.com/rust-lang/crates.io-index"3625source = "registry+https://github.com/rust-lang/crates.io-index"3430checksum = "23dd9d1e72a73b25e07123a80776aae3e7b0ec461ef94f9151eed6ec88005a44"3626checksum = "a28ba52c9b05311f4f6e62d5d9d46f094bd6e84cb8df7b3ef952748d752a7d05"3431dependencies = [3627dependencies = [3432 "unic-langid-impl",3628 "unic-langid-impl",3433]3629]343436303435[[package]]3631[[package]]3436name = "unic-langid-impl"3632name = "unic-langid-impl"3437version = "0.9.5"3633version = "0.9.6"3438source = "registry+https://github.com/rust-lang/crates.io-index"3634source = "registry+https://github.com/rust-lang/crates.io-index"3439checksum = "0a5422c1f65949306c99240b81de9f3f15929f5a8bfe05bb44b034cc8bf593e5"3635checksum = "dce1bf08044d4b7a94028c93786f8566047edc11110595914de93362559bc658"3440dependencies = [3636dependencies = [3441 "serde",3637 "serde",3442 "tinystr",3638 "tinystr",3443]3639]344436403445[[package]]3641[[package]]3446name = "unicase"3642name = "unicase"3447version = "2.8.0"3643version = "2.8.1"3448source = "registry+https://github.com/rust-lang/crates.io-index"3644source = "registry+https://github.com/rust-lang/crates.io-index"3449checksum = "7e51b68083f157f853b6379db119d1c1be0e6e4dec98101079dec41f6f5cf6df"3645checksum = "75b844d17643ee918803943289730bec8aac480150456169e647ed0b576ba539"345036463451[[package]]3647[[package]]3452name = "unicode-ident"3648name = "unicode-ident"3453version = "1.0.13"3649version = "1.0.18"3454source = "registry+https://github.com/rust-lang/crates.io-index"3650source = "registry+https://github.com/rust-lang/crates.io-index"3455checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe"3651checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512"345636523457[[package]]3653[[package]]3458name = "unicode-segmentation"3654name = "unicode-segmentation"346236583463[[package]]3659[[package]]3464name = "unicode-width"3660name = "unicode-width"3465version = "0.1.11"3661version = "0.1.14"3466source = "registry+https://github.com/rust-lang/crates.io-index"3662source = "registry+https://github.com/rust-lang/crates.io-index"3467checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85"3663checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af"346836643469[[package]]3665[[package]]3470name = "unicode-width"3666name = "unicode-width"3471version = "0.2.0"3667version = "0.2.1"3472source = "registry+https://github.com/rust-lang/crates.io-index"3668source = "registry+https://github.com/rust-lang/crates.io-index"3473checksum = "1fc81956842c57dac11422a97c3b8195a1ff727f06e85c84ed2e8aa277c9a0fd"3669checksum = "4a1a07cc7db3810833284e8d372ccdc6da29741639ecc70c9ec107df0fa6154c"347436703475[[package]]3671[[package]]3476name = "unicode_categories"3672name = "unicode_categories"3484source = "registry+https://github.com/rust-lang/crates.io-index"3680source = "registry+https://github.com/rust-lang/crates.io-index"3485checksum = "7264e107f553ccae879d21fbea1d6724ac785e8c3bfc762137959b5802826ef3"3681checksum = "7264e107f553ccae879d21fbea1d6724ac785e8c3bfc762137959b5802826ef3"36823683[[package]]3684name = "unit-prefix"3685version = "0.5.1"3686source = "registry+https://github.com/rust-lang/crates.io-index"3687checksum = "323402cff2dd658f39ca17c789b502021b3f18707c91cdf22e3838e1b4023817"348636883487[[package]]3689[[package]]3488name = "universal-hash"3690name = "universal-hash"350837103509[[package]]3711[[package]]3510name = "valuable"3712name = "valuable"3511version = "0.1.0"3713version = "0.1.1"3512source = "registry+https://github.com/rust-lang/crates.io-index"3714source = "registry+https://github.com/rust-lang/crates.io-index"3513checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d"3715checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65"351437163515[[package]]3717[[package]]3516name = "version_check"3718name = "version_check"3526dependencies = [3728dependencies = [3527 "itoa",3729 "itoa",3528 "log",3730 "log",3529 "unicode-width 0.1.11",3731 "unicode-width 0.1.14",3530 "vte",3732 "vte",3531]3733]35323734357237743573[[package]]3775[[package]]3574name = "wasi"3776name = "wasi"3575version = "0.11.0+wasi-snapshot-preview1"3777version = "0.11.1+wasi-snapshot-preview1"3576source = "registry+https://github.com/rust-lang/crates.io-index"3778source = "registry+https://github.com/rust-lang/crates.io-index"3577checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"3779checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b"357837803579[[package]]3781[[package]]3580name = "wasi"3782name = "wasi"3581version = "0.14.2+wasi-0.2.4"3783version = "0.14.3+wasi-0.2.4"3582source = "registry+https://github.com/rust-lang/crates.io-index"3784source = "registry+https://github.com/rust-lang/crates.io-index"3583checksum = "9683f9a5a998d873c0d21fcbe3c083009670149a8fab228644b8bd36b2c48cb3"3785checksum = "6a51ae83037bdd272a9e28ce236db8c07016dd0d50c27038b3f407533c030c95"3584dependencies = [3786dependencies = [3585 "wit-bindgen-rt",3787 "wit-bindgen",3586]3788]358737893588[[package]]3790[[package]]3589name = "wasm-bindgen"3791name = "wasm-bindgen"3590version = "0.2.95"3792version = "0.2.100"3591source = "registry+https://github.com/rust-lang/crates.io-index"3793source = "registry+https://github.com/rust-lang/crates.io-index"3592checksum = "128d1e363af62632b8eb57219c8fd7877144af57558fb2ef0368d0087bddeb2e"3794checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5"3593dependencies = [3795dependencies = [3594 "cfg-if",3796 "cfg-if",3595 "once_cell",3797 "once_cell",3798 "rustversion",3596 "wasm-bindgen-macro",3799 "wasm-bindgen-macro",3597]3800]359838013599[[package]]3802[[package]]3600name = "wasm-bindgen-backend"3803name = "wasm-bindgen-backend"3601version = "0.2.95"3804version = "0.2.100"3602source = "registry+https://github.com/rust-lang/crates.io-index"3805source = "registry+https://github.com/rust-lang/crates.io-index"3603checksum = "cb6dd4d3ca0ddffd1dd1c9c04f94b868c37ff5fac97c30b97cff2d74fce3a358"3806checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6"3604dependencies = [3807dependencies = [3605 "bumpalo",3808 "bumpalo",3606 "log",3809 "log",3607 "once_cell",3608 "proc-macro2",3810 "proc-macro2",3609 "quote",3811 "quote",3610 "syn",3812 "syn",361338153614[[package]]3816[[package]]3615name = "wasm-bindgen-macro"3817name = "wasm-bindgen-macro"3616version = "0.2.95"3818version = "0.2.100"3617source = "registry+https://github.com/rust-lang/crates.io-index"3819source = "registry+https://github.com/rust-lang/crates.io-index"3618checksum = "e79384be7f8f5a9dd5d7167216f022090cf1f9ec128e6e6a482a2cb5c5422c56"3820checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407"3619dependencies = [3821dependencies = [3620 "quote",3822 "quote",3621 "wasm-bindgen-macro-support",3823 "wasm-bindgen-macro-support",3622]3824]362338253624[[package]]3826[[package]]3625name = "wasm-bindgen-macro-support"3827name = "wasm-bindgen-macro-support"3626version = "0.2.95"3828version = "0.2.100"3627source = "registry+https://github.com/rust-lang/crates.io-index"3829source = "registry+https://github.com/rust-lang/crates.io-index"3628checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68"3830checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de"3629dependencies = [3831dependencies = [3630 "proc-macro2",3832 "proc-macro2",3631 "quote",3833 "quote",363638383637[[package]]3839[[package]]3638name = "wasm-bindgen-shared"3840name = "wasm-bindgen-shared"3639version = "0.2.95"3841version = "0.2.100"3640source = "registry+https://github.com/rust-lang/crates.io-index"3842source = "registry+https://github.com/rust-lang/crates.io-index"3641checksum = "65fc09f10666a9f147042251e0dda9c18f166ff7de300607007e96bdebc1068d"3843checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d"3844dependencies = [3845 "unicode-ident",3846]364238473643[[package]]3848[[package]]3644name = "web-time"3849name = "web-time"3659 "either",3864 "either",3660 "home",3865 "home",3661 "once_cell",3866 "once_cell",3662 "rustix 0.38.40",3867 "rustix 0.38.44",3663]3868]366438693665[[package]]3870[[package]]368038853681[[package]]3886[[package]]3682name = "winapi-util"3887name = "winapi-util"3683version = "0.1.9"3888version = "0.1.10"3684source = "registry+https://github.com/rust-lang/crates.io-index"3889source = "registry+https://github.com/rust-lang/crates.io-index"3685checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb"3890checksum = "0978bf7171b3d90bac376700cb56d606feb40f251a475a5d6634613564460b22"3686dependencies = [3891dependencies = [3687 "windows-sys 0.59.0",3892 "windows-sys 0.60.2",3688]3893]368938943690[[package]]3895[[package]]369539003696[[package]]3901[[package]]3697name = "windows-core"3902name = "windows-core"3698version = "0.52.0"3903version = "0.61.2"3699source = "registry+https://github.com/rust-lang/crates.io-index"3904source = "registry+https://github.com/rust-lang/crates.io-index"3700checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9"3905checksum = "c0fdd3ddb90610c7638aa2b3a3ab2904fb9e5cdbecc643ddb3647212781c4ae3"3701dependencies = [3906dependencies = [3907 "windows-implement",3908 "windows-interface",3909 "windows-link",3910 "windows-result",3702 "windows-targets",3911 "windows-strings",3703]3912]39133914[[package]]3915name = "windows-implement"3916version = "0.60.0"3917source = "registry+https://github.com/rust-lang/crates.io-index"3918checksum = "a47fddd13af08290e67f4acabf4b459f647552718f683a7b415d290ac744a836"3919dependencies = [3920 "proc-macro2",3921 "quote",3922 "syn",3923]39243925[[package]]3926name = "windows-interface"3927version = "0.59.1"3928source = "registry+https://github.com/rust-lang/crates.io-index"3929checksum = "bd9211b69f8dcdfa817bfd14bf1c97c9188afa36f4750130fcdf3f400eca9fa8"3930dependencies = [3931 "proc-macro2",3932 "quote",3933 "syn",3934]370439353705[[package]]3936[[package]]3706name = "windows-link"3937name = "windows-link"3707version = "0.1.3"3938version = "0.1.3"3708source = "registry+https://github.com/rust-lang/crates.io-index"3939source = "registry+https://github.com/rust-lang/crates.io-index"3709checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a"3940checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a"39413942[[package]]3943name = "windows-result"3944version = "0.3.4"3945source = "registry+https://github.com/rust-lang/crates.io-index"3946checksum = "56f42bd332cc6c8eac5af113fc0c1fd6a8fd2aa08a0119358686e5160d0586c6"3947dependencies = [3948 "windows-link",3949]39503951[[package]]3952name = "windows-strings"3953version = "0.4.2"3954source = "registry+https://github.com/rust-lang/crates.io-index"3955checksum = "56e6c93f3a0c3b36176cb1327a4958a0353d5d166c2a35cb268ace15e91d3b57"3956dependencies = [3957 "windows-link",3958]371039593711[[package]]3960[[package]]3712name = "windows-sys"3961name = "windows-sys"3713version = "0.52.0"3962version = "0.52.0"3714source = "registry+https://github.com/rust-lang/crates.io-index"3963source = "registry+https://github.com/rust-lang/crates.io-index"3715checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d"3964checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d"3716dependencies = [3965dependencies = [3717 "windows-targets",3966 "windows-targets 0.52.6",3718]3967]371939683720[[package]]3969[[package]]3723source = "registry+https://github.com/rust-lang/crates.io-index"3972source = "registry+https://github.com/rust-lang/crates.io-index"3724checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b"3973checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b"3725dependencies = [3974dependencies = [3726 "windows-targets",3975 "windows-targets 0.52.6",3727]3976]39773978[[package]]3979name = "windows-sys"3980version = "0.60.2"3981source = "registry+https://github.com/rust-lang/crates.io-index"3982checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb"3983dependencies = [3984 "windows-targets 0.53.3",3985]372839863729[[package]]3987[[package]]3730name = "windows-targets"3988name = "windows-targets"3731version = "0.52.6"3989version = "0.52.6"3732source = "registry+https://github.com/rust-lang/crates.io-index"3990source = "registry+https://github.com/rust-lang/crates.io-index"3733checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973"3991checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973"3734dependencies = [3992dependencies = [3735 "windows_aarch64_gnullvm",3993 "windows_aarch64_gnullvm 0.52.6",3736 "windows_aarch64_msvc",3994 "windows_aarch64_msvc 0.52.6",3737 "windows_i686_gnu",3995 "windows_i686_gnu 0.52.6",3738 "windows_i686_gnullvm",3996 "windows_i686_gnullvm 0.52.6",3739 "windows_i686_msvc",3997 "windows_i686_msvc 0.52.6",3740 "windows_x86_64_gnu",3998 "windows_x86_64_gnu 0.52.6",3741 "windows_x86_64_gnullvm",3999 "windows_x86_64_gnullvm 0.52.6",3742 "windows_x86_64_msvc",4000 "windows_x86_64_msvc 0.52.6",3743]4001]40024003[[package]]4004name = "windows-targets"4005version = "0.53.3"4006source = "registry+https://github.com/rust-lang/crates.io-index"4007checksum = "d5fe6031c4041849d7c496a8ded650796e7b6ecc19df1a431c1a363342e5dc91"4008dependencies = [4009 "windows-link",4010 "windows_aarch64_gnullvm 0.53.0",4011 "windows_aarch64_msvc 0.53.0",4012 "windows_i686_gnu 0.53.0",4013 "windows_i686_gnullvm 0.53.0",4014 "windows_i686_msvc 0.53.0",4015 "windows_x86_64_gnu 0.53.0",4016 "windows_x86_64_gnullvm 0.53.0",4017 "windows_x86_64_msvc 0.53.0",4018]374440193745[[package]]4020[[package]]3746name = "windows_aarch64_gnullvm"4021name = "windows_aarch64_gnullvm"3747version = "0.52.6"4022version = "0.52.6"3748source = "registry+https://github.com/rust-lang/crates.io-index"4023source = "registry+https://github.com/rust-lang/crates.io-index"3749checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"4024checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"40254026[[package]]4027name = "windows_aarch64_gnullvm"4028version = "0.53.0"4029source = "registry+https://github.com/rust-lang/crates.io-index"4030checksum = "86b8d5f90ddd19cb4a147a5fa63ca848db3df085e25fee3cc10b39b6eebae764"375040313751[[package]]4032[[package]]3752name = "windows_aarch64_msvc"4033name = "windows_aarch64_msvc"3753version = "0.52.6"4034version = "0.52.6"3754source = "registry+https://github.com/rust-lang/crates.io-index"4035source = "registry+https://github.com/rust-lang/crates.io-index"3755checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"4036checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"40374038[[package]]4039name = "windows_aarch64_msvc"4040version = "0.53.0"4041source = "registry+https://github.com/rust-lang/crates.io-index"4042checksum = "c7651a1f62a11b8cbd5e0d42526e55f2c99886c77e007179efff86c2b137e66c"375640433757[[package]]4044[[package]]3758name = "windows_i686_gnu"4045name = "windows_i686_gnu"3759version = "0.52.6"4046version = "0.52.6"3760source = "registry+https://github.com/rust-lang/crates.io-index"4047source = "registry+https://github.com/rust-lang/crates.io-index"3761checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"4048checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"40494050[[package]]4051name = "windows_i686_gnu"4052version = "0.53.0"4053source = "registry+https://github.com/rust-lang/crates.io-index"4054checksum = "c1dc67659d35f387f5f6c479dc4e28f1d4bb90ddd1a5d3da2e5d97b42d6272c3"376240553763[[package]]4056[[package]]3764name = "windows_i686_gnullvm"4057name = "windows_i686_gnullvm"3765version = "0.52.6"4058version = "0.52.6"3766source = "registry+https://github.com/rust-lang/crates.io-index"4059source = "registry+https://github.com/rust-lang/crates.io-index"3767checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"4060checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"40614062[[package]]4063name = "windows_i686_gnullvm"4064version = "0.53.0"4065source = "registry+https://github.com/rust-lang/crates.io-index"4066checksum = "9ce6ccbdedbf6d6354471319e781c0dfef054c81fbc7cf83f338a4296c0cae11"376840673769[[package]]4068[[package]]3770name = "windows_i686_msvc"4069name = "windows_i686_msvc"3771version = "0.52.6"4070version = "0.52.6"3772source = "registry+https://github.com/rust-lang/crates.io-index"4071source = "registry+https://github.com/rust-lang/crates.io-index"3773checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"4072checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"40734074[[package]]4075name = "windows_i686_msvc"4076version = "0.53.0"4077source = "registry+https://github.com/rust-lang/crates.io-index"4078checksum = "581fee95406bb13382d2f65cd4a908ca7b1e4c2f1917f143ba16efe98a589b5d"377440793775[[package]]4080[[package]]3776name = "windows_x86_64_gnu"4081name = "windows_x86_64_gnu"3777version = "0.52.6"4082version = "0.52.6"3778source = "registry+https://github.com/rust-lang/crates.io-index"4083source = "registry+https://github.com/rust-lang/crates.io-index"3779checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"4084checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"40854086[[package]]4087name = "windows_x86_64_gnu"4088version = "0.53.0"4089source = "registry+https://github.com/rust-lang/crates.io-index"4090checksum = "2e55b5ac9ea33f2fc1716d1742db15574fd6fc8dadc51caab1c16a3d3b4190ba"378040913781[[package]]4092[[package]]3782name = "windows_x86_64_gnullvm"4093name = "windows_x86_64_gnullvm"3783version = "0.52.6"4094version = "0.52.6"3784source = "registry+https://github.com/rust-lang/crates.io-index"4095source = "registry+https://github.com/rust-lang/crates.io-index"3785checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"4096checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"40974098[[package]]4099name = "windows_x86_64_gnullvm"4100version = "0.53.0"4101source = "registry+https://github.com/rust-lang/crates.io-index"4102checksum = "0a6e035dd0599267ce1ee132e51c27dd29437f63325753051e71dd9e42406c57"378641033787[[package]]4104[[package]]3788name = "windows_x86_64_msvc"4105name = "windows_x86_64_msvc"3791checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"4108checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"379241093793[[package]]4110[[package]]3794name = "wit-bindgen-rt"4111name = "windows_x86_64_msvc"3795version = "0.39.0"4112version = "0.53.0"3796source = "registry+https://github.com/rust-lang/crates.io-index"4113source = "registry+https://github.com/rust-lang/crates.io-index"3797checksum = "6f42320e61fe2cfd34354ecb597f86f413484a798ba44a8ca1165c58d42da6c1"4114checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486"41154116[[package]]3798dependencies = [4117name = "wit-bindgen"3799 "bitflags",4118version = "0.45.0"3800]4119source = "registry+https://github.com/rust-lang/crates.io-index"4120checksum = "052283831dbae3d879dc7f51f3d92703a316ca49f91540417d38591826127814"380141213802[[package]]4122[[package]]3803name = "wsl"4123name = "wsl"383441543835[[package]]4155[[package]]3836name = "zerocopy"4156name = "zerocopy"3837version = "0.7.35"4157version = "0.8.26"3838source = "registry+https://github.com/rust-lang/crates.io-index"4158source = "registry+https://github.com/rust-lang/crates.io-index"3839checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0"4159checksum = "1039dd0d3c310cf05de012d8a39ff557cb0d23087fd44cad61df08fc31907a2f"3840dependencies = [4160dependencies = [3841 "byteorder",3842 "zerocopy-derive",4161 "zerocopy-derive",3843]4162]384441633845[[package]]4164[[package]]3846name = "zerocopy-derive"4165name = "zerocopy-derive"3847version = "0.7.35"4166version = "0.8.26"3848source = "registry+https://github.com/rust-lang/crates.io-index"4167source = "registry+https://github.com/rust-lang/crates.io-index"3849checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e"4168checksum = "9ecf5b4cc5364572d7f4c329661bcc82724222973f2cab6f050a4e5c22f75181"3850dependencies = [4169dependencies = [3851 "proc-macro2",4170 "proc-macro2",3852 "quote",4171 "quote",3853 "syn",4172 "syn",3854]4173]41744175[[package]]4176name = "zerofrom"4177version = "0.1.6"4178source = "registry+https://github.com/rust-lang/crates.io-index"4179checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5"385541803856[[package]]4181[[package]]3857name = "zeroize"4182name = "zeroize"3873 "syn",4198 "syn",3874]4199]42004201[[package]]4202name = "zerovec"4203version = "0.11.4"4204source = "registry+https://github.com/rust-lang/crates.io-index"4205checksum = "e7aa2bd55086f1ab526693ecbe444205da57e25f4489879da80635a46d90e73b"4206dependencies = [4207 "zerofrom",4208]38754209Cargo.tomldiffbeforeafterboth--- a/Cargo.toml
+++ b/Cargo.toml
@@ -11,7 +11,7 @@
nix-eval = { path = "./crates/nix-eval" }
nixlike = { path = "./crates/nixlike" }
-age = { version = "0.11", features = ["ssh", "plugin"] }
+age = { version = "0.11", features = ["plugin", "ssh"] }
anyhow = "1.0"
clap = { version = "4.5", features = ["derive", "env", "unicode", "wrap_help"] }
clap_complete = "4.5"
cmds/fleet/Cargo.tomldiffbeforeafterboth--- a/cmds/fleet/Cargo.toml
+++ b/cmds/fleet/Cargo.toml
@@ -43,7 +43,7 @@
fleet-base = { version = "0.1.0", path = "../../crates/fleet-base" }
human-repr = { version = "1.1", optional = true }
-indicatif = { version = "0.17", optional = true }
+indicatif = { version = "0.18", optional = true }
nom = "8.0.0"
tracing-indicatif = { version = "0.3", optional = true }
cmds/fleet/src/cmds/build_systems.rsdiffbeforeafterboth--- a/cmds/fleet/src/cmds/build_systems.rs
+++ b/cmds/fleet/src/cmds/build_systems.rs
@@ -1,13 +1,13 @@
use std::{env::current_dir, os::unix::fs::symlink, path::PathBuf};
-use anyhow::{Result, anyhow};
+use anyhow::Result;
use clap::Parser;
use fleet_base::{
deploy::{DeployAction, deploy_task, upload_task},
host::{Config, DeployKind, GenerationStorage},
opts::FleetOpts,
};
-use nix_eval::{NixBuildBatch, nix_go};
+use nix_eval::nix_go;
use tokio::task::LocalSet;
use tracing::{Instrument, error, field, info, info_span, warn};
@@ -32,17 +32,15 @@
config: Config,
hostname: String,
build_attr: &str,
- batch: Option<NixBuildBatch>,
+ // batch: Option<NixBuildBatch>,
) -> Result<PathBuf> {
info!("building");
let host = config.host(&hostname).await?;
// let action = Action::from(self.subcommand.clone());
let nixos = host.nixos_config().await?;
let drv = nix_go!(nixos.system.build[{ build_attr }]);
- let outputs = drv.build_maybe_batch(batch).await?;
- let out_output = outputs
- .get("out")
- .ok_or_else(|| anyhow!("system build should produce \"out\" output"))?;
+ // let outputs = drv.build_maybe_batch(batch).await?;
+ let out_output = drv.build("out").await?;
// We already have system profiles for backups.
if !host.local {
@@ -56,11 +54,11 @@
config.data().gc_root_prefix
),
)
- .arg(out_output);
+ .arg(&out_output);
cmd.sudo().run_nix().await?;
}
- Ok(out_output.clone())
+ Ok(out_output)
}
impl BuildSystems {
@@ -68,21 +66,20 @@
let hosts = opts.filter_skipped(config.list_hosts().await?).await?;
let set = LocalSet::new();
let build_attr = self.build_attr.clone();
- let batch = (hosts.len() > 1).then(|| {
- config
- .nix_session
- .new_build_batch("build-hosts".to_string())
- });
+ // let batch = (hosts.len() > 1).then(|| {
+ // config
+ // .nix_session
+ // .new_build_batch("build-hosts".to_string())
+ // });
for host in hosts {
let config = config.clone();
let span = info_span!("build", host = field::display(&host.name));
let hostname = host.name;
let build_attr = build_attr.clone();
- let batch = batch.clone();
+ // let batch = batch.clone();
set.spawn_local(
(async move {
- let built = match build_task(config, hostname.clone(), &build_attr, batch).await
- {
+ let built = match build_task(config, hostname.clone(), &build_attr).await {
Ok(path) => path,
Err(e) => {
error!("failed to deploy host: {}", e);
@@ -91,7 +88,7 @@
};
// TODO: Handle error
let mut out = current_dir().expect("cwd exists");
- out.push(format!("built-{}", hostname));
+ out.push(format!("built-{hostname}"));
info!("linking iso image to {:?}", out);
if let Err(e) = symlink(built, out) {
@@ -101,7 +98,6 @@
.instrument(span),
);
}
- drop(batch);
set.await;
Ok(())
}
@@ -111,17 +107,16 @@
pub async fn run(self, config: &Config, opts: &FleetOpts) -> Result<()> {
let hosts = opts.filter_skipped(config.list_hosts().await?).await?;
let set = LocalSet::new();
- let batch = (hosts.len() > 1).then(|| {
- config
- .nix_session
- .new_build_batch("deploy-hosts".to_string())
- });
+ // let batch = (hosts.len() > 1).then(|| {
+ // config
+ // .nix_session
+ // .new_build_batch("deploy-hosts".to_string())
+ // });
for host in hosts.into_iter() {
let config = config.clone();
let span = info_span!("deploy", host = field::display(&host.name));
let hostname = host.name.clone();
let opts = opts.clone();
- let batch = batch.clone();
if let Some(deploy_kind) = opts.action_attr::<DeployKind>(&host, "deploy_kind").await? {
host.set_deploy_kind(deploy_kind);
};
@@ -131,15 +126,14 @@
set.spawn_local(
(async move {
- let built =
- match build_task(config.clone(), hostname.clone(), "toplevel", batch).await
- {
- Ok(path) => path,
- Err(e) => {
- error!("failed to build host system closure: {}", e);
- return;
- }
- };
+ let built = match build_task(config.clone(), hostname.clone(), "toplevel").await
+ {
+ Ok(path) => path,
+ Err(e) => {
+ error!("failed to build host system closure: {:#}", e);
+ return;
+ }
+ };
let deploy_kind = match host.deploy_kind().await {
Ok(v) => v,
@@ -187,7 +181,6 @@
.instrument(span),
);
}
- drop(batch);
set.await;
Ok(())
}
cmds/fleet/src/cmds/info.rsdiffbeforeafterboth--- a/cmds/fleet/src/cmds/info.rs
+++ b/cmds/fleet/src/cmds/info.rs
@@ -38,7 +38,8 @@
'host: for host in config.list_hosts().await? {
if !tagged.is_empty() {
let config = &config.config_field;
- let tags: Vec<String> = nix_go_json!(config.hosts[{ host.name }].tags);
+ let host_name = &host.name;
+ let tags: Vec<String> = nix_go_json!(config.hosts[host_name].tags);
for tag in tagged {
if !tags.contains(tag) {
continue 'host;
cmds/fleet/src/cmds/secrets/mod.rsdiffbeforeafterboth--- a/cmds/fleet/src/cmds/secrets/mod.rs
+++ b/cmds/fleet/src/cmds/secrets/mod.rs
@@ -2,6 +2,7 @@
collections::{BTreeMap, BTreeSet, HashSet},
io::{self, Read, Write, stdin, stdout},
path::PathBuf,
+ slice,
};
use age::Recipient;
@@ -14,7 +15,7 @@
opts::FleetOpts,
};
use fleet_shared::SecretData;
-use nix_eval::{NixBuildBatch, Value, nix_go, nix_go_json};
+use nix_eval::{NixType, Value, nix_go, nix_go_json};
use owo_colors::OwoColorize;
use serde::Deserialize;
use tabled::{Table, Tabled};
@@ -159,7 +160,7 @@
}
#[allow(clippy::too_many_arguments)]
-#[tracing::instrument(skip(config, secret, field, prefer_identities, batch))]
+#[tracing::instrument(skip(config, secret, field, prefer_identities))]
async fn maybe_regenerate_shared_secret(
secret_name: &str,
config: &Config,
@@ -168,7 +169,7 @@
expected_owners: &[String],
expected_generation_data: serde_json::Value,
prefer_identities: &[String],
- batch: Option<NixBuildBatch>,
+ // batch: Option<NixBuildBatch>,
) -> Result<FleetSharedSecret> {
let original_set = secret.owners.clone();
@@ -206,12 +207,12 @@
field,
expected_owners.to_vec(),
expected_generation_data,
- batch,
+ // batch,
)
.await?;
Ok(generated)
} else {
- drop(batch);
+ // drop(batch);
let identity_holder = if !prefer_identities.is_empty() {
prefer_identities
.iter()
@@ -263,7 +264,7 @@
default_generator: Value,
expected_owners: &[String],
expected_generation_data: serde_json::Value,
- batch: Option<NixBuildBatch>,
+ // batch: Option<NixBuildBatch>,
) -> Result<FleetSecret> {
let generator = nix_go!(secret.generator);
let on: Option<String> = nix_go_json!(default_generator.impureOn);
@@ -284,17 +285,16 @@
recipients.push(key);
}
let generators = nix_go!(mk_secret_generators(Obj { recipients }));
- let pkgs_and_generators = nix_go!(on_pkgs + generators);
+ // FIXME: Apparently, // operator is slow in nix
+ let pkgs_and_generators = on_pkgs.attrs_update(generators)?;
let call_package = nix_go!(nixpkgs.lib.callPackageWith(pkgs_and_generators));
let generator = nix_go!(call_package(generator)(Obj {}));
- let generator = generator.build_maybe_batch(batch).await?;
- let generator = generator
- .get("out")
- .ok_or_else(|| anyhow!("missing generateImpure out"))?;
- let generator = host.remote_derivation(generator).await?;
+ // let generator = generator.build_maybe_batch(batch).await?;
+ let generator = generator.build("out").await?;
+ let generator = host.remote_derivation(&generator).await?;
let out_parent = host.mktemp_dir().await?;
let out = format!("{out_parent}/out");
@@ -347,21 +347,21 @@
secret: Value,
expected_owners: &[String],
expected_generation_data: serde_json::Value,
- batch: Option<NixBuildBatch>,
+ // batch: Option<NixBuildBatch>,
) -> Result<FleetSecret> {
let generator = nix_go!(secret.generator);
// Can't properly check on nix module system level
{
- let gen_ty = generator.type_of().await?;
- if gen_ty == "null" {
+ let gen_ty = generator.type_of()?;
+ if matches!(gen_ty, NixType::Null) {
bail!("secret has no generator defined, can't automatically generate it.");
}
- if gen_ty == "set" {
- if !generator.has_field("__functor").await? {
- bail!("generator should be functor, got {gen_ty}");
+ if matches!(gen_ty, NixType::Attrs) {
+ if !generator.has_field("__functor")? {
+ bail!("generator should be functor, got {gen_ty:?}");
}
- } else if gen_ty != "lambda" {
- bail!("generator should be functor, got {gen_ty}");
+ } else if matches!(gen_ty, NixType::Function) {
+ bail!("generator should be functor, got {gen_ty:?}");
}
}
let nixpkgs = &config.nixpkgs;
@@ -378,7 +378,7 @@
let generators = nix_go!(default_mk_secret_generators(Obj {
recipients: <Vec<String>>::new(),
}));
- let pkgs_and_generators = nix_go!(default_pkgs + generators);
+ let pkgs_and_generators = default_pkgs.clone().attrs_update(generators)?;
let call_package = nix_go!(nixpkgs.lib.callPackageWith(pkgs_and_generators));
let default_generator = nix_go!(call_package(generator)(Obj {}));
@@ -394,7 +394,7 @@
default_generator,
expected_owners,
expected_generation_data,
- batch,
+ // batch,
)
.await
}
@@ -416,7 +416,7 @@
secret: Value,
expected_owners: Vec<String>,
expected_generation_data: serde_json::Value,
- batch: Option<NixBuildBatch>,
+ // batch: Option<NixBuildBatch>,
) -> Result<FleetSharedSecret> {
// let owners: Vec<String> = nix_go_json!(secret.expectedOwners);
Ok(FleetSharedSecret {
@@ -426,7 +426,7 @@
secret,
&expected_owners,
expected_generation_data,
- batch,
+ // batch,
)
.await?,
owners: expected_owners,
@@ -722,7 +722,8 @@
}
let config_field = &config.config_field;
- let field = nix_go!(config_field.sharedSecrets[{ name }]);
+ let name_clone = name.clone();
+ let field = nix_go!(config_field.sharedSecrets[name_clone]);
let expected_generation_data = nix_go_json!(field.expectedGenerationData);
let updated = maybe_regenerate_shared_secret(
@@ -733,7 +734,7 @@
&target_machines,
expected_generation_data,
&prefer_identities,
- None,
+ // None,
)
.await?;
config.replace_shared(name, updated);
@@ -746,7 +747,7 @@
let stored_shared_set = config.list_shared().into_iter().collect::<HashSet<_>>();
{
// Generate missing shared
- let shared_batch = None;
+ // let shared_batch = None;
let _span = info_span!("shared").entered();
let expected_shared_set = config
.list_configured_shared()
@@ -771,7 +772,7 @@
secret,
expected_owners,
expected_generation_data,
- shared_batch.clone(),
+ // shared_batch.clone(),
)
.in_current_span()
.await?;
@@ -779,7 +780,7 @@
}
}
if !skip_hosts {
- let hosts_batch = None;
+ // let hosts_batch = None;
for host in config.list_hosts().await? {
if opts.should_skip(&host).await? {
continue;
@@ -805,9 +806,9 @@
config,
missing,
secret,
- &[host.name.clone()],
+ slice::from_ref(&host.name),
expected_generation_data,
- hosts_batch.clone(),
+ // hosts_batch.clone(),
)
.in_current_span()
.await
@@ -831,9 +832,9 @@
config,
&name,
secret,
- &[host.name.clone()],
+ slice::from_ref(&host.name),
expected_generation_data,
- hosts_batch.clone(),
+ // hosts_batch.clone(),
)
.in_current_span()
.await
@@ -874,7 +875,7 @@
&expected_owners,
expected_generation_data,
&prefer_identities,
- None,
+ // None,
)
.await?,
);
cmds/fleet/src/cmds/tf.rsdiffbeforeafterboth--- a/cmds/fleet/src/cmds/tf.rs
+++ b/cmds/fleet/src/cmds/tf.rs
@@ -42,8 +42,7 @@
debug!("generating terraform configs");
let system = &config.local_system;
let config = &config.config_field;
- let data: HashMap<String, PathBuf> = nix_go!(config.tf({ system })).build().await?;
- let data = &data["out"];
+ let data: PathBuf = nix_go!(config.tf({ system })).build("out").await?;
let data = fs::read(&data).await?;
create_dir_all(&dir).await?;
cmds/fleet/src/main.rsdiffbeforeafterboth--- a/cmds/fleet/src/main.rs
+++ b/cmds/fleet/src/main.rs
@@ -23,6 +23,7 @@
use human_repr::HumanCount;
#[cfg(feature = "indicatif")]
use indicatif::{ProgressState, ProgressStyle};
+use nix_eval::{gc_register_my_thread, gc_unregister_my_thread, init_libraries};
use tracing::{Instrument, error, info, info_span};
#[cfg(feature = "indicatif")]
use tracing_indicatif::IndicatifLayer;
@@ -183,21 +184,31 @@
}
setup_logging();
- async_main(opts)
-}
-#[tokio::main]
-async fn async_main(opts: RootOpts) -> ExitCode {
- if let Err(e) = main_real(opts).await {
- error!("{e:#}");
- return ExitCode::FAILURE;
- }
- ExitCode::SUCCESS
+ init_libraries();
+
+ tokio::runtime::Builder::new_multi_thread()
+ .enable_all()
+ .on_thread_start(|| {
+ gc_register_my_thread();
+ })
+ .on_thread_stop(|| {
+ gc_unregister_my_thread();
+ })
+ .build()
+ .expect("failed to build runtime")
+ .block_on(async {
+ if let Err(e) = main_real(opts).await {
+ error!("{e:#}");
+ ExitCode::FAILURE
+ } else {
+ ExitCode::SUCCESS
+ }
+ })
+ // async_main(opts)
}
async fn main_real(opts: RootOpts) -> Result<()> {
- nix_eval::init_tokio();
-
let nix_args = std::env::var_os("NIX_ARGS")
.map(|a| extra_args::parse_os(&a))
.transpose()?
crates/fleet-base/src/host.rsdiffbeforeafterboth--- a/crates/fleet-base/src/host.rs
+++ b/crates/fleet-base/src/host.rs
@@ -12,7 +12,7 @@
use anyhow::{Context, Result, anyhow, bail, ensure};
use fleet_shared::SecretData;
-use nix_eval::{NixSession, Value, nix_go, nix_go_json, util::assert_warn};
+use nix_eval::{Value, nix_go, nix_go_json, util::assert_warn};
use openssh::SessionBuilder;
use serde::de::DeserializeOwned;
use tabled::Tabled;
@@ -41,8 +41,6 @@
pub default_pkgs: Value,
/// inputs.nixpkgs
pub nixpkgs: Value,
-
- pub nix_session: NixSession,
}
// TODO: Make field not pub
@@ -232,14 +230,17 @@
}
};
if !is_fleet_managed {
- bail!(indoc::indoc! {"
+ bail!(
+ "{}",
+ indoc::indoc! {"
host is not marked as managed by fleet
if you're not trying to lustrate/install system from scratch,
you should either
1. manually create /etc/FLEET_HOST file on the target host,
2. use ?deploy_kind=fleet host argument if you're upgrading from older version of fleet
3. use ?deploy_kind=upgrade_to_fleet if you're upgrading from plain nixos to fleet-managed nixos
- "});
+ "}
+ );
}
// TOCTOU is possible
let _ = self.deploy_kind.set(DeployKind::Fleet);
@@ -503,8 +504,8 @@
let nixos = self.nixos_unchecked_config().await?;
let secrets = nix_go!(nixos.secrets);
let mut out = Vec::new();
- for name in secrets.list_fields().await? {
- let secret = nix_go!(secrets[{ name }]);
+ for name in secrets.list_fields()? {
+ let secret = secrets.get_field(&name)?;
let is_shared: bool = nix_go_json!(secret.shared);
if is_shared {
continue;
@@ -592,7 +593,7 @@
}
pub async fn list_hosts(&self) -> Result<Vec<ConfigHost>> {
let config = &self.config_field;
- let names = nix_go!(config.hosts).list_fields().await?;
+ let names = nix_go!(config.hosts).list_fields()?;
let mut out = vec![];
for name in names {
out.push(self.host(&name).await?);
@@ -608,7 +609,7 @@
/// Shared secrets configured in fleet.nix or in flake
pub async fn list_configured_shared(&self) -> Result<Vec<String>> {
let config_field = &self.config_field;
- Ok(nix_go!(config_field.sharedSecrets).list_fields().await?)
+ nix_go!(config_field.sharedSecrets).list_fields()
}
/// Shared secrets configured in fleet.nix
pub fn list_shared(&self) -> Vec<String> {
@@ -680,10 +681,10 @@
// maybe it can be a .nix file for persistence, but accessible only
// thru some shared state controller? Might it be stored in terraform
// state provider?
- pub fn data(&self) -> MutexGuard<FleetData> {
+ pub fn data(&'_ self) -> MutexGuard<'_, FleetData> {
self.data.lock().unwrap()
}
- pub fn data_mut(&self) -> MutexGuard<FleetData> {
+ pub fn data_mut(&'_ self) -> MutexGuard<'_, FleetData> {
self.data.lock().unwrap()
}
pub fn save(&self) -> Result<()> {
@@ -691,8 +692,7 @@
let data = nixlike::serialize(&self.data() as &FleetData)?;
tempfile.write_all(
format!(
- "# This file contains fleet state and shouldn't be edited by hand\n\n{}\n\n# vim: ts=2 et nowrap\n",
- data
+ "# This file contains fleet state and shouldn't be edited by hand\n\n{data}\n\n# vim: ts=2 et nowrap\n"
)
.as_bytes(),
)?;
crates/fleet-base/src/opts.rsdiffbeforeafterboth--- a/crates/fleet-base/src/opts.rs
+++ b/crates/fleet-base/src/opts.rs
@@ -7,7 +7,7 @@
};
use anyhow::{Context, Result, bail};
-use nix_eval::{NixSessionPool, Value, nix_go, util::assert_warn};
+use nix_eval::{FetchSettings, FlakeReference, FlakeSettings, Value, nix_go, util::assert_warn};
use nom::{
Parser,
bytes::complete::take_while1,
@@ -210,30 +210,39 @@
std::fs::read_to_string(&fleet_data_path).context("reading fleet state (fleet.nix)")?;
let data: Mutex<FleetData> = nixlike::parse_str(&bytes)?;
- let pool = NixSessionPool::new(
- directory.as_os_str().to_owned(),
- nix_args.clone(),
- self.local_system.clone(),
- self.fail_fast,
- )
- .await?;
- let nix_session = pool.get().await?;
+ let mut fetch_settings = FetchSettings::new();
+ fetch_settings.set(c"warn-dirty", c"false");
+
+ // TODO: use correct directory, not cwd
+ let (mut flake, _) = FlakeReference::new(
+ directory
+ .to_str()
+ .ok_or_else(|| anyhow::anyhow!("fleet dir should have utf-8 path"))?,
+ &fetch_settings,
+ )?;
+ let flake = flake.lock(&fetch_settings)?;
+
+ let mut flake_settings = FlakeSettings::new()?;
+ let flake = flake.get_attrs(&mut flake_settings)?;
- let builtins_field = Value::binding(nix_session.clone(), "builtins").await?;
+ let builtins_field = Value::eval("builtins")?;
- let fleet_root = Value::binding(nix_session.clone(), "fleetConfigurations").await?;
- let fleet_field = nix_go!(fleet_root.default({ data }));
+ let fleet_root = flake.get_field("fleetConfigurations")?;
+ let data_val = Value::serialized(&data)?;
+ let fleet_field = nix_go!(fleet_root.default(data_val));
let config_field = nix_go!(fleet_field.config);
if assert {
- assert_warn("fleet config evaluation", &config_field).await?;
+ assert_warn("fleet config evaluation", &config_field)
+ .await
+ .context("failed to verify assertions")?;
}
let import = nix_go!(builtins_field.import);
let overlays = nix_go!(config_field.nixpkgs.overlays);
let nixpkgs = nix_go!(config_field.nixpkgs.buildUsing);
- let nixpkgs_imported = nix_go!(nixpkgs | import);
+ let nixpkgs_imported = nix_go!(import(nixpkgs));
let default_pkgs = nix_go!(nixpkgs_imported(Obj {
overlays,
@@ -241,7 +250,6 @@
}));
Ok(Config(Arc::new(FleetConfigInternals {
- nix_session,
directory,
data,
local_system: self.local_system.clone(),
crates/nix-eval/Cargo.tomldiffbeforeafterboth--- a/crates/nix-eval/Cargo.toml
+++ b/crates/nix-eval/Cargo.toml
@@ -16,12 +16,17 @@
tokio-util.workspace = true
tracing.workspace = true
+cxx = "1.0.168"
futures = "0.3.31"
itertools = "0.14.0"
r2d2 = "0.8.10"
regex = "1.11.1"
+test-log = { version = "0.2.18", features = ["trace"] }
unindent = "0.2.4"
+tracing-indicatif = "0.3.13"
+ctor = "0.5.0"
-# [build-dependencies]
-# bindgen = "0.69.4"
-# pkg-config = "0.3.30"
+[build-dependencies]
+bindgen = "0.72.0"
+cxx-build = "1.0.168"
+pkg-config = "0.3.30"
crates/nix-eval/build.rsdiffbeforeafterboth--- a/crates/nix-eval/build.rs
+++ b/crates/nix-eval/build.rs
@@ -1,30 +1,101 @@
-// use bindgen::callbacks::ParseCallbacks;
-// use std::path::PathBuf;
-//
-// #[derive(Debug)]
-// struct StripPrefix;
-// impl ParseCallbacks for StripPrefix {
-// fn item_name(&self, name: &str) -> Option<String> {
-// name.strip_prefix("nix_").map(ToOwned::to_owned)
-// }
-// }
+use bindgen::{
+ RustEdition,
+ callbacks::{ItemInfo, ParseCallbacks},
+};
+use std::path::PathBuf;
+#[derive(Debug)]
+struct StripPrefix;
+impl ParseCallbacks for StripPrefix {
+ fn item_name(&self, name: ItemInfo<'_>) -> Option<String> {
+ name.name.strip_prefix("nix_").map(ToOwned::to_owned)
+ }
+}
+
fn main() {
- //
- // let mut libnix = bindgen::builder().header_contents("nix.h", "
- // #define GC_THREADS
- // #include <gc/gc.h>
- // #include <nix_api_expr.h>
- // #include <nix_api_store.h>
- // #include <nix_api_util.h>
- // #include <nix_api_value.h>
- // ").parse_callbacks(Box::new(StripPrefix));
- //
- // for header in pkg_config::probe_library("nix-expr-c").expect("nix-expr-c").include_paths.into_iter().chain(pkg_config::probe_library("bdw-gc").expect("bdw-gc").include_paths.into_iter()) {
- // libnix = libnix.clang_arg(format!("-I{}", header.to_str().expect("path is utf-8")));
- // }
+ // Link nix C++ libraries for cxx
+ for lib in &[
+ "nix-util",
+ "nix-store",
+ "nix-expr",
+ "nix-flake",
+ "nix-fetchers",
+ "bdw-gc",
+ ] {
+ if let Ok(library) = pkg_config::probe_library(lib) {
+ for lib_path in library.libs {
+ println!("cargo:rustc-link-lib={lib_path}");
+ }
+ for search_path in library.link_paths {
+ println!("cargo:rustc-link-search=native={}", search_path.display());
+ }
+ }
+ }
+
+ cxx_build::bridge("src/logging.rs")
+ .file("src/logging.cc")
+ .std("c++20")
+ .shared_flag(true)
+ .compile("nix-eval-logging");
+ cxx_build::bridge("src/lib.rs")
+ .file("src/lib.cc")
+ .std("c++20")
+ .shared_flag(true)
+ .compile("nix-eval");
+
+ println!("cargo:rerun-if-changed=src/lib.cc");
+ println!("cargo:rerun-if-changed=src/lib.hh");
+ println!("cargo:rerun-if-changed=src/logging.cc");
+ println!("cargo:rerun-if-changed=src/logging.hh");
+
//
- // let mut out = PathBuf::from(std::env::var("OUT_DIR").expect("OUT_DIR is set by cargo"));
- // out.push("bindings.rs");
- // libnix.generate().expect("generate bindings").write_to_file(out).expect("write bindings");
+ let mut libnix = bindgen::builder()
+ .rust_edition(RustEdition::Edition2024)
+ .header_contents(
+ "nix.h",
+ "
+ #define GC_THREADS
+ #include <gc/gc.h>
+ #include <nix_api_expr.h>
+ #include <nix_api_store.h>
+ #include <nix_api_flake.h>
+ #include <nix_api_fetchers.h>
+ #include <nix_api_util.h>
+ #include <nix_api_value.h>
+ ",
+ )
+ .parse_callbacks(Box::new(StripPrefix));
+
+ for header in pkg_config::probe_library("nix-expr-c")
+ .expect("nix-expr-c")
+ .include_paths
+ .into_iter()
+ .chain(
+ pkg_config::probe_library("nix-flake-c")
+ .expect("nix-flake-c")
+ .include_paths
+ .into_iter(),
+ )
+ .chain(
+ pkg_config::probe_library("nix-fetchers-c")
+ .expect("nix-fetchers-c")
+ .include_paths
+ .into_iter(),
+ )
+ .chain(
+ pkg_config::probe_library("bdw-gc")
+ .expect("bdw-gc")
+ .include_paths
+ .into_iter(),
+ ) {
+ libnix = libnix.clang_arg(format!("-I{}", header.to_str().expect("path is utf-8")));
+ }
+
+ let mut out = PathBuf::from(std::env::var("OUT_DIR").expect("OUT_DIR is set by cargo"));
+ out.push("bindings.rs");
+ libnix
+ .generate()
+ .expect("generate bindings")
+ .write_to_file(out)
+ .expect("write bindings");
}
crates/nix-eval/src/lib.ccdiffbeforeafterboth--- /dev/null
+++ b/crates/nix-eval/src/lib.cc
@@ -0,0 +1,17 @@
+#include "nix-eval/src/lib.rs"
+#include "lib.hh"
+#include <nix/fetchers/fetch-settings.hh>
+#include <nix/util/ref.hh>
+#include <nix_api_fetchers.h>
+
+struct nix_fetchers_settings {
+ nix::ref<nix::fetchers::Settings> settings;
+};
+
+extern "C" {
+void set_fetcher_setting(nix_fetchers_settings *settings_struct,
+ const char *setting, const char *value) {
+ auto &settings_ref = settings_struct->settings;
+ bool result = settings_ref->set(setting, value);
+}
+}
crates/nix-eval/src/lib.hhdiffbeforeafterboth--- /dev/null
+++ b/crates/nix-eval/src/lib.hh
@@ -0,0 +1,7 @@
+#pragma once
+#include <nix_api_fetchers.h>
+
+extern "C" {
+void set_fetcher_setting(nix_fetchers_settings *settings, const char *setting,
+ const char *value);
+}
crates/nix-eval/src/lib.rsdiffbeforeafterboth--- a/crates/nix-eval/src/lib.rs
+++ b/crates/nix-eval/src/lib.rs
@@ -3,120 +3,892 @@
//!
//! Current api is awful, little effort was put into this implementation.
-use std::{collections::HashMap, path::PathBuf, sync::Arc};
+use std::borrow::Cow;
+use std::cell::RefCell;
+use std::ffi::{CStr, CString, c_char, c_int, c_uint, c_void};
+use std::fmt;
+use std::ptr::null_mut;
+use std::sync::LazyLock;
+use std::{collections::HashMap, path::PathBuf};
-pub use pool::NixSessionPool;
-use pool::NixSessionPoolInner;
-use r2d2::PooledConnection;
-pub use session::{Error, Result};
-use tokio::sync::{mpsc, oneshot};
-use tracing::instrument;
-pub use value::{Index, Value};
+use anyhow::{Context, bail};
+use serde::Serialize;
+use serde::de::DeserializeOwned;
+
+pub use anyhow::Result;
+
+use self::logging::nix_logging_cxx;
+use self::nix_cxx::set_fetcher_setting;
+use self::nix_raw::{
+ alloc_value, c_context, c_context_create, err_code, err_info_msg, eval_state_build,
+ eval_state_builder_new, expr_eval_from_string, fetchers_settings, fetchers_settings_free,
+ fetchers_settings_new, flake_lock, flake_lock_flags, flake_lock_flags_free,
+ flake_lock_flags_new, flake_reference_parse_flags, flake_reference_parse_flags_free,
+ flake_reference_parse_flags_new, flake_reference_parse_flags_set_base_directory,
+ flake_settings, flake_settings_free, flake_settings_new, init_bool, init_int, init_string,
+ locked_flake_free, locked_flake_get_output_attrs, set_err_msg, setting_set, state_free,
+ value_decref, value_force, value_incref,
+};
-mod pool;
-mod session;
mod value;
// Contains macros helpers
+pub mod logging;
#[doc(hidden)]
pub mod macros;
pub mod util;
-// #[allow(non_upper_case_globals, non_camel_case_types, non_snake_case)]
-// mod nix_raw {
-// include!(concat!(env!("OUT_DIR"), "/bindings.rs"));
-// }
-// fn init() {
-// nix_raw::libutil_init();
-// }
+#[allow(non_upper_case_globals, non_camel_case_types, non_snake_case)]
+mod nix_raw {
+ include!(concat!(env!("OUT_DIR"), "/bindings.rs"));
+}
+#[cxx::bridge]
+pub mod nix_cxx {
+ unsafe extern "C++" {
+ type nix_fetchers_settings;
+ include!("nix-eval/src/lib.hh");
+
+ unsafe fn set_fetcher_setting(
+ settings: *mut nix_fetchers_settings,
+ setting: *const c_char,
+ value: *const c_char,
+ );
+ }
+}
+
+#[derive(Debug, PartialEq, Eq)]
+pub enum NixType {
+ Thunk,
+ Int,
+ Float,
+ Bool,
+ String,
+ Path,
+ Null,
+ Attrs,
+ List,
+ Function,
+ External,
+}
+impl NixType {
+ fn from_int(c: c_uint) -> Self {
+ match c {
+ 0 => Self::Thunk,
+ 1 => Self::Int,
+ 2 => Self::Float,
+ 3 => Self::Bool,
+ 4 => Self::String,
+ 5 => Self::Path,
+ 6 => Self::Null,
+ 7 => Self::Attrs,
+ 8 => Self::List,
+ 9 => Self::Function,
+ 10 => Self::External,
+ _ => unreachable!("unknown nix type: {c}"),
+ }
+ }
+}
+
+#[derive(Debug)]
+#[repr(i32)]
+enum NixErrorKind {
+ Unknown = 1,
+ Overflow = 2,
+ Key = 3,
+ Generic = 4,
+}
+impl NixErrorKind {
+ fn from_int(v: c_int) -> Option<Self> {
+ Some(match v {
+ 0 => return None,
+ -1 => Self::Unknown,
+ -2 => Self::Overflow,
+ -3 => Self::Key,
+ -4 => Self::Generic,
+ _ => {
+ debug_assert!(false, "unexpected nix error kind: {v}");
+ Self::Unknown
+ }
+ })
+ }
+}
+
+pub fn gc_register_my_thread() {
+ assert_eq!(unsafe { nix_raw::GC_thread_is_registered() }, 0);
+
+ let mut sb = nix_raw::GC_stack_base {
+ mem_base: null_mut(),
+ };
+ let r = unsafe { nix_raw::GC_get_stack_base(&mut sb) };
+ if r as u32 != nix_raw::GC_SUCCESS {
+ panic!("failed to get thread stack base");
+ }
+ unsafe { nix_raw::GC_register_my_thread(&sb) };
+}
+pub fn gc_unregister_my_thread() {
+ assert_eq!(unsafe { nix_raw::GC_thread_is_registered() }, 1);
+
+ unsafe { nix_raw::GC_unregister_my_thread() };
+}
+
+struct ThreadRegisterGuard {}
+impl ThreadRegisterGuard {
+ fn new() -> Self {
+ gc_register_my_thread();
+ Self {}
+ }
+}
+impl Drop for ThreadRegisterGuard {
+ fn drop(&mut self) {
+ gc_unregister_my_thread();
+ }
+}
+
+struct NixContext(*mut c_context);
+impl NixContext {
+ fn set_err(&mut self, err: NixErrorKind, msg: &CStr) {
+ unsafe { set_err_msg(self.0, err as c_int, msg.as_ptr()) };
+ }
+ fn new() -> Self {
+ let ctx = unsafe { c_context_create() };
+ Self(ctx)
+ }
+ fn error_kind(&self) -> Option<NixErrorKind> {
+ let code = unsafe { err_code(self.0) };
+ NixErrorKind::from_int(code)
+ }
+ fn error<'t>(&self) -> Option<Cow<'t, str>> {
+ if let NixErrorKind::Generic = self.error_kind()? {
+ let mut err_out = String::new();
+ unsafe {
+ err_info_msg(
+ null_mut(),
+ self.0,
+ Some(copy_nix_str),
+ (&raw mut err_out).cast(),
+ )
+ };
+ return Some(Cow::Owned(err_out));
+ };
+
+ // TODO: Can throw error (resulting in panic) if unable to retrieve error. Should be able to resolve by passing context as a first argument,
+ // but it looks ugly
+ let str = unsafe { nix_raw::err_msg(null_mut(), self.0, null_mut()) };
+ Some(unsafe { CStr::from_ptr(str) }.to_string_lossy())
+
+ // TODO: There is also nix_err_info_msg, but I don't understand when it should be used
+ // Some(match self.error_kind()? {
+ // NixErrorKind::Generic => {
+ // }
+ // })
+ }
+ fn clean_err(&mut self) {
+ unsafe {
+ nix_raw::clear_err(self.0);
+ }
+ }
+
+ fn bail_if_error(&self) -> Result<()> {
+ if let Some(err) = self.error() {
+ bail!("{err}");
+ };
+ Ok(())
+ }
+
+ fn run_in_context<T>(&mut self, f: impl FnOnce(*mut c_context) -> T) -> Result<T> {
+ self.clean_err();
+ let o = f(self.0);
+ self.bail_if_error()?;
+ self.clean_err();
+ Ok(o)
+ }
+}
+impl Drop for NixContext {
+ fn drop(&mut self) {
+ unsafe {
+ nix_raw::c_context_free(self.0);
+ }
+ }
+}
+struct GlobalState {
+ store: Store,
+ state: EvalState,
+}
+impl GlobalState {
+ fn new() -> Result<Self> {
+ let mut ctx = NixContext::new();
+ let store = ctx
+ .run_in_context(|c| unsafe { nix_raw::store_open(c, c"daemon".as_ptr(), null_mut()) })
+ .map(Store)?;
+
+ let builder = ctx.run_in_context(|c| unsafe { eval_state_builder_new(c, store.0) })?;
+ ctx.run_in_context(|c| {
+ unsafe {
+ nix_raw::eval_state_builder_set_eval_setting(
+ c,
+ builder,
+ c"lazy-trees".as_ptr(),
+ c"true".as_ptr(),
+ )
+ }
+ // eval_s
+ })?;
+ let state = ctx
+ .run_in_context(|c| unsafe { eval_state_build(c, builder) })
+ .map(EvalState)?;
+
+ Ok(Self { store, state })
+ }
+}
+
+struct ThreadState {
+ ctx: NixContext,
+}
+impl ThreadState {
+ fn new() -> Result<Self> {
+ let ctx = NixContext::new();
+
+ Ok(Self { ctx })
+ }
+}
+
+static GLOBAL_STATE: LazyLock<GlobalState> =
+ LazyLock::new(|| GlobalState::new().expect("global state init shouldn't fail"));
+
+thread_local! {
+ static THREAD_STATE: RefCell<ThreadState> = RefCell::new(ThreadState::new().expect("thread state init shouldn't fail"));
+}
+fn with_default_context<T>(
+ f: impl FnOnce(*mut c_context, *mut nix_raw::EvalState) -> T,
+) -> Result<T> {
+ let global = &GLOBAL_STATE.state;
+ let (ctx, state) = THREAD_STATE.with_borrow_mut(|w| (w.ctx.0, global.0));
+ let mut ctx = NixContext(ctx);
+ let v = ctx.run_in_context(|c| f(c, state));
+ // It is reused for thread
+ std::mem::forget(ctx);
+ v
+}
+
+fn set_setting(s: &CStr, v: &CStr) -> Result<()> {
+ with_default_context(|c, _| unsafe { setting_set(c, s.as_ptr(), v.as_ptr()) }).map(|_| ())
+}
+
+pub struct FetchSettings(*mut fetchers_settings);
+impl FetchSettings {
+ pub fn new() -> Self {
+ Self::try_new().expect("allocation should not fail")
+ }
+ fn try_new() -> Result<Self> {
+ with_default_context(|c, _| unsafe { fetchers_settings_new(c) }).map(Self)
+ }
+ pub fn set(&mut self, setting: &CStr, value: &CStr) {
+ unsafe {
+ set_fetcher_setting(self.0.cast(), setting.as_ptr(), value.as_ptr());
+ };
+ }
+}
+unsafe impl Send for FetchSettings {}
+unsafe impl Sync for FetchSettings {}
+impl Drop for FetchSettings {
+ fn drop(&mut self) {
+ unsafe { fetchers_settings_free(self.0) };
+ }
+}
+pub struct FlakeSettings(*mut flake_settings);
+impl FlakeSettings {
+ pub fn new() -> Result<Self> {
+ with_default_context(|c, _| unsafe { flake_settings_new(c) }).map(Self)
+ }
+}
+unsafe impl Send for FlakeSettings {}
+unsafe impl Sync for FlakeSettings {}
+impl Drop for FlakeSettings {
+ fn drop(&mut self) {
+ unsafe {
+ flake_settings_free(self.0);
+ }
+ }
+}
+
+struct FlakeReferenceParseFlags(*mut flake_reference_parse_flags);
+impl FlakeReferenceParseFlags {
+ fn new(settings: &mut FlakeSettings) -> Result<Self> {
+ with_default_context(|c, _| unsafe { flake_reference_parse_flags_new(c, settings.0) })
+ .map(Self)
+ }
+ fn set_base_dir(&mut self, dir: &str) -> Result<()> {
+ with_default_context(|c, _| {
+ unsafe {
+ flake_reference_parse_flags_set_base_directory(
+ c,
+ self.0,
+ dir.as_ptr().cast(),
+ dir.len(),
+ )
+ };
+ })
+ }
+}
+impl Drop for FlakeReferenceParseFlags {
+ fn drop(&mut self) {
+ unsafe {
+ flake_reference_parse_flags_free(self.0);
+ }
+ }
+}
+struct FlakeLockFlags(*mut flake_lock_flags);
+impl FlakeLockFlags {
+ fn new(settings: &mut FlakeSettings) -> Result<Self> {
+ with_default_context(|c, _| unsafe { flake_lock_flags_new(c, settings.0) }).map(Self)
+ }
+}
+impl Drop for FlakeLockFlags {
+ fn drop(&mut self) {
+ unsafe {
+ flake_lock_flags_free(self.0);
+ }
+ }
+}
+
+unsafe extern "C" fn copy_nix_str(start: *const c_char, n: c_uint, user_data: *mut c_void) {
+ let s = unsafe { std::slice::from_raw_parts(start.cast::<u8>(), n as usize) };
+ let s = std::str::from_utf8(s).expect("c string has invalid utf-8");
+ unsafe { *user_data.cast::<String>() = s.to_owned() };
+}
+
+struct Store(*mut nix_raw::Store);
+unsafe impl Send for Store {}
+unsafe impl Sync for Store {}
+
+struct EvalState(*mut nix_raw::EvalState);
+impl EvalState {
+ // TODO: store ownership
+ fn new_raw(store: *mut nix_raw::Store) -> Result<Self> {
+ let builder =
+ with_default_context(|c, _| unsafe { nix_raw::eval_state_builder_new(c, store) })?;
+
+ with_default_context(|c, _| unsafe { eval_state_build(c, builder) }).map(Self)
+
+ // with_default_context(|c| state_create(c))
+ }
+}
+unsafe impl Send for EvalState {}
+unsafe impl Sync for EvalState {}
+impl Drop for EvalState {
+ fn drop(&mut self) {
+ unsafe {
+ state_free(self.0);
+ }
+ }
+}
+
+pub struct FlakeReference(*mut nix_raw::flake_reference);
+impl FlakeReference {
+ pub fn new(s: &str, fetch: &FetchSettings) -> Result<(Self, String)> {
+ let mut flake_settings = FlakeSettings::new()?;
+ let mut parse_flags = FlakeReferenceParseFlags::new(&mut flake_settings)?;
+
+ // parse_flags.set_base_dir("/home/lach/build/fleet")?;
+
+ let mut out = null_mut();
+ let mut fragment = String::new();
+ // let fetch_settings = fetcher_settings;
+ with_default_context(|c, _| unsafe {
+ nix_raw::flake_reference_and_fragment_from_string(
+ c,
+ fetch.0,
+ flake_settings.0,
+ parse_flags.0,
+ s.as_ptr().cast(),
+ s.len(),
+ &mut out,
+ Some(copy_nix_str),
+ (&raw mut fragment).cast(),
+ )
+ })?;
+ assert!(!out.is_null());
+
+ Ok((Self(out), fragment))
+ }
+ pub fn lock(&mut self, fetch: &FetchSettings) -> Result<LockedFlake> {
+ let mut settings = FlakeSettings::new()?;
+ let lock_flags = FlakeLockFlags::new(&mut settings)?;
+ with_default_context(|c, es| unsafe {
+ flake_lock(c, fetch.0, settings.0, es, lock_flags.0, self.0)
+ })
+ .map(LockedFlake)
+ }
+}
+unsafe impl Send for FlakeReference {}
+unsafe impl Sync for FlakeReference {}
+
+pub struct LockedFlake(*mut nix_raw::locked_flake);
+impl LockedFlake {
+ pub fn get_attrs(&self, settings: &mut FlakeSettings) -> Result<Value> {
+ with_default_context(|c, es| unsafe {
+ locked_flake_get_output_attrs(c, settings.0, es, self.0)
+ })
+ .map(Value)
+ }
+}
+unsafe impl Send for LockedFlake {}
+unsafe impl Sync for LockedFlake {}
+impl Drop for LockedFlake {
+ fn drop(&mut self) {
+ unsafe {
+ locked_flake_free(self.0);
+ };
+ }
+}
+
+type FieldName = [u8; 32];
+fn init_field_name(v: &str) -> FieldName {
+ let mut f = [0; 32];
+ assert!(v.len() < 32, "max field name is 31 char");
+ assert!(
+ v.bytes().all(|v| v != 0),
+ "nul bytes are unsupported in field name"
+ );
+ f[0..v.len()].copy_from_slice(v.as_bytes());
+ f
+}
+
+pub struct RealisedString(*mut nix_raw::realised_string);
+impl fmt::Debug for RealisedString {
+ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+ self.as_str().fmt(f)
+ }
+}
+
+impl RealisedString {
+ fn as_str(&self) -> &str {
+ let len = unsafe { nix_raw::realised_string_get_buffer_size(self.0) };
+ let data: *const u8 = unsafe { nix_raw::realised_string_get_buffer_start(self.0) }.cast();
+ let data = unsafe { std::slice::from_raw_parts(data, len) };
+ std::str::from_utf8(data).expect("non-utf8 strings not supported")
+ }
+ fn path_count(&self) -> usize {
+ unsafe { nix_raw::realised_string_get_store_path_count(self.0) }
+ }
+ fn path(&self, i: usize) -> String {
+ assert!(i < self.path_count());
+ let path = unsafe { nix_raw::realised_string_get_store_path(self.0, i) };
+ let mut err_out = String::new();
+ unsafe { nix_raw::store_path_name(path, Some(copy_nix_str), (&raw mut err_out).cast()) };
+ err_out
+ }
+}
+
+unsafe impl Send for RealisedString {}
+impl Drop for RealisedString {
+ fn drop(&mut self) {
+ with_default_context(|c, _| unsafe { nix_raw::realised_string_free(self.0) })
+ .expect("string free should not fail")
+ }
+}
-#[derive(Clone)]
-pub struct NixSession(pub(crate) Arc<tokio::sync::Mutex<PooledConnection<NixSessionPoolInner>>>);
+pub struct Value(*mut nix_raw::value);
-struct NixBuildTask(Value, oneshot::Sender<Result<HashMap<String, PathBuf>>>);
+unsafe impl Send for Value {}
+unsafe impl Sync for Value {}
-#[derive(Clone)]
-pub struct NixBuildBatch {
- tx: mpsc::UnboundedSender<NixBuildTask>,
+pub trait AsFieldName {
+ fn as_field_name<T>(&self, v: impl FnOnce(FieldName) -> Result<T>) -> Result<T>;
+ fn to_field_name(&self) -> Result<String>;
+}
+impl AsFieldName for Value {
+ fn as_field_name<T>(&self, v: impl FnOnce(FieldName) -> Result<T>) -> Result<T> {
+ let f = self.to_string()?;
+ v(init_field_name(&f))
+ }
+ fn to_field_name(&self) -> Result<String> {
+ self.to_string()
+ }
+}
+impl<E> AsFieldName for E
+where
+ E: AsRef<str>,
+{
+ fn as_field_name<T>(&self, v: impl FnOnce(FieldName) -> Result<T>) -> Result<T> {
+ let f = self.as_ref();
+ v(init_field_name(f))
+ }
+ fn to_field_name(&self) -> Result<String> {
+ Ok(self.as_ref().to_owned())
+ }
}
-#[instrument(skip(session, values))]
-async fn build_multiple(name: String, session: NixSession, values: Vec<Value>) -> Result<()> {
- let system = session.0.lock().await.nix_system.clone();
- let builtins = Value::binding(session, "builtins").await?;
- let drv = nix_go!(builtins.derivation(Obj {
- system,
- name,
- builder: "/bin/sh",
- // we want nothing from this derivation, it is only used to perform multiple builds at once.
- args: vec!["-c", "echo > $out"],
- preferLocalBuild: true,
- allowSubstitutes: false,
- buildInputs: values,
- }));
- drv.build().await?;
- Ok(())
+struct AttrsBuilder(*mut nix_raw::BindingsBuilder);
+impl AttrsBuilder {
+ fn new(capacity: usize) -> Self {
+ with_default_context(|c, es| unsafe { nix_raw::make_bindings_builder(c, es, capacity) })
+ .map(Self)
+ .expect("alloc should not fail")
+ }
+ fn insert(&mut self, k: &impl AsFieldName, v: Value) {
+ k.as_field_name(|name| {
+ with_default_context(|c, _| unsafe {
+ nix_raw::bindings_builder_insert(c, self.0, name.as_ptr().cast(), v.0)
+ })
+ })
+ .expect("builder insert shouldn't fail");
+ }
}
+impl Drop for AttrsBuilder {
+ fn drop(&mut self) {
+ unsafe { nix_raw::bindings_builder_free(self.0) };
+ }
+}
+
+impl Value {
+ pub fn new_attrs(v: HashMap<&str, Value>) -> Result<Self> {
+ let out = Self::new_uninit()?;
+ let mut b = AttrsBuilder::new(v.len());
+ for (k, v) in v {
+ b.insert(&k, v);
+ }
+ with_default_context(|c, _| unsafe { nix_raw::make_attrs(c, out.0, b.0) })?;
+ Ok(out)
+ }
+ fn new_list<T: Into<Self>>(v: Vec<T>) -> Result<Self> {
+ todo!()
+ }
+ fn new_uninit() -> Result<Self> {
+ let out = with_default_context(|c, es| unsafe { alloc_value(c, es) })?;
+ Ok(Self(out))
+ }
+ fn new_str(v: &str) -> Result<Self> {
+ let s = CString::new(v).expect("string should not contain NULs");
+ let uninit = Self::new_uninit()?;
+ // String is copied, `s` is free to be dropped
+ with_default_context(|c, _| unsafe { init_string(c, uninit.0, s.as_ptr()) })?;
+ Ok(uninit)
+ }
+ fn new_int(i: i64) -> Result<Self> {
+ let uninit = Self::new_uninit()?;
+ with_default_context(|c, _| unsafe { init_int(c, uninit.0, i) })?;
+ Ok(uninit)
+ }
+ fn new_bool(v: bool) -> Result<Self> {
+ let uninit = Self::new_uninit()?;
+ with_default_context(|c, _| unsafe { init_bool(c, uninit.0, v) })?;
+ Ok(uninit)
+ }
+ fn force(&mut self, st: &mut EvalState) -> Result<()> {
+ with_default_context(|c, _| unsafe { value_force(c, st.0, self.0) })?;
+ Ok(())
+ }
+ pub fn type_of(&self) -> Result<NixType> {
+ let ty = with_default_context(|c, _| unsafe { nix_raw::get_type(c, self.0) })?;
+ Ok(NixType::from_int(ty))
+ }
+ pub fn to_string(&self) -> Result<String> {
+ Ok(self.to_realised_string()?.as_str().to_owned())
+ }
+ pub fn to_realised_string(&self) -> Result<RealisedString> {
+ with_default_context(|c, es| unsafe { nix_raw::string_realise(c, es, self.0, false) })
+ .map(RealisedString)
+
+ // let store_paths = unsafe { nix_raw::realised_string_get_store_path_count(str) };
+ // for i in 0..store_paths {
+ // let store_path = unsafe { nix_raw::realised_string_get_store_path(str, i) };
+ // nix_raw::store_path_name(store_path, callback, user_data);
+ // }
+ // dbg!(store_paths);
+ // todo!();
+ }
+
+ pub fn has_field(&self, field: &str) -> Result<bool> {
+ let f = init_field_name(field);
+ with_default_context(|c, es| unsafe {
+ nix_raw::has_attr_byname(c, self.0, es, f.as_ptr().cast())
+ })
+ }
+ // pub fn derivation_path(&self) {
+ // nix_raw::real
+ // }
+ pub fn list_fields(&self) -> Result<Vec<String>> {
+ if !matches!(self.type_of()?, NixType::Attrs) {
+ bail!("invalid type: expected attrs");
+ }
-impl NixBuildBatch {
- fn new(name: String, session: NixSession) -> Self {
- let (tx, mut rx) = mpsc::unbounded_channel::<NixBuildTask>();
+ let len = with_default_context(|c, _| unsafe { nix_raw::get_attrs_size(c, self.0) })?;
+ let mut out = Vec::with_capacity(len as usize);
- tokio::task::spawn(async move {
- let mut deps = vec![];
- let mut build_data = vec![];
- while let Some(task) = rx.recv().await {
- build_data.push(task.0.clone());
- deps.push(task);
+ for i in 0..len {
+ let name = with_default_context(|c, es| unsafe {
+ nix_raw::get_attr_name_byidx(c, self.0, es, i)
+ })?;
+ let c = unsafe { CStr::from_ptr(name) };
+ out.push(c.to_str().expect("nix field names are utf-8").to_owned());
+ }
+ Ok(out)
+ }
+ pub fn get_elem(&self, v: usize) -> Result<Self> {
+ if !matches!(self.type_of()?, NixType::List) {
+ bail!("invalid type: expected list");
+ }
+ let len =
+ with_default_context(|c, _| unsafe { nix_raw::get_list_size(c, self.0) })? as usize;
+ if v >= len {
+ bail!("oob list get: {v} >= {len}");
+ }
+
+ with_default_context(|c, es| unsafe { nix_raw::get_list_byidx(c, self.0, es, v as u32) })
+ .map(Self)
+ }
+ pub fn attrs_update(self, other: Value) -> Result<Self> {
+ let a_fields = self.list_fields()?;
+ let b_fields = other.list_fields()?;
+ match (a_fields.len(), b_fields.len()) {
+ (_, 0) => return Ok(self),
+ (0, _) => return Ok(other),
+ _ => {}
+ }
+ let mut out = HashMap::new();
+ for f in a_fields.iter() {
+ if b_fields.contains(f) {
+ break;
}
- if deps.is_empty() {
- return;
+ out.insert(f.as_str(), self.get_field(f)?);
+ }
+ if out.is_empty() {
+ // All fields from lhs are overriden by rhs
+ return Ok(other);
+ }
+ for f in b_fields.iter() {
+ out.insert(f.as_str(), other.get_field(f)?);
+ }
+ Self::new_attrs(out)
+ }
+ pub fn get_field(&self, name: impl AsFieldName) -> Result<Self> {
+ if !matches!(self.type_of()?, NixType::Attrs) {
+ bail!("invalid type: expected attrs");
+ }
+
+ name.as_field_name(|name| {
+ with_default_context(|c, es| unsafe {
+ nix_raw::get_attr_byname(c, self.0, es, name.as_ptr().cast())
+ })
+ .map(Self)
+ })
+ .with_context(|| format!("getting field {:?}", name.to_field_name()))
+ }
+ pub fn call(&self, v: Value) -> Result<Self> {
+ if !matches!(self.type_of()?, NixType::Function) {
+ // TODO: Functors
+ bail!("invalid type: expected function");
+ }
+
+ let out = Value::new_uninit()?;
+ with_default_context(|c, es| unsafe { nix_raw::value_call(c, es, self.0, v.0, out.0) })?;
+
+ Ok(out)
+ }
+ pub fn eval(v: &str) -> Result<Self> {
+ let s = CString::new(v).expect("expression shouldn't have internal NULs");
+ let out = Self::new_uninit()?;
+ with_default_context(|c, es| unsafe {
+ expr_eval_from_string(c, es, s.as_ptr(), c"/homeless-shelter".as_ptr(), out.0)
+ })?;
+ Ok(out)
+ }
+ pub async fn build(&self, output: &str) -> Result<PathBuf> {
+ if !self.is_derivation() {
+ bail!("expected derivation to build")
+ }
+ let output_name = self.get_field("outputName")?.to_string()?;
+ let v = if output_name != output {
+ let out = self.get_field(output)?;
+ if !out.is_derivation() {
+ bail!("unknown output: {output}");
}
- match build_multiple(name, session, build_data).await {
- Ok(_) => {
- for NixBuildTask(v, o) in deps {
- let _ = o.send(v.build().await);
- }
- }
- Err(e) => {
- for NixBuildTask(v, o) in deps {
- let s = v.to_string_weak().await;
- let s = match s {
- Ok(s) => s,
- Err(e) => {
- let _ = o.send(Err(e));
- continue;
- }
- };
- if PathBuf::from(s).exists() {
- let _ = o.send(v.build().await);
- } else {
- let _ = o.send(Err(e.clone()));
- }
- }
- }
- };
- });
- Self { tx }
+ out
+ } else {
+ self.clone()
+ };
+ // to_string here blocks until the path is built
+ let drv_path = tokio::task::spawn_blocking(move || v.get_field("outPath")?.to_string())
+ .await
+ .expect("should not fail")?;
+ Ok(PathBuf::from(drv_path))
}
- pub async fn submit(self, task: Value) -> Result<HashMap<String, PathBuf>> {
- let Self { tx: task_tx } = self;
- let (tx, rx) = oneshot::channel();
- let _ = task_tx.send(NixBuildTask(task, tx));
- drop(task_tx);
- rx.await.expect("shoudn't be cancelled here")
+ pub fn as_json<T: DeserializeOwned>(&self) -> Result<T> {
+ let to_json = Self::eval("builtins.toJSON")?;
+ let s = to_json.call(self.clone())?.to_string()?;
+ Ok(serde_json::from_str(&s)?)
+ }
+ pub fn serialized<T: Serialize>(v: &T) -> Result<Self> {
+ Self::eval(&nixlike::serialize(v)?)
+ }
+
+ // Convert to string/evaluate derivations/etc
+ fn to_string_weak(&self) -> Result<String> {
+ // TODO
+ self.to_string()
+ }
+
+ fn is_derivation(&self) -> bool {
+ if !matches!(self.type_of(), Ok(NixType::Attrs)) {
+ return false;
+ }
+ let Some(ty) = self.get_field("type").ok() else {
+ return false;
+ };
+ matches!(ty.to_string().as_deref(), Ok("derivation"))
}
}
-impl NixSession {
- fn ptr_eq(a: &Self, b: &Self) -> bool {
- Arc::ptr_eq(&a.0, &b.0)
+impl From<String> for Value {
+ fn from(value: String) -> Self {
+ Value::new_str(&value).expect("todo: TryFrom")
}
+}
+impl From<bool> for Value {
+ fn from(value: bool) -> Self {
+ Value::new_bool(value).expect("todo: TryFrom")
+ }
+}
+impl From<&str> for Value {
+ fn from(value: &str) -> Self {
+ Value::new_str(&value).expect("todo: TryFrom")
+ }
+}
+impl<T> From<Vec<T>> for Value
+where
+ T: Into<Value>,
+{
+ fn from(value: Vec<T>) -> Self {
+ Value::new_list(value).expect("todo: TryFrom")
+ }
+}
- pub fn new_build_batch(&self, name: String) -> NixBuildBatch {
- NixBuildBatch::new(name, self.clone())
+impl Clone for Value {
+ fn clone(&self) -> Self {
+ with_default_context(|c, _| unsafe { value_incref(c, self.0) })
+ .expect("value incref should not fail");
+ Self(self.0)
}
}
+impl Drop for Value {
+ fn drop(&mut self) {
+ with_default_context(|c, _| unsafe { value_decref(c, self.0) })
+ .expect("value drop should not fail");
+ }
+}
+
+pub fn init_libraries() {
+ unsafe { nix_raw::GC_allow_register_threads() };
-pub fn init_tokio() {
- let _ = pool::TOKIO_RUNTIME.set(tokio::runtime::Handle::current());
+ let mut ctx = NixContext::new();
+ ctx.run_in_context(|c| unsafe { nix_raw::libutil_init(c) })
+ .expect("util init should not fail");
+ ctx.run_in_context(|c| unsafe { nix_raw::libstore_init(c) })
+ .expect("store init should not fail");
+ ctx.run_in_context(|c| unsafe { nix_raw::libexpr_init(c) })
+ .expect("expr init should not fail");
+
+ nix_logging_cxx::apply_tracing_logger();
}
+
+#[test_log::test]
+fn test_native() -> Result<()> {
+ let mut fetch_settings = FetchSettings::new();
+ fetch_settings.set(c"warn-dirty", c"false");
+ //
+
+ let (mut r, _) = FlakeReference::new("/home/lach/build/fleet", &fetch_settings)?;
+ let locked = r.lock(&fetch_settings)?;
+ let attrs = locked.get_attrs(&mut FlakeSettings::new()?)?;
+
+ let builtins = Value::eval("builtins")?;
+ dbg!(builtins.type_of()?);
+
+ dbg!(attrs.type_of()?);
+ dbg!(attrs.list_fields()?);
+ dbg!(
+ attrs
+ .get_field("packages")?
+ .get_field("x86_64-linux")?
+ .get_field("fleet")?
+ .get_field("outPath")?
+ .to_string()
+ );
+
+ Ok(())
+}
+
+// struct NixBuildTask(Value, oneshot::Sender<Result<HashMap<String, PathBuf>>>);
+//
+// #[derive(Clone)]
+// pub struct NixBuildBatch {
+// tx: mpsc::UnboundedSender<NixBuildTask>,
+// }
+//
+// #[instrument(skip(values))]
+// async fn build_multiple(name: String, values: Vec<Value>) -> Result<()> {
+// let builtins = Value::eval("builtins")?;
+// let drv = nix_go!(builtins.derivation(Obj {
+// // FIXME: pass system from localSystem or fleet args
+// // system,
+// name,
+// builder: "/bin/sh",
+// // we want nothing from this derivation, it is only used to perform multiple builds at once.
+// args: vec!["-c", "echo > $out"],
+// preferLocalBuild: true,
+// allowSubstitutes: false,
+// buildInputs: values,
+// }));
+// drv.build()?;
+// Ok(())
+// }
+//
+// impl NixBuildBatch {
+// fn new(name: String) -> Self {
+// let (tx, mut rx) = mpsc::unbounded_channel::<NixBuildTask>();
+//
+// tokio::task::spawn(async move {
+// let mut deps = vec![];
+// let mut build_data = vec![];
+// while let Some(task) = rx.recv().await {
+// build_data.push(task.0.clone());
+// deps.push(task);
+// }
+// if deps.is_empty() {
+// return;
+// }
+// match build_multiple(name, build_data).await {
+// Ok(_) => {
+// for NixBuildTask(v, o) in deps {
+// let _ = o.send(v.build());
+// }
+// }
+// Err(e) => {
+// for NixBuildTask(v, o) in deps {
+// let s = v.to_string_weak();
+// let s = match s {
+// Ok(s) => s,
+// Err(e) => {
+// let _ = o.send(Err(e));
+// continue;
+// }
+// };
+// if PathBuf::from(s).exists() {
+// let _ = o.send(v.build());
+// } else {
+// let _ = o.send(Err(e.clone()));
+// }
+// }
+// }
+// };
+// });
+// Self { tx }
+// }
+// pub async fn submit(self, task: Value) -> Result<HashMap<String, PathBuf>> {
+// let Self { tx: task_tx } = self;
+// let (tx, rx) = oneshot::channel();
+// let _ = task_tx.send(NixBuildTask(task, tx));
+// drop(task_tx);
+// rx.await.expect("shoudn't be cancelled here")
+// }
+// }
crates/nix-eval/src/logging.ccdiffbeforeafterboth--- /dev/null
+++ b/crates/nix-eval/src/logging.cc
@@ -0,0 +1,75 @@
+#include "nix-eval/src/logging.rs"
+#include "logging.hh"
+#include <nix/util/logging.hh>
+
+using namespace nix;
+
+struct TracingLogger : Logger {
+ TracingLogger() {}
+
+ bool isVerbose() override { return true; }
+ // void addFields(nlohmann::json & json, const Fields & fields)
+ // {
+ // if (fields.empty())
+ // return;
+ // auto & arr = json["fields"] = nlohmann::json::array();
+ // for (auto & f : fields)
+ // if (f.type == Logger::Field::tInt)
+ // arr.push_back(f.i);
+ // else if (f.type == Logger::Field::tString)
+ // arr.push_back(f.s);
+ // else
+ // unreachable();
+ // }
+ void log(Verbosity lvl, std::string_view s) override {
+ rust::Str str(s.data(), s.size());
+ emit_log(lvl, str);
+ }
+ void logEI(const ErrorInfo &ei) override { emit_log(ei.level, ei.msg.str()); }
+
+ void startActivity(ActivityId act, Verbosity lvl, ActivityType type,
+ const std::string &s, const Fields &fields,
+ ActivityId parent) override {
+ auto b = new_start_activity(act, lvl, type);
+ for (auto &f : fields) {
+ if (f.type == Logger::Field::tInt) {
+ b->add_int_field(f.i);
+ } else if (f.type == Logger::Field::tString) {
+ b->add_string_field(f.s);
+ } else {
+ unreachable();
+ }
+ }
+ b->emit(parent, s);
+ };
+
+ void stopActivity(ActivityId act) override { emit_stop(act); };
+
+ void result(ActivityId act, ResultType type, const Fields &fields) override {
+ auto b = new_start_activity(act, 0, type);
+ for (auto &f : fields) {
+ if (f.type == Logger::Field::tInt) {
+ b->add_int_field(f.i);
+ } else if (f.type == Logger::Field::tString) {
+ b->add_string_field(f.s);
+ } else {
+ unreachable();
+ }
+ }
+ b->emit_result(type);
+ };
+
+ void writeToStdout(std::string_view s) override {
+ printf("writeToStdout() called\n");
+ }
+ void warn(const std::string &msg) override { emit_warn(msg); }
+
+ virtual std::optional<char> ask(std::string_view s) {
+ printf("ask() called\n");
+ return {};
+ }
+};
+
+extern "C" {
+void apply_tracing_logger() { logger = std::make_unique<TracingLogger>(); }
+}
crates/nix-eval/src/logging.hhdiffbeforeafterboth--- /dev/null
+++ b/crates/nix-eval/src/logging.hh
@@ -0,0 +1,5 @@
+#pragma once
+
+extern "C" {
+void apply_tracing_logger();
+}
crates/nix-eval/src/logging.rsdiffbeforeafterboth--- /dev/null
+++ b/crates/nix-eval/src/logging.rs
@@ -0,0 +1,602 @@
+use std::collections::HashMap;
+use std::fmt::Arguments;
+use std::sync::{LazyLock, Mutex};
+
+use tracing::{
+ Level, Metadata, Span, debug, debug_span, error, error_span, event, info, info_span, trace,
+ trace_span, warn, warn_span,
+};
+use tracing_indicatif::span_ext::IndicatifSpanExt as _;
+
+#[derive(Debug)]
+enum ActivityType {
+ Unknown = 0,
+ CopyPath = 100,
+ FileTransfer = 101,
+ Realise = 102,
+ CopyPaths = 103,
+ Builds = 104,
+ Build = 105,
+ OptimiseStore = 106,
+ VerifyPaths = 107,
+ Substitute = 108,
+ QueryPathInfo = 109,
+ PostBuildHook = 110,
+ BuildWaiting = 111,
+ FetchTree = 112,
+}
+
+fn strip_prefix_suffix<'s, 'p>(a: &'s str, pref: &'p str, suff: &'p str) -> Option<&'s str> {
+ a.strip_prefix(pref)?.strip_suffix(suff)
+}
+
+fn parse_path(path: &str) -> &str {
+ let path = strip_prefix_suffix(path, "\x1b[35;1m", "\x1b[0m").unwrap_or(path);
+ path
+}
+
+fn parse_drv(drv: &str) -> &str {
+ let drv = parse_path(drv);
+ if let Some(pkg) = drv.strip_prefix("/nix/store/") {
+ let mut it = pkg.splitn(2, '-');
+ it.next();
+ if let Some(pkg) = it.next() {
+ return pkg;
+ }
+ }
+ drv
+}
+fn parse_host(host: &str) -> &str {
+ if host.is_empty() || host == "local" {
+ return "local";
+ }
+ // https/ssh is the default
+ host.strip_prefix("https://").unwrap_or(host)
+}
+
+impl ActivityType {
+ fn name(&self) -> &'static str {
+ match self {
+ ActivityType::Unknown => "nix",
+ ActivityType::CopyPath => "nix::copy-path",
+ ActivityType::FileTransfer => "nix::file-transfer",
+ ActivityType::Realise => "nix::realise",
+ ActivityType::CopyPaths => "nix::copy-paths",
+ ActivityType::Builds => "nix::builds",
+ ActivityType::Build => "nix::build",
+ ActivityType::OptimiseStore => "nix::optimise-store",
+ ActivityType::VerifyPaths => "nix::verify-paths",
+ ActivityType::Substitute => "nix::substitute",
+ ActivityType::QueryPathInfo => "nix::query-path-info",
+ ActivityType::PostBuildHook => "nix::post-build-hook",
+ ActivityType::BuildWaiting => "nix::build-waiting",
+ ActivityType::FetchTree => "nix::fetch-tree",
+ }
+ }
+ fn format(
+ &self,
+ values: &[FieldValue],
+ s: &str,
+ into: impl FnOnce(Arguments<'_>) -> Span,
+ ) -> Span {
+ use FieldValue::*;
+ match (self, values) {
+ (ActivityType::QueryPathInfo, [Str(drv), Str(host)]) => {
+ let drv = parse_drv(drv);
+ let host = parse_host(host);
+ debug_span!(target: "nix::query-path-info", "querying", drv, host)
+ }
+ (ActivityType::Substitute, [Str(drv), Str(host)]) => {
+ let drv = parse_drv(drv);
+ let host = parse_host(host);
+ debug_span!(target: "nix::substitute", "substituting", drv, host)
+ }
+ (ActivityType::CopyPath, [Str(drv), Str(from), Str(to)]) => {
+ let drv = parse_drv(drv);
+ let from = parse_host(from);
+ let to = parse_host(to);
+ debug_span!(target: "nix::copy-path", "copying", drv, from, to)
+ }
+ (ActivityType::Build, [Str(drv), Str(host), Int(_), Int(_)]) => {
+ let drv = parse_drv(drv);
+ let host = parse_host(host);
+ info_span!(target: "nix::build", "building", drv, host)
+ }
+ (ActivityType::FileTransfer, [Str(file)]) => {
+ info_span!(target: "nix::file-transfer", "downloading", file)
+ }
+ (ActivityType::Realise, []) => {
+ debug_span!(target: "nix::realise", "realising")
+ }
+ (ActivityType::CopyPaths, []) => {
+ debug_span!(target: "nix::copy-paths", "copying paths")
+ }
+ (ActivityType::Unknown, [])
+ if s.starts_with("copying \"") && s.ends_with("\" to the store") =>
+ {
+ let tree = s
+ .trim_start_matches("copying \"")
+ .trim_end_matches("\" to the store");
+ debug_span!(target: "nix::trees", "copying", tree)
+ }
+ (ActivityType::Unknown, [])
+ if s.starts_with("copying '") && s.ends_with("' to the store") =>
+ {
+ let tree = s
+ .trim_start_matches("copying '")
+ .trim_end_matches("' to the store");
+ debug_span!(target: "nix::trees", "copying", tree)
+ }
+ (ActivityType::Unknown, []) if s.starts_with("hashing '") && s.ends_with("'") => {
+ let tree = s.trim_start_matches("hashing '").trim_end_matches("'");
+ debug_span!(target: "nix::trees", "hashing", tree)
+ }
+ (ActivityType::Unknown, []) if s.starts_with("connecting to '") && s.ends_with("'") => {
+ let host = s
+ .trim_start_matches("connecting to '")
+ .trim_end_matches("'");
+ debug_span!(target: "nix::remote", "connecting", host)
+ }
+ (ActivityType::Unknown, [])
+ if s.starts_with("copying outputs from '") && s.ends_with("'") =>
+ {
+ let host = s
+ .trim_start_matches("copying outputs from '")
+ .trim_end_matches("'");
+ debug_span!(target: "nix::remote", "copying outputs", host)
+ }
+ (ActivityType::Unknown, [])
+ if s.starts_with("copying dependencies to '") && s.ends_with("'") =>
+ {
+ let host = s
+ .trim_start_matches("copying dependencies to '")
+ .trim_end_matches("'");
+ debug_span!(target: "nix::remote", "copying dependencies", host)
+ }
+ (ActivityType::Unknown, [])
+ if s.starts_with("waiting for the upload lock to '") && s.ends_with("'") =>
+ {
+ let host = s
+ .trim_start_matches("waiting for the upload lock to '")
+ .trim_end_matches("'");
+ debug_span!(target: "nix::remote", "waiting for upload lock", host)
+ }
+ (ActivityType::BuildWaiting, [])
+ if s.starts_with("waiting for a machine to build '") && s.ends_with("'") =>
+ {
+ let drv = parse_drv(
+ s.trim_start_matches("waiting for a machine to build '")
+ .trim_end_matches("'"),
+ );
+ debug_span!(target: "nix::build-waiting", "waiting for available builder", drv)
+ }
+ (ActivityType::Unknown, []) if s == "querying info about missing paths" => {
+ debug_span!(target: "nix::remote", "querying")
+ }
+ _ => into(format_args!("{}({values:?})", self.name())),
+ }
+ }
+ fn from_int(v: u32) -> Self {
+ match v {
+ 0 => Self::Unknown,
+ 100 => Self::CopyPath,
+ 101 => Self::FileTransfer,
+ 102 => Self::Realise,
+ 103 => Self::CopyPaths,
+ 104 => Self::Builds,
+ 105 => Self::Build,
+ 106 => Self::OptimiseStore,
+ 107 => Self::VerifyPaths,
+ 108 => Self::Substitute,
+ 109 => Self::QueryPathInfo,
+ 110 => Self::PostBuildHook,
+ 111 => Self::BuildWaiting,
+ 112 => Self::FetchTree,
+ _ => {
+ warn!("unknown nix action: {v}");
+ Self::Unknown
+ }
+ }
+ }
+}
+
+#[derive(Debug)]
+enum ResultType {
+ FileLinked = 100,
+ BuildLogLine = 101,
+ UntrustedPath = 102,
+ CorruptedPath = 103,
+ SetPhase = 104,
+ Progress = 105,
+ SetExpected = 106,
+ PostBuildLogLine = 107,
+ FetchStatus = 108,
+
+ Unknown = 999,
+}
+impl ResultType {
+ fn from_int(v: u32) -> Self {
+ match v {
+ 100 => Self::FileLinked,
+ 101 => Self::BuildLogLine,
+ 102 => Self::UntrustedPath,
+ 103 => Self::CorruptedPath,
+ 104 => Self::SetPhase,
+ 105 => Self::Progress,
+ 106 => Self::SetExpected,
+ 107 => Self::PostBuildLogLine,
+ 108 => Self::FetchStatus,
+
+ _ => {
+ warn!("unknown nix result: {v}");
+ Self::Unknown
+ }
+ }
+ }
+}
+#[derive(Clone, Copy)]
+enum Verbosity {
+ Error,
+ Warn,
+ Notice,
+ Info,
+ Talkative,
+ Chatty,
+ Debug,
+ Vomit,
+}
+impl Into<tracing::Level> for Verbosity {
+ fn into(self) -> tracing::Level {
+ match self {
+ Verbosity::Error => Level::ERROR,
+ Verbosity::Warn => Level::WARN,
+ Verbosity::Notice => Level::WARN,
+ Verbosity::Info => Level::INFO,
+ Verbosity::Talkative => Level::DEBUG,
+ Verbosity::Chatty => Level::DEBUG,
+ Verbosity::Debug => Level::DEBUG,
+ Verbosity::Vomit => Level::TRACE,
+ }
+ }
+}
+impl Verbosity {
+ fn from_int(u: u32) -> Self {
+ [
+ Self::Error,
+ Self::Warn,
+ Self::Notice,
+ Self::Info,
+ Self::Talkative,
+ Self::Chatty,
+ Self::Debug,
+ Self::Vomit,
+ ]
+ .get(u as usize)
+ .cloned()
+ .unwrap_or_else(|| {
+ warn!("unknown log level: {u}");
+ Verbosity::Vomit
+ })
+ }
+}
+
+#[derive(Hash, PartialEq, Eq, Clone, Copy)]
+enum MetadataKind {
+ Span,
+ Event,
+}
+// impl MetadataKind {
+// fn kind(&self) -> Kind {
+// match self {
+// MetadataKind::Span => Kind::SPAN,
+// MetadataKind::Event => Kind::EVENT,
+// }
+// }
+// }
+
+#[derive(Hash, PartialEq, Eq)]
+struct ForeignMetadataInfo {
+ target: &'static str,
+ level: Level,
+ kind: MetadataKind,
+ name: &'static str,
+ module: Option<&'static str>,
+ file: Option<&'static str>,
+ line: Option<u32>,
+ names: &'static [&'static str],
+}
+
+struct FakeCallsite;
+impl tracing::callsite::Callsite for FakeCallsite {
+ fn set_interest(&self, interest: tracing::subscriber::Interest) {
+ unreachable!()
+ }
+
+ fn metadata(&self) -> &Metadata<'_> {
+ unreachable!()
+ }
+}
+const FAKE_CALLSITE: FakeCallsite = FakeCallsite;
+
+#[cfg(false)]
+#[derive(Default)]
+struct ForeignSpanData {
+ interned: HashSet<&'static str>,
+ metadatas: HashMap<ForeignMetadataInfo, &'static Metadata<'static>>,
+}
+#[cfg(false)]
+impl ForeignSpanData {
+ fn intern(&mut self, s: &str) -> &'static str {
+ if let Some(v) = self.interned.get(s) {
+ return *v;
+ }
+ let leaked: Box<str> = s.into();
+ let leaked = Box::leak(leaked);
+ self.interned.insert(leaked);
+ return leaked;
+ }
+ fn alloc_metadata<'t>(
+ &'t mut self,
+ target: &'static str,
+ level: Level,
+ kind: MetadataKind,
+ name: &'static str,
+ module: Option<&'static str>,
+ file: Option<&'static str>,
+ line: Option<u32>,
+ names: &'static [&'static str],
+ ) -> &'static Metadata<'static> {
+ let info = ForeignMetadataInfo {
+ target,
+ level,
+ kind,
+ name,
+ module,
+ file,
+ line,
+ names,
+ };
+ if let Some(v) = self.metadatas.get(&info) {
+ return *v;
+ }
+ let fake = FakeCallsite;
+ let metadata = Box::leak::<'static>(Box::new(Metadata::new(
+ name,
+ target,
+ level,
+ file,
+ line,
+ module,
+ FieldSet::new(names, tracing::callsite::Identifier(&FAKE_CALLSITE)),
+ kind.kind(),
+ )));
+
+ let meta_raw = &raw const *metadata;
+ let fields_raw = &raw const *metadata.fields();
+
+ // SAFETY: FieldSet struct should be inside of metadata struct... Which we assume here, but do not test
+ // FIXME: Safety comment above might be invalidated at any time, this should actually be covered by unit test (or, better: runtime assertion... Somehow.)
+ let fields_offset = unsafe { fields_raw.cast::<u8>().offset_from(meta_raw.cast()) };
+ let field_set = unsafe {
+ ((&raw mut *metadata).cast::<()>())
+ .byte_offset(fields_offset)
+ .cast::<FieldSet>()
+ };
+ // FIXME: metadata borrow here invalidates our &mut borrow of 'static Metadata, and 'static FieldSet so this construction should be replaced with raw pointers or idk.
+ // Something should be better done inside of tracing crate itself, someting like interior mutability.
+ let callsite = Box::leak(Box::new(tracing::callsite::DefaultCallsite::new(metadata)));
+ unsafe { *field_set = FieldSet::new(names, tracing::callsite::Identifier(callsite)) };
+
+ tracing::callsite::register(&*callsite);
+
+ self.metadatas.insert(info, metadata);
+ return metadata;
+ }
+}
+
+#[cfg(false)]
+static FOREIGN_SPAN_DATA: LazyLock<Mutex<ForeignSpanData>> =
+ LazyLock::new(|| Mutex::new(ForeignSpanData::default()));
+static NIX_SPAN_MAPPING: LazyLock<Mutex<HashMap<u64, Span>>> =
+ LazyLock::new(|| Mutex::new(HashMap::new()));
+
+#[derive(Debug)]
+enum FieldValue {
+ Int(i32),
+ Str(String),
+}
+
+struct StartActivityBuilder {
+ activity_id: u64,
+ verbosity: Verbosity,
+ typ: ActivityType,
+ fields: Vec<FieldValue>,
+}
+impl StartActivityBuilder {
+ fn add_int_field(&mut self, i: i32) {
+ self.fields.push(FieldValue::Int(i));
+ }
+ fn add_string_field(&mut self, v: &str) {
+ self.fields.push(FieldValue::Str(v.to_owned()));
+ }
+ fn emit(&mut self, parent: u64, s: &str) {
+ let mut mapping = NIX_SPAN_MAPPING.lock().expect("not poisoned");
+
+ let parent = mapping.get(&parent);
+
+ // let meta = spans.alloc_metadata(
+ // self.typ.name(),
+ // self.verbosity.into(),
+ // MetadataKind::Span,
+ // "nix activity start",
+ // None,
+ // None,
+ // None,
+ // self.typ.fields(),
+ // );
+ //
+ // let mut fields = meta.fields().iter();
+ // let span = if let Some(parent) = parent {
+ // let s = Span::new(
+ // meta,
+ // &match meta.fields().len() {
+ // 1 => meta.fields().value_set(
+ // &<[_; 1]>::try_from([(
+ // &fields.next().expect("has field"),
+ // Some(&format_args!("Test") as &dyn tracing::Value),
+ // )])
+ // .expect("valid size"),
+ // ),
+ // _ => unreachable!(),
+ // },
+ // );
+ // s.follows_from(parent);
+ // s
+ // } else {
+ // Span::new_root(
+ // meta,
+ // &match meta.fields().len() {
+ // 1 => meta.fields().value_set(
+ // &<[_; 1]>::try_from([(
+ // &fields.next().expect("has field"),
+ // Some(&format_args!("Test") as &dyn tracing::Value),
+ // )])
+ // .expect("valid size"),
+ // ),
+ // _ => unreachable!(),
+ // },
+ // )
+ // };
+ //
+ // let id = span.id().expect("id created");
+
+ let span = {
+ let _in_parent = parent.map(|p| p.enter());
+ let level: Level = self.verbosity.into();
+ if level == Level::ERROR {
+ self.typ
+ .format(&self.fields, s, |v| error_span!("action", v))
+ } else if level == Level::WARN {
+ self.typ
+ .format(&self.fields, s, |v| warn_span!("action", v))
+ } else if level == Level::INFO {
+ self.typ
+ .format(&self.fields, s, |v| info_span!("action", v))
+ } else if level == Level::DEBUG {
+ self.typ
+ .format(&self.fields, s, |v| debug_span!("action", v))
+ } else {
+ self.typ
+ .format(&self.fields, s, |v| trace_span!("action", v))
+ }
+ };
+ if !s.trim().is_empty() {
+ span.pb_set_message(s);
+ let _e = span.enter();
+ let level: Level = self.verbosity.into();
+ if level == Level::ERROR {
+ error!(target: "nix", "{}", s)
+ } else if level == Level::WARN {
+ warn!(target: "nix", "{}", s)
+ } else if level == Level::INFO {
+ info!(target: "nix", "{}", s)
+ } else if level == Level::DEBUG {
+ debug!(target: "nix", "{}", s)
+ } else {
+ trace!(target: "nix", "{}", s)
+ }
+ } else {
+ span.pb_start();
+ }
+ mapping.insert(self.activity_id, span);
+ }
+ fn emit_result(&mut self, ty: u32) {
+ let mut mapping = NIX_SPAN_MAPPING.lock().expect("not poisoned");
+
+ let Some(parent) = mapping.get(&self.activity_id) else {
+ panic!("unexpected result for dead parent");
+ };
+
+ let _in_parent = parent.enter();
+ let res = ResultType::from_int(ty);
+
+ use FieldValue::*;
+ match (&res, self.fields.as_slice()) {
+ // ResultType::FileLinked => todo!(),
+ (ResultType::BuildLogLine, [Str(s)]) => {
+ info!("{s:?}");
+ }
+ // ResultType::UntrustedPath => todo!(),
+ // ResultType::CorruptedPath => todo!(),
+ // ResultType::SetPhase => todo!(),
+ (ResultType::SetExpected, [Int(act_ty), Int(_expected)]) => {
+ let _act_ty = ActivityType::from_int(*act_ty as u32);
+ }
+ (ResultType::SetPhase, [Str(phase)]) => {
+ // parent.pb_set_message(phase);
+ debug!(target: "nix::phase", phase)
+ }
+ (ResultType::Progress, [Int(done), Int(expected), Int(_), Int(_)]) => {
+ parent.pb_set_length(*expected as u64);
+ parent.pb_set_position(*done as u64);
+ }
+ _ => warn!("unknown progress report: {:?}({:?})", &res, &self.fields),
+ }
+ }
+}
+fn new_start_activity(activity_id: u64, lvl: u32, typ: u32) -> Box<StartActivityBuilder> {
+ Box::new(StartActivityBuilder {
+ activity_id,
+ verbosity: Verbosity::from_int(lvl),
+ typ: ActivityType::from_int(typ),
+ fields: vec![],
+ })
+}
+
+fn emit_warn(v: &str) {
+ warn!(target: "nix::eval", "{v}")
+}
+fn emit_stop(v: u64) {
+ let mut mapping = NIX_SPAN_MAPPING.lock().expect("not poisoned");
+ mapping.remove(&v);
+}
+fn emit_log(lvl: u32, v: &str) {
+ let verbosity = Verbosity::from_int(lvl);
+ let level: Level = verbosity.into();
+ if level == Level::ERROR {
+ error!(target: "nix", "{v}")
+ } else if level == Level::WARN {
+ warn!(target: "nix", "{v}")
+ } else if level == Level::INFO {
+ info!(target: "nix", "{v}")
+ } else if level == Level::DEBUG {
+ debug!(target: "nix", "{v}")
+ } else {
+ trace!(target: "nix", "{v}")
+ }
+}
+
+// fn start_activity(act: u64, lvl: u32, act_ty: u32, s: &str, parent: u32) {
+// tracing::Span::new(meta, values)
+// }
+
+#[cxx::bridge]
+pub mod nix_logging_cxx {
+ extern "Rust" {
+ type StartActivityBuilder;
+ fn new_start_activity(activity_id: u64, lvl: u32, typ: u32) -> Box<StartActivityBuilder>;
+ fn add_int_field(&mut self, i: i32);
+ fn add_string_field(&mut self, v: &str);
+ fn emit(&mut self, parent: u64, s: &str);
+ fn emit_result(&mut self, ty: u32);
+
+ fn emit_warn(v: &str);
+ fn emit_stop(id: u64);
+ fn emit_log(lvl: u32, v: &str);
+ }
+ unsafe extern "C++" {
+ include!("nix-eval/src/logging.hh");
+
+ fn apply_tracing_logger();
+ }
+}
crates/nix-eval/src/macros.rsdiffbeforeafterboth--- a/crates/nix-eval/src/macros.rs
+++ b/crates/nix-eval/src/macros.rs
@@ -1,171 +1,26 @@
-use serde::Serialize;
-
-use crate::{NixSession, Value};
-
-#[derive(Clone)]
-pub struct NixExprBuilder {
- pub(crate) out: String,
- used_fields: Vec<Value>,
-}
-pub trait AttrSetValue {
- fn to_builder(self) -> NixExprBuilder;
-}
-trait Primitive {}
-
-macro_rules! impl_primitive {
- ($($t:ty),+) => {
- $(
- impl Primitive for $t {}
- )+
- };
-}
-impl_primitive!(String, bool, &'static str);
-
-impl<T> AttrSetValue for T
-where
- // Limited by Primitive trait to avoid orphan rules violation with Vec<T: AttrSetValue>
- T: Serialize + Primitive,
-{
- fn to_builder(self) -> NixExprBuilder {
- let serialized = nixlike::serialize(self).expect("invalid value for apply");
- NixExprBuilder {
- out: serialized.trim_end().to_owned(),
- used_fields: Vec::new(),
- }
- }
-}
-impl AttrSetValue for Value {
- fn to_builder(self) -> NixExprBuilder {
- NixExprBuilder {
- out: format!("sess_field_{}", self.session_field_id()),
- used_fields: vec![self],
- }
- }
-}
-impl<T> AttrSetValue for Vec<T>
-where
- T: AttrSetValue,
-{
- fn to_builder(self) -> NixExprBuilder {
- let mut builder = NixExprBuilder::list();
- for v in self {
- builder.list_value(NixExprBuilder::attrset_value(v));
- }
- builder.list_end();
- builder
- }
-}
-
-impl NixExprBuilder {
- pub fn object() -> Self {
- NixExprBuilder {
- out: "{ ".to_owned(),
- used_fields: Vec::new(),
- }
- }
- pub fn list() -> Self {
- NixExprBuilder {
- out: "[".to_owned(),
- used_fields: Vec::new(),
- }
- }
- pub fn string(s: &str) -> Self {
- NixExprBuilder {
- out: nixlike::serialize(s)
- .expect("no problems with serializing_string")
- .trim_end()
- .to_owned(),
- used_fields: Vec::new(),
- }
- }
- pub fn attrset_value(v: impl AttrSetValue) -> Self {
- v.to_builder()
- }
- pub fn serialized(v: impl Serialize) -> Self {
- let serialized = nixlike::serialize(v).expect("invalid value for apply");
- Self {
- out: serialized.trim_end().to_owned(),
- used_fields: Vec::new(),
- }
- }
- pub fn value(f: Value) -> Self {
- Self {
- out: format!("sess_field_{}", f.session_field_id()),
- used_fields: vec![f],
- }
- }
- pub fn end_obj(&mut self) {
- self.out.push('}');
- }
- pub fn obj_key(&mut self, name: Self, value: Self) {
- self.out.push_str(r#""${"#);
- self.extend(name);
- self.out.push_str(r#"}" = "#);
- self.extend(value);
- self.out.push_str("; ");
- }
- pub fn list_value(&mut self, value: Self) {
- self.extend(value);
- self.out.push(' ');
- }
- pub fn list_end(&mut self) {
- self.out.push(']');
- }
-
- pub fn extend(&mut self, e: Self) {
- self.out.push_str(&e.out);
- self.used_fields.extend(e.used_fields);
- }
-
- #[allow(dead_code)]
- pub fn session(&self) -> NixSession {
- let mut session = None;
- for ele in &self.used_fields {
- if session.is_none() {
- session = Some(ele.session());
- continue;
- }
- let session = session.as_ref().expect("checked");
- let ele_sess = ele.session();
- assert!(
- NixSession::ptr_eq(session, &ele_sess),
- "can't mix fields from different session"
- );
- }
- session.expect("expr without fields used")
- }
- #[allow(dead_code)]
- pub fn index_attr(&mut self, s: &str) {
- let escaped = nixlike::serialize(s).expect("string");
- self.out.push('.');
- self.out.push_str(escaped.trim_end());
- }
-}
-
#[macro_export]
macro_rules! nix_expr_inner {
//(@munch_object FIXME: value should be arbitrary nix_expr_inner input... Time to write proc-macro?
(@obj($o:ident) $field:ident$(, $($tt:tt)*)?) => {{
- $o.obj_key(
- NixExprBuilder::string(stringify!($field)),
- NixExprBuilder::attrset_value($field),
+ $o.insert(
+ stringify!($field),
+ $crate::Value::from($field),
);
$(nix_expr_inner!(@obj($o) $($tt)*);)?
}};
(@obj($o:ident) $field:ident: $v:expr$(, $($tt:tt)*)?) => {{
- $o.obj_key(
- NixExprBuilder::string(stringify!($field)),
- NixExprBuilder::attrset_value($v),
+ $o.insert(
+ stringify!($field),
+ $crate::Value::from($v),
);
$(nix_expr_inner!(@obj($o) $($tt)*);)?
}};
(@obj($o:ident)) => {{}};
(Obj { $($tt:tt)* }) => {{
- use $crate::{macros::NixExprBuilder, nix_expr_inner};
- let mut out = NixExprBuilder::object();
+ use $crate::{nix_expr_inner};
+ let mut out = std::collections::hash_map::HashMap::new();
nix_expr_inner!(@obj(out) $($tt)*);
- out.end_obj();
- out
+ Value::new_attrs(out)?
}};
(@field($o:ident) . $var:ident $($tt:tt)*) => {{
$o.index_attr(stringify!($var));
@@ -185,10 +40,10 @@
};
(@field($o:ident)) => {};
($field:ident $($tt:tt)*) => {{
- use $crate::{macros::NixExprBuilder, nix_expr_inner};
+ use $crate::{nix_expr_inner};
// might be used if indexed
#[allow(unused_mut)]
- let mut out = NixExprBuilder::value($field.clone());
+ let mut out = $field.clone();
nix_expr_inner!(@field(out) $($tt)*);
out
}};
@@ -197,8 +52,7 @@
NixExprBuilder::string($v)
}};
({$v:expr}) => {{
- use $crate::macros::NixExprBuilder;
- NixExprBuilder::serialized(&$v)
+ $crate::Value::serialized(&$v)?
}}
}
#[macro_export]
@@ -212,40 +66,25 @@
#[macro_export]
macro_rules! nix_go {
- (@o($o:ident) . $var:ident $($tt:tt)*) => {{
- $o.push(Index::attr(stringify!($var)));
- nix_go!(@o($o) $($tt)*);
- }};
- (@o($o:ident) [{ $v:expr }] $($tt:tt)*) => {{
- $o.push(Index::attr(&$v));
- nix_go!(@o($o) $($tt)*);
+ (@o($o:expr) . $var:ident $($tt:tt)*) => {{
+ nix_go!(@o($o.get_field(stringify!($var))?) $($tt)*)
}};
- (@o($o:ident) [ $($var:tt)+ ] $($tt:tt)*) => {{
- $o.push(Index::Expr($crate::nix_expr_inner!($($var)+)));
- nix_go!(@o($o) $($tt)*);
+ (@o($o:expr) [ $v:expr ] $($tt:tt)*) => {{
+ nix_go!(@o($o.get_field($v)?) $($tt)*)
}};
- (@o($o:ident) ($($var:tt)*) $($tt:tt)*) => {
- $o.push(Index::ExprApply($crate::nix_expr_inner!($($var)+)));
- nix_go!(@o($o) $($tt)*);
- };
- (@o($o:ident) | $($var:tt)*) => {
- $o.push(Index::Pipe($crate::nix_expr_inner!($($var)+)));
- };
- (@o($o:ident) + $($var:tt)*) => {
- $o.push(Index::Merge($crate::nix_expr_inner!($($var)+)));
+ (@o($o:expr) ($($var:tt)*) $($tt:tt)*) => {
+ nix_go!(@o($o.call($crate::nix_expr_inner!($($var)+))?) $($tt)*)
};
- (@o($o:ident)) => {};
+ (@o($o:expr)) => {$o};
($field:ident $($tt:tt)+) => {{
- use $crate::{nix_go, Index};
- let field = $field.clone();
- let mut out = vec![];
- nix_go!(@o(out) $($tt)*);
- field.select(out).await?
+ use $crate::nix_go;
+ let out = $field.clone();
+ nix_go!(@o(out) $($tt)*)
}}
}
#[macro_export]
macro_rules! nix_go_json {
($($tt:tt)*) => {{
- $crate::nix_go!($($tt)*).as_json().await?
+ $crate::nix_go!($($tt)*).as_json()?
}};
}
crates/nix-eval/src/pool.rsdiffbeforeafterboth--- a/crates/nix-eval/src/pool.rs
+++ /dev/null
@@ -1,76 +0,0 @@
-use std::{
- ffi::OsString,
- sync::{Arc, OnceLock},
-};
-
-use r2d2::Pool;
-
-use crate::{Error, NixSession, Result, session::NixSessionInner};
-
-pub struct NixSessionPool(Pool<NixSessionPoolInner>);
-impl NixSessionPool {
- pub async fn new(
- flake: OsString,
- nix_args: Vec<OsString>,
- nix_system: String,
- fail_fast: bool,
- ) -> Result<Self> {
- let inner = tokio::task::block_in_place(|| {
- r2d2::Builder::<NixSessionPoolInner>::new()
- .min_idle(Some(0))
- .build(NixSessionPoolInner {
- flake,
- nix_args,
- nix_system,
- fail_fast,
- })
- })?;
- Ok(Self(inner))
- }
- pub async fn get(&self) -> Result<NixSession> {
- let v = tokio::task::block_in_place(|| self.0.get())?;
- Ok(NixSession(Arc::new(tokio::sync::Mutex::new(v))))
- }
-}
-
-pub(crate) struct NixSessionPoolInner {
- flake: OsString,
- nix_args: Vec<OsString>,
- fail_fast: bool,
- pub(crate) nix_system: String,
-}
-
-impl r2d2::ManageConnection for NixSessionPoolInner {
- type Connection = NixSessionInner;
- type Error = Error;
- fn connect(&self) -> std::result::Result<Self::Connection, Self::Error> {
- let _v = TOKIO_RUNTIME
- .get()
- .expect("missed tokio runtime init!")
- .enter();
- futures::executor::block_on(NixSessionInner::new(
- self.flake.as_os_str(),
- self.nix_args.iter().map(OsString::as_os_str),
- self.nix_system.clone(),
- self.fail_fast,
- ))
- }
-
- fn is_valid(&self, conn: &mut Self::Connection) -> std::result::Result<(), Self::Error> {
- let _v = TOKIO_RUNTIME
- .get()
- .expect("missed tokio runtime init!")
- .enter();
- let res = futures::executor::block_on(conn.execute_expression_number("2 + 2"))?;
- if res != 4 {
- // just in case, should fail much earlier
- return Err(Error::SessionInit("misbehaving session"));
- };
- Ok(())
- }
-
- fn has_broken(&self, _conn: &mut Self::Connection) -> bool {
- false
- }
-}
-pub static TOKIO_RUNTIME: OnceLock<tokio::runtime::Handle> = OnceLock::new();
crates/nix-eval/src/session.rsdiffbeforeafterboth--- a/crates/nix-eval/src/session.rs
+++ /dev/null
@@ -1,450 +0,0 @@
-use std::{ffi::OsStr, num::ParseIntError, process::Stdio, sync::Arc};
-
-use better_command::{ClonableHandler, Handler, NixHandler, NoopHandler};
-use futures::StreamExt;
-use itertools::Itertools as _;
-use serde::{Deserialize, de::DeserializeOwned};
-use thiserror::Error;
-use tokio::{
- io::AsyncWriteExt,
- process::{ChildStderr, ChildStdin, ChildStdout, Command},
- select,
- sync::{Mutex, mpsc, oneshot},
-};
-use tokio_util::codec::{FramedRead, LinesCodec};
-use tracing::{Level, debug, error, warn};
-
-#[derive(Error, Debug, Clone)]
-pub enum Error {
- #[error("failed to create nix repl session: {0}")]
- SessionInit(&'static str),
- #[error("unexpected end of output, nix crashed?")]
- MissingDelimiter,
-
- #[error("expression did'nt produce any output")]
- ExpectedOutput,
- #[error("expression produced output, which is unexpected")]
- UnexpectedOutput,
-
- #[error("unexpected expression output type")]
- InvalidType,
-
- #[error("failed to build attr {attribute}:\n{error}")]
- BuildFailed { attribute: String, error: String },
-
- #[error("output: {0}")]
- Json(Arc<serde_json::Error>),
- // int outputs are too specific, and should not be used,
- // thus error is ok to be not informative.
- #[error("int output: {0}")]
- Int(ParseIntError),
- #[error("pool: {0}")]
- Pool(Arc<r2d2::Error>),
- #[error("io: {0}")]
- Io(Arc<std::io::Error>),
-
- // TODO: Should be done by wrapper/in different type.
- #[error("at {0}: {1}")]
- InContext(String, Box<Self>),
-
- #[error("error: {0}")]
- NixError(String),
-}
-impl From<r2d2::Error> for Error {
- fn from(value: r2d2::Error) -> Self {
- Self::Pool(Arc::new(value))
- }
-}
-impl From<std::io::Error> for Error {
- fn from(value: std::io::Error) -> Self {
- Self::Io(Arc::new(value))
- }
-}
-impl From<serde_json::Error> for Error {
- fn from(value: serde_json::Error) -> Self {
- Self::Json(Arc::new(value))
- }
-}
-impl Error {
- pub(crate) fn context(self, context: String) -> Self {
- Self::InContext(context, Box::new(self))
- }
-}
-pub type Result<T, E = Error> = std::result::Result<T, E>;
-
-enum OutputLine {
- Out(String),
- Err(String),
-}
-struct OutputHandler {
- rx: mpsc::Receiver<OutputLine>,
- _cancel_handle: oneshot::Receiver<()>,
-}
-impl OutputHandler {
- fn new(out: ChildStdout, err: ChildStderr) -> Self {
- let mut out = FramedRead::new(out, LinesCodec::new());
- let mut err = FramedRead::new(err, LinesCodec::new());
- let (tx, rx) = mpsc::channel(20);
- let (mut cancelled, _cancel_handle) = oneshot::channel();
- tokio::spawn(async move {
- loop {
- select! {
- // We should receive errors earlier than synchronization
- biased;
- e = err.next() => {
- let Some(Ok(e)) = e else {
- if e.is_some() {
- error!("bad repl stderr: {e:?}");
- }
- continue;
- };
- let _ = tx.send(OutputLine::Err(e)).await;
- }
- o = out.next() => {
- let Some(Ok(o)) = o else {
- if o.is_some() {
- error!("bad repl stdout: {o:?}");
- }
- continue;
- };
- let _ = tx.send(OutputLine::Out(o)).await;
- }
- // Reader doesn't care about stdout, as this is cancelled.
- // Error still might be useful, to process leftover span closures?
- _ = cancelled.closed() => {
- break;
- }
- }
- }
- });
- Self { rx, _cancel_handle }
- }
- async fn next(&mut self) -> Option<OutputLine> {
- self.rx.recv().await
- }
-}
-
-#[must_use]
-struct ErrorCollector<'i, H> {
- collected: Vec<String>,
- inner: &'i mut H,
-}
-impl<'i, H> ErrorCollector<'i, H> {
- fn new(inner: &'i mut H) -> Self {
- Self {
- collected: vec![],
- inner,
- }
- }
-}
-impl<H> ErrorCollector<'_, H> {
- fn handle_line_inner(&mut self, msg: &str) -> bool {
- let Some(msg) = msg.strip_prefix("@nix ") else {
- return false;
- };
- #[derive(Deserialize)]
- struct ErrorAction {
- action: String,
- level: u32,
- msg: String,
- }
- let Ok(act) = serde_json::from_str::<ErrorAction>(msg) else {
- return false;
- };
- if act.action != "msg" || act.level != 0 {
- return false;
- }
- self.collected.push(act.msg);
- true
- }
- fn finish(self) -> Result<()> {
- // fn dedent(s: String) -> String {
- // s.split('\n').filter(|s| !s.trim().is_empty()).map(|v| v.)
- // }
- if !self.collected.is_empty() {
- return Err(Error::NixError(
- self.collected
- .iter()
- .map(|v| {
- if let Some(f) = v.strip_prefix("\u{1b}[31;1merror:\u{1b}[0m ") {
- let v = unindent::unindent(f.trim_start());
- v.trim().to_owned()
- } else {
- v.to_owned()
- }
- })
- .join("\n")
- .to_string(),
- ));
- }
- Ok(())
- }
- fn flush(self) {
- for line in self.collected {
- warn!("{line}");
- }
- }
-}
-impl<H: Handler> Handler for ErrorCollector<'_, H> {
- fn handle_line(&mut self, e: &str) {
- if self.handle_line_inner(e) {
- return;
- }
- self.inner.handle_line(e)
- }
-}
-
-pub struct NixSessionInner {
- full_delimiter: String,
- nix_handler: ClonableHandler<NixHandler>,
- out: OutputHandler,
- stdin: ChildStdin,
- string_wrapping: (String, String),
- number_wrapping: (String, String),
-
- executing_command: Arc<Mutex<()>>,
-
- next_id: u32,
- pub(crate) free_list: Vec<u32>,
-
- pub nix_system: String,
-}
-
-/// Discover inter-message repl delimiter
-const REPL_DELIMITER: &str = "\"FLEET_MAGIC_REPL_DELIMITER\"";
-/// Discover formatting around strings
-const TRAIN_STRING: &str = "\"TRAIN_STRING\"";
-/// Discover formatting around numbers
-const TRAIN_NUMBER: &str = "13141516";
-// Other types of formatting are not discovered, because they are not used, JSON serialization is used instead
-// Techically, number training is also not required, because numbers can be converted to string too...
-// Eh, I'll remove it later.
-
-impl NixSessionInner {
- pub(crate) async fn new(
- flake: &OsStr,
- extra_args: impl IntoIterator<Item = &OsStr>,
- nix_system: String,
- fail_fast: bool,
- ) -> Result<Self> {
- let mut cmd = Command::new("nix");
- cmd.arg("repl")
- .args(["--option", "pure-eval", "true"])
- .arg(flake)
- .arg("--log-format")
- .arg("internal-json");
- if !fail_fast {
- cmd.arg("--keep-going");
- }
- for arg in extra_args {
- cmd.arg(arg);
- }
- cmd.stdin(Stdio::piped());
- cmd.stdout(Stdio::piped());
- cmd.stderr(Stdio::piped());
- let cmd = cmd.spawn()?;
- let stdout = cmd.stdout.unwrap();
- let stderr = cmd.stderr.unwrap();
- let mut out = OutputHandler::new(stdout, stderr);
- let mut stdin = cmd.stdin.unwrap();
- // Standard repl hello doesn't work with internal-json logger
- stdin.write_all(REPL_DELIMITER.as_bytes()).await?;
- stdin.write_all(b"\n").await?;
- stdin.flush().await?;
- let nix_handler = NixHandler::default();
- let mut full_delimiter = None;
- let mut errors = vec![];
- while let Some(line) = out.next().await {
- let line = match line {
- OutputLine::Out(o) => o,
- OutputLine::Err(_e) => {
- // Handle startup errors, but skip repl hello?
- errors.push(_e);
- continue;
- }
- };
- if line.contains(REPL_DELIMITER) {
- debug!("discovered repl delimiter with added colors: {line}");
- full_delimiter = Some(line.to_owned());
- break;
- }
- }
- let Some(full_delimiter) = full_delimiter else {
- for e in errors {
- error!("{e}");
- }
- return Err(Error::SessionInit("failed to discover delimiter"));
- };
- let mut res = Self {
- full_delimiter,
- nix_handler: ClonableHandler::new(nix_handler),
- out,
- stdin,
- string_wrapping: Default::default(),
- number_wrapping: Default::default(),
-
- executing_command: Arc::new(Mutex::new(())),
-
- next_id: 0,
- free_list: vec![],
-
- nix_system,
- };
- res.train().await?;
- Ok(res)
- }
- async fn train(&mut self) -> Result<()> {
- {
- let full_string = self
- .execute_expression_raw(TRAIN_STRING, &mut NoopHandler)
- .await?;
- let string_offset = full_string.find(TRAIN_STRING).expect("contained");
- let string_prefix = &full_string[..string_offset];
- let string_suffix = &full_string[string_offset + TRAIN_STRING.len()..];
- self.string_wrapping = (string_prefix.to_owned(), string_suffix.to_owned());
- }
- {
- let full_number = self
- .execute_expression_raw(TRAIN_NUMBER, &mut NoopHandler)
- .await?;
- let number_offset = full_number.find(TRAIN_NUMBER).expect("contained");
- let number_prefix = &full_number[..number_offset];
- let number_suffix = &full_number[number_offset + TRAIN_NUMBER.len()..];
- self.number_wrapping = (number_prefix.to_owned(), number_suffix.to_owned());
- }
- Ok(())
- }
- async fn send_command(&mut self, cmd: impl AsRef<[u8]>) -> Result<()> {
- if tracing::enabled!(Level::DEBUG) && cmd.as_ref() != REPL_DELIMITER.as_bytes() {
- let cmd_str = String::from_utf8_lossy(cmd.as_ref());
- tracing::debug!("{cmd_str}");
- };
- self.stdin.write_all(cmd.as_ref()).await?;
- self.stdin.write_all(b"\n").await?;
- Ok(())
- }
- async fn read_until_delimiter(&mut self, err_handler: &mut dyn Handler) -> Result<String> {
- let mut out = String::new();
- while let Some(line) = self.out.next().await {
- let line = match line {
- OutputLine::Out(out) => out,
- OutputLine::Err(err) => {
- err_handler.handle_line(&err);
- continue;
- }
- };
- if line == self.full_delimiter {
- return Ok(out);
- }
- if !out.is_empty() {
- out.push('\n');
- }
- out.push_str(&line);
- }
- Err(Error::MissingDelimiter)
- }
- pub(crate) async fn execute_expression_number(
- &mut self,
- expr: impl AsRef<[u8]>,
- ) -> Result<u64> {
- let num = self.number_wrapping.clone();
- let n = self.execute_expression_wrapping(expr, &num).await?;
- n.parse::<u64>().map_err(Error::Int)
- }
- async fn execute_expression_string(&mut self, expr: impl AsRef<[u8]>) -> Result<String> {
- // builtins.toJSON escapes some thing in incorrect way, e.g escaped "$" in "\${" is being outputed as "\$",
- // while this escape should be removed as it is intended for nix itself, not for json output.
- //
- // This regex only allows \$ in the beginning of the string, it is easier to implement correctly.
- // TODO: Add peg parser for nix-produced JSON?..
- let regex = regex::Regex::new(r#"(?<prefix>[: {,\[]\\")\\\$"#).expect("fixup json");
-
- let num = self.string_wrapping.clone();
- let n = self.execute_expression_wrapping(expr, &num).await?;
- let n = regex.replace_all(&n, "$prefix$$");
- let str: String = serde_json::from_str(&n)?;
- Ok(str)
- }
- pub(crate) async fn execute_expression_to_json<V: DeserializeOwned>(
- &mut self,
- expr: impl AsRef<[u8]>,
- ) -> Result<V> {
- let mut fexpr = b"builtins.toJSON (".to_vec();
- fexpr.extend_from_slice(expr.as_ref());
- fexpr.push(b')');
-
- Ok(serde_json::from_str(
- &self.execute_expression_string(fexpr).await?,
- )?)
- }
- async fn execute_expression_wrapping(
- &mut self,
- expr: impl AsRef<[u8]>,
- wrapping: &(String, String),
- ) -> Result<String> {
- let mut nix_handler = self.nix_handler.clone();
- let mut collected = ErrorCollector::new(&mut nix_handler);
- let res = self.execute_expression_raw(expr, &mut collected).await?;
- if res.is_empty() {
- collected.finish()?;
- return Err(Error::ExpectedOutput);
- } else {
- collected.flush()
- };
- let Some(res) = res.strip_prefix(&wrapping.0) else {
- return Err(Error::InvalidType);
- };
- let Some(res) = res.strip_suffix(&wrapping.1) else {
- return Err(Error::InvalidType);
- };
- Ok(res.to_owned())
- }
- async fn execute_expression_empty(&mut self, expr: impl AsRef<[u8]>) -> Result<()> {
- let mut nix_handler = self.nix_handler.clone();
- let mut collected = ErrorCollector::new(&mut nix_handler);
- let v = self.execute_expression_raw(expr, &mut collected).await?;
- collected.finish()?;
- if !v.is_empty() {
- return Err(Error::UnexpectedOutput);
- }
- Ok(())
- }
- pub(crate) async fn execute_expression_raw(
- &mut self,
- expr: impl AsRef<[u8]>,
- err_handler: &mut dyn Handler,
- ) -> Result<String> {
- // Prevent two commands from being executed in parallel, messing with each other.
- let _lock = self.executing_command.clone();
- let _guard = _lock.lock().await;
-
- self.send_command(expr).await?;
- // It will be echoed
- self.send_command(REPL_DELIMITER).await?;
- self.read_until_delimiter(err_handler).await
- }
- pub(crate) async fn execute_assign(&mut self, expr: impl AsRef<str>) -> Result<u32> {
- let id = self.allocate_id();
- self.execute_expression_empty(format!("sess_field_{id} = {}", expr.as_ref()))
- .await?;
- Ok(id)
- }
-
- /// Id should be immediately used
- fn allocate_id(&mut self) -> u32 {
- if let Some(free) = self.free_list.pop() {
- free
- } else {
- let v = self.next_id;
- self.next_id += 1;
- v
- }
- }
- // Nix has no way to deallocate variable, yet GC will correct everything not reachable.
- // async fn free_id(&mut self, id: u32) -> Result<()> {
- // self.execute_expression_empty(format!("sess_field_{id} = null"))
- // .await?;
- // self.free_list.push(id);
- // Ok(())
- // }
-}
crates/nix-eval/src/value.rsdiffbeforeafterboth--- a/crates/nix-eval/src/value.rs
+++ b/crates/nix-eval/src/value.rs
@@ -3,302 +3,4 @@
use better_command::NixHandler;
use serde::{Serialize, de::DeserializeOwned};
-use crate::{Error, NixBuildBatch, NixSession, Result, macros::NixExprBuilder, nix_go};
-
-#[derive(Clone)]
-pub enum Index {
- Var(String),
- String(String),
- #[allow(dead_code)]
- Apply(String),
- #[allow(dead_code)]
- Expr(NixExprBuilder),
- ExprApply(NixExprBuilder),
- Pipe(NixExprBuilder),
- Merge(NixExprBuilder),
-}
-impl Index {
- pub fn var(v: impl AsRef<str>) -> Self {
- let v = v.as_ref();
- assert!(
- !(v.contains('.') | v.contains(' ')),
- "bad variable name: {v}"
- );
- Self::Var(v.to_owned())
- }
- pub fn attr(v: impl AsRef<str>) -> Self {
- Self::String(v.as_ref().to_owned())
- }
- #[allow(dead_code)]
- pub fn apply(v: impl Serialize) -> Self {
- let serialized = nixlike::serialize(v).expect("invalid value for apply");
- Self::Apply(serialized.trim_end().to_owned())
- }
-}
-impl fmt::Display for Index {
- fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
- match self {
- Index::Var(v) => {
- write!(f, "{v}")
- }
- Index::String(k) => {
- let v = nixlike::format_identifier(k.as_str());
- write!(f, ".{v}")
- }
- Index::Apply(_) => {
- write!(f, "<apply>(...)")
- }
- Index::Expr(e) => {
- write!(f, "[{}]", e.out)
- }
- Index::ExprApply(_) => {
- write!(f, "<apply>(...)")
- }
- Index::Pipe(e) => {
- write!(f, "<map>({})", e.out)
- }
- Index::Merge(e) => {
- write!(f, "//({})", e.out)
- }
- }
- }
-}
-impl fmt::Debug for Index {
- fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
- write!(f, "{self}")
- }
-}
-struct PathDisplay<'i>(&'i [Index]);
-impl fmt::Display for PathDisplay<'_> {
- fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
- if !matches!(self.0.first(), Some(Index::Var(_))) {
- write!(f, "<unknown>")?;
- }
- for i in self.0 {
- write!(f, "{i}")?;
- }
- Ok(())
- }
-}
-struct ValueInner {
- full_path: Vec<Index>,
- session: NixSession,
- value: u32,
-}
-#[derive(Clone)]
-pub struct Value(Arc<ValueInner>);
-impl Value {
- async fn new(session: NixSession, query: &str) -> Result<Self> {
- let vid = session.0.lock().await.execute_assign(query).await?;
- Ok(Self(Arc::new(ValueInner {
- full_path: vec![],
- session,
- value: vid,
- })))
- }
- /// Get a top-level binding.
- ///
- /// In flake repl session, every output is exposed as top-level binding.
- pub async fn binding(session: NixSession, query: &str) -> Result<Self> {
- // TODO: Verify that query is a valid variable name
- let vid = session.0.lock().await.execute_assign(query).await?;
- Ok(Self(Arc::new(ValueInner {
- full_path: vec![Index::Var(query.to_owned())],
- session,
- value: vid,
- })))
- }
- pub async fn select(&self, name: impl IntoIterator<Item = Index>) -> Result<Self> {
- let mut used_fields = Vec::new();
- let name = name.into_iter();
-
- let mut full_path = self.0.full_path.clone();
- let mut query = self.sess_field_name();
- for v in name {
- full_path.push(v.clone());
- match v {
- Index::Var(_) => panic!("var item may only be first"),
- Index::String(s) => {
- let escaped =
- nixlike::serialize(s).expect("strings are always serialized successfully");
- query.push('.');
- query.push_str(escaped.trim());
- }
- Index::Apply(a) => {
- // In cases like `a {}.b` first `{}.b` will be evaluated, so `a {}` should be encased in `()`
- query = format!("({query} {a})");
- }
- Index::Expr(e) => {
- let index = Value::new(self.0.session.clone(), &e.out).await?;
- used_fields.push(index.clone());
- query.push('.');
- let index = format!("${{sess_field_{}}}", index.0.value);
- query.push_str(&index);
- }
- Index::ExprApply(e) => {
- let index = Value::new(self.0.session.clone(), &e.out).await?;
- used_fields.push(index.clone());
- query.push(' ');
- let index = format!("sess_field_{}", index.0.value);
- query.push_str(&index);
- query = format!("({query})");
- }
- Index::Pipe(v) => {
- let index = Value::new(self.0.session.clone(), &v.out).await?;
- used_fields.push(index.clone());
- let index = format!("sess_field_{}", index.0.value);
- query = format!("({index} {query})");
- }
- Index::Merge(v) => {
- let index = Value::new(self.0.session.clone(), &v.out).await?;
- used_fields.push(index.clone());
- let index = format!("sess_field_{}", index.0.value);
- query = format!("({query} // {index})");
- }
- }
- }
-
- let vid = self
- .0
- .session
- .0
- .lock()
- .await
- .execute_assign(&query)
- .await
- .map_err(|e| e.context(self.attribute()))?;
- Ok(Self(Arc::new(ValueInner {
- full_path,
- session: self.0.session.clone(),
- value: vid,
- })))
- }
- pub async fn as_json<V: DeserializeOwned>(&self) -> Result<V> {
- let query = self.sess_field_name();
- self.0
- .session
- .0
- .lock()
- .await
- .execute_expression_to_json(&query)
- .await
- .map_err(|e| e.context(self.attribute()))
- }
- #[allow(dead_code)]
- pub async fn has_field(&self, name: &str) -> Result<bool> {
- let key = nixlike::escape_string(name);
- let query = format!("{} ? {key}", self.sess_field_name());
- self.0
- .session
- .0
- .lock()
- .await
- .execute_expression_to_json(&query)
- .await
- .map_err(|e| e.context(self.attribute()))
- }
- pub async fn list_fields(&self) -> Result<Vec<String>> {
- let query = format!("builtins.attrNames {}", self.sess_field_name());
- self.0
- .session
- .0
- .lock()
- .await
- .execute_expression_to_json(&query)
- .await
- .map_err(|e| e.context(self.attribute()))
- }
- pub async fn type_of(&self) -> Result<String> {
- let query = format!("builtins.typeOf {}", self.sess_field_name());
- self.0
- .session
- .0
- .lock()
- .await
- .execute_expression_to_json(&query)
- .await
- .map_err(|e| e.context(self.attribute()))
- }
- #[allow(dead_code)]
- pub async fn import(&self) -> Result<Self> {
- let import = Self::new(self.0.session.clone(), "import").await?;
- Ok(nix_go!(self | import))
- }
- fn sess_field_name(&self) -> String {
- format!("sess_field_{}", self.0.value)
- }
- pub async fn build_maybe_batch(
- &self,
- batch: Option<NixBuildBatch>,
- ) -> Result<HashMap<String, PathBuf>> {
- if let Some(batch) = batch {
- batch.submit(self.clone()).await
- } else {
- self.build().await
- }
- }
- pub async fn build(&self) -> Result<HashMap<String, PathBuf>> {
- let query = format!(":b {}", self.sess_field_name());
- let vid = self
- .0
- .session
- .0
- .lock()
- .await
- .execute_expression_raw(&query, &mut NixHandler::default())
- .await?;
- if vid.is_empty() {
- return Err(Error::BuildFailed {
- attribute: self.attribute(),
- error: "build produced no output".to_owned(),
- });
- }
- let Some(vid) = vid.strip_prefix("This derivation produced the following outputs:\n")
- else {
- return Err(Error::BuildFailed {
- attribute: self.attribute(),
- error: format!("failed to parse output: {vid}"),
- });
- };
- let outputs = vid
- .split('\n')
- .filter(|v| !v.is_empty())
- .map(|v| v.split_once(" -> ").expect("unexpected build output"))
- .map(|(a, b)| (a.trim_start().to_owned(), PathBuf::from(b)))
- .collect();
- Ok(outputs)
- }
- /// Weakly convert string-like types (derivation/path/string) to string
- pub async fn to_string_weak(&self) -> Result<String> {
- let query = format!("\"${{{}}}\"", self.sess_field_name());
- let vid: String = self
- .0
- .session
- .0
- .lock()
- .await
- .execute_expression_to_json(&query)
- .await?;
- Ok(vid)
- }
-
- fn attribute(&self) -> String {
- PathDisplay(&self.0.full_path).to_string()
- }
-
- pub(crate) fn session(&self) -> NixSession {
- self.0.session.clone()
- }
-
- pub(crate) fn session_field_id(&self) -> u32 {
- self.0.value
- }
-}
-impl Drop for ValueInner {
- fn drop(&mut self) {
- if let Ok(mut lock) = self.session.0.try_lock() {
- lock.free_list.push(self.value)
- }
- // Leaked
- }
-}
+use crate::{Result, Value, nix_go};
crates/nixlike/Cargo.tomldiffbeforeafterboth--- a/crates/nixlike/Cargo.toml
+++ b/crates/nixlike/Cargo.toml
@@ -10,7 +10,7 @@
alejandra = { git = "https://github.com/kamadorueda/alejandra" }
linked-hash-map = "0.5.6"
peg = "0.8.5"
-ron = "0.10.1"
+ron = "0.11.0"
serde = "1.0.219"
serde-transcode = "1.1.1"
serde_json = "1.0.140"
crates/nixlike/src/lib.rsdiffbeforeafterboth--- a/crates/nixlike/src/lib.rs
+++ b/crates/nixlike/src/lib.rs
@@ -5,6 +5,7 @@
//! expressions and expect it to work, only basic primitives are supported, and there is no
//! variables/recursive records, interpolation, e.t.c.
+use alejandra::config::Indentation;
use linked_hash_map::LinkedHashMap;
use peg::str::LineCol;
use se_impl::MySerialize;
@@ -196,7 +197,13 @@
assert_eq!(serialize("Hello\nworld").unwrap(), "\"Hello\\nworld\"\n");
}
pub fn format_nix(value: &String) -> String {
- let (_, out) = alejandra::format::in_memory("".to_owned(), value.to_owned());
+ let (_, out) = alejandra::format::in_memory(
+ "".to_owned(),
+ value.to_owned(),
+ alejandra::config::Config {
+ indentation: Indentation::TwoSpaces,
+ },
+ );
out
}
crates/nixlike/src/to_string.rsdiffbeforeafterboth--- a/crates/nixlike/src/to_string.rs
+++ b/crates/nixlike/src/to_string.rs
@@ -1,3 +1,5 @@
+use alejandra::config::Indentation;
+
use crate::Value;
pub fn write_identifier(k: &str, out: &mut String) {
@@ -98,6 +100,12 @@
pub fn write_nix(value: &Value) -> String {
let mut out = String::new();
write_nix_buf(value, &mut out);
- let (_, out) = alejandra::format::in_memory("".to_owned(), out);
+ let (_, out) = alejandra::format::in_memory(
+ "".to_owned(),
+ out,
+ alejandra::config::Config {
+ indentation: Indentation::TwoSpaces,
+ },
+ );
out
}
flake.lockdiffbeforeafterboth--- a/flake.lock
+++ b/flake.lock
@@ -15,6 +15,22 @@
"type": "github"
}
},
+ "flake-compat": {
+ "flake": false,
+ "locked": {
+ "lastModified": 1696426674,
+ "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
+ "owner": "edolstra",
+ "repo": "flake-compat",
+ "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
+ "type": "github"
+ },
+ "original": {
+ "owner": "edolstra",
+ "repo": "flake-compat",
+ "type": "github"
+ }
+ },
"flake-parts": {
"inputs": {
"nixpkgs-lib": [
@@ -35,8 +51,117 @@
"type": "github"
}
},
+ "flake-parts_2": {
+ "inputs": {
+ "nixpkgs-lib": [
+ "nix",
+ "nixpkgs"
+ ]
+ },
+ "locked": {
+ "lastModified": 1748821116,
+ "narHash": "sha256-F82+gS044J1APL0n4hH50GYdPRv/5JWm34oCJYmVKdE=",
+ "rev": "49f0870db23e8c1ca0b5259734a02cd9e1e371a1",
+ "revCount": 377,
+ "type": "tarball",
+ "url": "https://api.flakehub.com/f/pinned/hercules-ci/flake-parts/0.1.377%2Brev-49f0870db23e8c1ca0b5259734a02cd9e1e371a1/01972f28-554a-73f8-91f4-d488cc502f08/source.tar.gz"
+ },
+ "original": {
+ "type": "tarball",
+ "url": "https://flakehub.com/f/hercules-ci/flake-parts/0.1"
+ }
+ },
+ "git-hooks-nix": {
+ "inputs": {
+ "flake-compat": "flake-compat",
+ "gitignore": [
+ "nix"
+ ],
+ "nixpkgs": [
+ "nix",
+ "nixpkgs"
+ ]
+ },
+ "locked": {
+ "lastModified": 1747372754,
+ "narHash": "sha256-2Y53NGIX2vxfie1rOW0Qb86vjRZ7ngizoo+bnXU9D9k=",
+ "rev": "80479b6ec16fefd9c1db3ea13aeb038c60530f46",
+ "revCount": 1026,
+ "type": "tarball",
+ "url": "https://api.flakehub.com/f/pinned/cachix/git-hooks.nix/0.1.1026%2Brev-80479b6ec16fefd9c1db3ea13aeb038c60530f46/0196d79a-1b35-7b8e-a021-c894fb62163d/source.tar.gz"
+ },
+ "original": {
+ "type": "tarball",
+ "url": "https://flakehub.com/f/cachix/git-hooks.nix/0.1.941"
+ }
+ },
+ "nix": {
+ "inputs": {
+ "flake-parts": "flake-parts_2",
+ "git-hooks-nix": "git-hooks-nix",
+ "nixpkgs": "nixpkgs",
+ "nixpkgs-23-11": "nixpkgs-23-11",
+ "nixpkgs-regression": "nixpkgs-regression"
+ },
+ "locked": {
+ "lastModified": 1756860322,
+ "narHash": "sha256-mT01CpWVdqSm79L270dSkjdYbdc37r+Hq9vk4GTp7Ao=",
+ "path": "/home/lach/build/nix-src",
+ "type": "path"
+ },
+ "original": {
+ "path": "/home/lach/build/nix-src",
+ "type": "path"
+ }
+ },
"nixpkgs": {
"locked": {
+ "lastModified": 1755922037,
+ "narHash": "sha256-wY1+2JPH0ZZC4BQefoZw/k+3+DowFyfOxv17CN/idKs=",
+ "rev": "b1b3291469652d5a2edb0becc4ef0246fff97a7c",
+ "revCount": 808723,
+ "type": "tarball",
+ "url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.2505.808723%2Brev-b1b3291469652d5a2edb0becc4ef0246fff97a7c/0198daf7-011a-7703-95d7-57146e794342/source.tar.gz"
+ },
+ "original": {
+ "type": "tarball",
+ "url": "https://flakehub.com/f/NixOS/nixpkgs/0.2505"
+ }
+ },
+ "nixpkgs-23-11": {
+ "locked": {
+ "lastModified": 1717159533,
+ "narHash": "sha256-oamiKNfr2MS6yH64rUn99mIZjc45nGJlj9eGth/3Xuw=",
+ "owner": "NixOS",
+ "repo": "nixpkgs",
+ "rev": "a62e6edd6d5e1fa0329b8653c801147986f8d446",
+ "type": "github"
+ },
+ "original": {
+ "owner": "NixOS",
+ "repo": "nixpkgs",
+ "rev": "a62e6edd6d5e1fa0329b8653c801147986f8d446",
+ "type": "github"
+ }
+ },
+ "nixpkgs-regression": {
+ "locked": {
+ "lastModified": 1643052045,
+ "narHash": "sha256-uGJ0VXIhWKGXxkeNnq4TvV3CIOkUJ3PAoLZ3HMzNVMw=",
+ "owner": "NixOS",
+ "repo": "nixpkgs",
+ "rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2",
+ "type": "github"
+ },
+ "original": {
+ "owner": "NixOS",
+ "repo": "nixpkgs",
+ "rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2",
+ "type": "github"
+ }
+ },
+ "nixpkgs_2": {
+ "locked": {
"lastModified": 1753320130,
"narHash": "sha256-KCuv6iYQ0XTVAEJvDLIsk99CJm7fuqIE0/KknyeYPtM=",
"owner": "nixos",
@@ -55,7 +180,8 @@
"inputs": {
"crane": "crane",
"flake-parts": "flake-parts",
- "nixpkgs": "nixpkgs",
+ "nix": "nix",
+ "nixpkgs": "nixpkgs_2",
"rust-overlay": "rust-overlay",
"shelly": "shelly",
"treefmt-nix": "treefmt-nix"
flake.nixdiffbeforeafterboth--- a/flake.nix
+++ b/flake.nix
@@ -17,6 +17,9 @@
url = "github:numtide/treefmt-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
+ # DeterminateSystem's nix fork is controversial, but I don't mind it,
+ # and it has lazy-trees support which is useful for fleet.
+ nix.url = "/home/lach/build/nix-src";
};
outputs =
inputs:
@@ -41,6 +44,11 @@
fleetModules.tf = ./modules/extras/tf.nix;
+ testObj = {
+ v = "Hello";
+ };
+ testString = "hello";
+
# To be used with https://github.com/NixOS/nix/pull/8892
schemas =
let
@@ -80,6 +88,7 @@
system,
pkgs,
self,
+ inputs',
...
}:
let
@@ -108,7 +117,7 @@
packages = lib.mkIf deployerSystem (
let
packages = pkgs.callPackages ./pkgs {
- inherit craneLib;
+ inherit craneLib inputs';
};
in
packages // { default = packages.fleet; }
@@ -120,6 +129,7 @@
nixpkgsCraneLib = inputs.crane.mkLib pkgs;
packages = pkgs.callPackages ./pkgs {
craneLib = nixpkgsCraneLib;
+ inherit inputs;
};
prefixAttrs =
prefix: attrs:
@@ -150,13 +160,16 @@
cargo-fuzz
cargo-watch
cargo-outdated
+ gdb
pkg-config
openssl
bacon
nil
rustPlatform.bindgenHook
- # nixVersions.nix_2_22
+ inputs'.nix.packages.nix-expr-c
+ inputs'.nix.packages.nix-flake-c
+ inputs'.nix.packages.nix-fetchers-c
];
environment.PROTOC = "${pkgs.protobuf}/bin/protoc";
};
lib/flakePart.nixdiffbeforeafterboth--- a/lib/flakePart.nix
+++ b/lib/flakePart.nix
@@ -65,7 +65,7 @@
normalEval = bootstrapNixpkgs.lib.evalModules {
modules = (import ../modules/module-list.nix) ++ [
module
- {
+ ({inputs', ...}: {
config = {
data = if isPath data then import data else data;
nixpkgs.buildUsing = mkOptionDefault bootstrapNixpkgs;
@@ -74,6 +74,7 @@
inherit
(import ../pkgs {
inherit (prev) callPackage;
+ inherit inputs';
craneLib = crane.mkLib prev;
})
fleet-install-secrets
@@ -82,7 +83,7 @@
})
];
};
- }
+ })
];
specialArgs = {
inherit inputs self;
modules/nixos/online.nixdiffbeforeafterboth--- a/modules/nixos/online.nix
+++ b/modules/nixos/online.nix
@@ -80,7 +80,8 @@
'';
supportsDryActivation = true;
};
- } // config.system.onlineActivationScripts;
+ }
+ // config.system.onlineActivationScripts;
config.systemd.services = mkIf config.networking.networkmanager.enable {
# If machine is managed by fleet, we should not restart NetworkManager during activation,
modules/secrets-data.nixdiffbeforeafterboth--- a/modules/secrets-data.nix
+++ b/modules/secrets-data.nix
@@ -105,7 +105,7 @@
description = "Age-compatible key";
};
};
- config = {};
+ config = { };
};
in
{
pkgs/default.nixdiffbeforeafterboth--- a/pkgs/default.nix
+++ b/pkgs/default.nix
@@ -1,9 +1,10 @@
{
callPackage,
craneLib,
+ inputs',
}:
{
- fleet = callPackage ./fleet.nix { inherit craneLib; };
+ fleet = callPackage ./fleet.nix { inherit craneLib inputs'; };
fleet-install-secrets = callPackage ./fleet-install-secrets.nix { inherit craneLib; };
fleet-generator-helper = callPackage ./fleet-generator-helper.nix { inherit craneLib; };
}
pkgs/fleet.nixdiffbeforeafterboth--- a/pkgs/fleet.nix
+++ b/pkgs/fleet.nix
@@ -1,16 +1,35 @@
{
+ lib,
craneLib,
installShellFiles,
+ inputs',
+ pkg-config,
+ rustPlatform,
}:
craneLib.buildPackage rec {
pname = "fleet";
-
- src = craneLib.cleanCargoSource (craneLib.path ../.);
+ src = lib.cleanSourceWith {
+ src = ../.;
+ filter =
+ path: type:
+ (lib.hasSuffix "\.cc" path)
+ || (lib.hasSuffix "\.hh" path)
+ || (craneLib.filterCargoSources path type);
+ };
strictDeps = true;
cargoExtraArgs = "--locked -p ${pname}";
- nativeBuildInputs = [ installShellFiles ];
+ buildInputs = [
+ inputs'.nix.packages.nix-expr-c
+ inputs'.nix.packages.nix-flake-c
+ inputs'.nix.packages.nix-fetchers-c
+ ];
+ nativeBuildInputs = [
+ installShellFiles
+ pkg-config
+ rustPlatform.bindgenHook
+ ];
postInstall = ''
for shell in bash fish zsh; do
treefmt.nixdiffbeforeafterboth--- a/treefmt.nix
+++ b/treefmt.nix
@@ -9,4 +9,5 @@
programs.shfmt.enable = true;
programs.rustfmt.enable = true;
programs.taplo.enable = true;
+ programs.clang-format.enable = true;
}