diff --git a/backend/.gitignore b/backend/.gitignore new file mode 100644 index 00000000..7447f89a --- /dev/null +++ b/backend/.gitignore @@ -0,0 +1 @@ +/bin \ No newline at end of file diff --git a/backend/core/database.go b/backend/core/database.go new file mode 100644 index 00000000..a50decab --- /dev/null +++ b/backend/core/database.go @@ -0,0 +1,19 @@ +package core + +import ( + "context" + "fmt" + "os" + + "github.com/jackc/pgx/v5" +) + +func connect() { + conn, err := pgx.Connect(context.Background(), os.Getenv("DATABASE_URL")) + if err != nil { + fmt.Fprintf(os.Stderr, "Unable to connect to database: %v\n", err) + os.Exit(1) + } + defer conn.Close(context.Background()) + +} diff --git a/backend/core/go.mod b/backend/core/go.mod new file mode 100644 index 00000000..93556cca --- /dev/null +++ b/backend/core/go.mod @@ -0,0 +1,10 @@ +module drop/core + +go 1.26.1 + +require ( + github.com/jackc/pgpassfile v1.0.0 // indirect + github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 // indirect + github.com/jackc/pgx/v5 v5.9.1 // indirect + golang.org/x/text v0.29.0 // indirect +) diff --git a/backend/core/go.sum b/backend/core/go.sum new file mode 100644 index 00000000..6f5c7cd4 --- /dev/null +++ b/backend/core/go.sum @@ -0,0 +1,15 @@ +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsIM= +github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg= +github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 h1:iCEnooe7UlwOQYpKFhBabPMi4aNAfoODPEFNiAnClxo= +github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761/go.mod h1:5TJZWKEWniPve33vlWYSoGYefn3gLQRzjfDlhSJ9ZKM= +github.com/jackc/pgx/v5 v5.9.1 h1:uwrxJXBnx76nyISkhr33kQLlUqjv7et7b9FjCen/tdc= +github.com/jackc/pgx/v5 v5.9.1/go.mod h1:mal1tBGAFfLHvZzaYh77YS/eC6IX9OWbRV1QIIM0Jn4= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +golang.org/x/text v0.29.0 h1:1neNs90w9YzJ9BocxfsQNHKuAT4pkghyXc4nhZ6sJvk= +golang.org/x/text v0.29.0/go.mod h1:7MhJOA9CD2qZyOKYazxdYMF85OwPdEr9jTtBpO7ydH4= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/backend/go.mod b/backend/go.mod new file mode 100644 index 00000000..00366967 --- /dev/null +++ b/backend/go.mod @@ -0,0 +1,5 @@ +module drop + +go 1.26.1 + +require github.com/gorilla/mux v1.8.1 diff --git a/backend/go.sum b/backend/go.sum new file mode 100644 index 00000000..5d28444c --- /dev/null +++ b/backend/go.sum @@ -0,0 +1,2 @@ +github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY= +github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ= \ No newline at end of file diff --git a/backend/go.work b/backend/go.work new file mode 100644 index 00000000..f1da3508 --- /dev/null +++ b/backend/go.work @@ -0,0 +1,3 @@ +go 1.26.1 + +use ./core diff --git a/backend/go.work.sum b/backend/go.work.sum new file mode 100644 index 00000000..c1225400 --- /dev/null +++ b/backend/go.work.sum @@ -0,0 +1,9 @@ +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/jackc/puddle/v2 v2.2.2/go.mod h1:vriiEXHvEE654aYKXXjOvZM39qJ0q+azkZFrfEOc3H4= +github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= +github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= +golang.org/x/mod v0.27.0/go.mod h1:rWI627Fq0DEoudcK+MBkNkCe0EetEaDSwJJkCcjpazc= +golang.org/x/sync v0.17.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= +golang.org/x/tools v0.36.0/go.mod h1:WBDiHKJK8YgLHlcQPYQzNCkUxUypCaa5ZegCVutKm+s= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/backend/main.go b/backend/main.go new file mode 100644 index 00000000..d5d0c856 --- /dev/null +++ b/backend/main.go @@ -0,0 +1,37 @@ +package main + +import ( + "fmt" + "log" + "net/http" + "strings" + + "github.com/gorilla/mux" +) + +func handler(res http.ResponseWriter, req *http.Request) { + fmt.Fprintf(res, "G'day there mate") +} +func routingMiddleware(h http.Handler) http.Handler { + return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + url := *r.URL + url.Path = strings.TrimSuffix(r.URL.Path, "/") + r.URL = &url + + h.ServeHTTP(w, r) + }) +} + +func main() { + r := mux.NewRouter().StrictSlash(true) + r.Use(routingMiddleware) + + r.HandleFunc("/api/v1", handler) + + srv := &http.Server{ + Addr: ":3433", + Handler: r, + } + log.Printf("starting drop server on :3433") + srv.ListenAndServe() +} diff --git a/cli/Cargo.lock b/cli/Cargo.lock index c7e11ca1..2f510fda 100644 --- a/cli/Cargo.lock +++ b/cli/Cargo.lock @@ -2,6 +2,21 @@ # It is not intended for manual editing. version = 4 +[[package]] +name = "addr2line" +version = "0.25.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b5d307320b3181d6d7954e663bd7c774a838b8220fe0593c86d9fb09f498b4b" +dependencies = [ + "gimli", +] + +[[package]] +name = "adler2" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" + [[package]] name = "android_system_properties" version = "0.1.5" @@ -105,10 +120,10 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "965c2d33e53cb6b267e148a4cb0760bc01f4904c1cd4bb4002a085bb016d1490" dependencies = [ - "proc-macro2", - "quote", - "syn", - "synstructure", + "proc-macro2 1.0.103", + "quote 1.0.43", + "syn 2.0.114", + "synstructure 0.13.2", ] [[package]] @@ -117,10 +132,10 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3109e49b1e4909e9db6515a30c633684d68cdeaa252f215214cb4fa1a5bfee2c" dependencies = [ - "proc-macro2", - "quote", - "syn", - "synstructure", + "proc-macro2 1.0.103", + "quote 1.0.43", + "syn 2.0.114", + "synstructure 0.13.2", ] [[package]] @@ -129,9 +144,9 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7b18050c2cd6fe86c3a76584ef5e0baf286d038cda203eb6223df2cc413565f7" dependencies = [ - "proc-macro2", - "quote", - "syn", + "proc-macro2 1.0.103", + "quote 1.0.43", + "syn 2.0.114", ] [[package]] @@ -140,9 +155,9 @@ version = "0.1.89" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9035ad2d096bed7955a320ee7e2230574d28fd3c3a0f186cbea1ff3c7eed5dbb" dependencies = [ - "proc-macro2", - "quote", - "syn", + "proc-macro2 1.0.103", + "quote 1.0.43", + "syn 2.0.114", ] [[package]] @@ -190,6 +205,21 @@ dependencies = [ "tokio", ] +[[package]] +name = "backtrace" +version = "0.3.76" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb531853791a215d7c62a30daf0dde835f381ab5de4589cfe7c649d2cbe92bd6" +dependencies = [ + "addr2line", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", + "windows-link", +] + [[package]] name = "base64" version = "0.22.1" @@ -295,9 +325,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2a0b5487afeab2deb2ff4e03a807ad1a03ac532ff5a2cee5d86884440c7f7671" dependencies = [ "heck", - "proc-macro2", - "quote", - "syn", + "proc-macro2 1.0.103", + "quote 1.0.43", + "syn 2.0.114", ] [[package]] @@ -534,9 +564,9 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ - "proc-macro2", - "quote", - "syn", + "proc-macro2 1.0.103", + "quote 1.0.43", + "syn 2.0.114", ] [[package]] @@ -577,7 +607,7 @@ dependencies = [ [[package]] name = "droplet-rs" -version = "0.14.1" +version = "0.16.3" dependencies = [ "anyhow", "async-trait", @@ -586,11 +616,14 @@ dependencies = [ "getrandom 0.3.4", "hex", "humansize", + "libarchive-drop", "rcgen", "ring", "serde", "serde_json", "sha2", + "speedometer", + "test-generator", "time", "tokio", "uuid", @@ -640,6 +673,28 @@ dependencies = [ "windows-sys 0.61.2", ] +[[package]] +name = "failure" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d32e9bd16cc02eae7db7ef620b392808b89f6a5e16bb3497d159c6b92a0f4f86" +dependencies = [ + "backtrace", + "failure_derive", +] + +[[package]] +name = "failure_derive" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa4da3c766cd7a0db8242e326e9e4e081edd567072893ed320008189715366a4" +dependencies = [ + "proc-macro2 1.0.103", + "quote 1.0.43", + "syn 1.0.109", + "synstructure 0.12.6", +] + [[package]] name = "fastrand" version = "2.3.0" @@ -737,9 +792,9 @@ version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ - "proc-macro2", - "quote", - "syn", + "proc-macro2 1.0.103", + "quote 1.0.43", + "syn 2.0.114", ] [[package]] @@ -809,6 +864,18 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "gimli" +version = "0.32.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e629b9b98ef3dd8afe6ca2bd0f89306cec16d43d907889945bc5d6687f2f13c7" + +[[package]] +name = "glob" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0cc23270f6e1808e30a928bdc84dea0b9b4136a8bc82338574f23baf47bbd280" + [[package]] name = "gloo-timers" version = "0.3.0" @@ -1193,9 +1260,9 @@ version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e0c84ee7f197eca9a86c6fd6cb771e55eb991632f15f2bc3ca6ec838929e6e78" dependencies = [ - "proc-macro2", - "quote", - "syn", + "proc-macro2 1.0.103", + "quote 1.0.43", + "syn 2.0.114", ] [[package]] @@ -1261,6 +1328,24 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" +[[package]] +name = "libarchive-drop" +version = "0.1.1" +dependencies = [ + "libarchive3-sys", + "libc", +] + +[[package]] +name = "libarchive3-sys" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3cd3beae8f59a4c7a806523269b5392037577c150446e88d684dfa6de6031ca7" +dependencies = [ + "libc", + "pkg-config", +] + [[package]] name = "libc" version = "0.2.178" @@ -1335,6 +1420,15 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" +[[package]] +name = "miniz_oxide" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" +dependencies = [ + "adler2", +] + [[package]] name = "mio" version = "1.1.1" @@ -1421,6 +1515,15 @@ dependencies = [ "objc2", ] +[[package]] +name = "object" +version = "0.37.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff76201f031d8863c38aa7f905eca4f53abbfa15f609db4277d44cd8938f33fe" +dependencies = [ + "memchr", +] + [[package]] name = "oid-registry" version = "0.7.1" @@ -1530,6 +1633,12 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" +[[package]] +name = "pkg-config" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" + [[package]] name = "portable-atomic" version = "1.11.1" @@ -1569,6 +1678,15 @@ dependencies = [ "zerocopy", ] +[[package]] +name = "proc-macro2" +version = "0.4.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759" +dependencies = [ + "unicode-xid 0.1.0", +] + [[package]] name = "proc-macro2" version = "1.0.103" @@ -1654,13 +1772,22 @@ dependencies = [ "windows-sys 0.60.2", ] +[[package]] +name = "quote" +version = "0.6.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ce23b6b870e8f94f81fb0a363d65d86675884b34a09043c81e5562f11c1f8e1" +dependencies = [ + "proc-macro2 0.4.30", +] + [[package]] name = "quote" version = "1.0.43" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc74d9a594b72ae6656596548f56f667211f8a97b3d4c3d467150794690dc40a" dependencies = [ - "proc-macro2", + "proc-macro2 1.0.103", ] [[package]] @@ -1887,6 +2014,12 @@ dependencies = [ "ordered-multimap", ] +[[package]] +name = "rustc-demangle" +version = "0.1.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b50b8869d9fc858ce7266cce0194bd74df58b9d0e3f6df3a9fc8eb470d95c09d" + [[package]] name = "rustc-hash" version = "2.1.1" @@ -2084,9 +2217,9 @@ version = "1.0.228" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" dependencies = [ - "proc-macro2", - "quote", - "syn", + "proc-macro2 1.0.103", + "quote 1.0.43", + "syn 2.0.114", ] [[package]] @@ -2180,6 +2313,15 @@ dependencies = [ "windows-sys 0.60.2", ] +[[package]] +name = "speedometer" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2789736092fa21b44baf8590acb4b360cb91f0f597bd6c1f1741ca9644c95c1e" +dependencies = [ + "failure", +] + [[package]] name = "stable_deref_trait" version = "1.2.1" @@ -2198,14 +2340,36 @@ version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" +[[package]] +name = "syn" +version = "0.15.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ca4b3b69a77cbe1ffc9e198781b7acb0c7365a883670e8f1c1bc66fba79a5c5" +dependencies = [ + "proc-macro2 0.4.30", + "quote 0.6.13", + "unicode-xid 0.1.0", +] + +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2 1.0.103", + "quote 1.0.43", + "unicode-ident", +] + [[package]] name = "syn" version = "2.0.114" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d4d107df263a3013ef9b1879b0df87d706ff80f65a86ea879bd9c31f9b307c2a" dependencies = [ - "proc-macro2", - "quote", + "proc-macro2 1.0.103", + "quote 1.0.43", "unicode-ident", ] @@ -2218,15 +2382,27 @@ dependencies = [ "futures-core", ] +[[package]] +name = "synstructure" +version = "0.12.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" +dependencies = [ + "proc-macro2 1.0.103", + "quote 1.0.43", + "syn 1.0.109", + "unicode-xid 0.2.6", +] + [[package]] name = "synstructure" version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" dependencies = [ - "proc-macro2", - "quote", - "syn", + "proc-macro2 1.0.103", + "quote 1.0.43", + "syn 2.0.114", ] [[package]] @@ -2263,6 +2439,18 @@ dependencies = [ "windows-sys 0.61.2", ] +[[package]] +name = "test-generator" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b23be2add79223226e1cb6446cb3e37506a5927089870687a0f1149bb7a073a" +dependencies = [ + "glob", + "proc-macro2 0.4.30", + "quote 0.6.13", + "syn 0.15.44", +] + [[package]] name = "thiserror" version = "1.0.69" @@ -2287,9 +2475,9 @@ version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ - "proc-macro2", - "quote", - "syn", + "proc-macro2 1.0.103", + "quote 1.0.43", + "syn 2.0.114", ] [[package]] @@ -2298,9 +2486,9 @@ version = "2.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3ff15c8ecd7de3849db632e14d18d2571fa09dfc5ed93479bc4485c7a517c913" dependencies = [ - "proc-macro2", - "quote", - "syn", + "proc-macro2 1.0.103", + "quote 1.0.43", + "syn 2.0.114", ] [[package]] @@ -2390,9 +2578,9 @@ version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "af407857209536a95c8e56f8231ef2c2e2aff839b22e07a1ffcbc617e9db9fa5" dependencies = [ - "proc-macro2", - "quote", - "syn", + "proc-macro2 1.0.103", + "quote 1.0.43", + "syn 2.0.114", ] [[package]] @@ -2507,6 +2695,18 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4ac048d71ede7ee76d585517add45da530660ef4390e49b098733c6e897f254" +[[package]] +name = "unicode-xid" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" + +[[package]] +name = "unicode-xid" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" + [[package]] name = "unit-prefix" version = "0.5.2" @@ -2627,7 +2827,7 @@ version = "0.2.106" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "48cb0d2638f8baedbc542ed444afc0644a29166f1595371af4fecf8ce1e7eeb3" dependencies = [ - "quote", + "quote 1.0.43", "wasm-bindgen-macro-support", ] @@ -2638,9 +2838,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cefb59d5cd5f92d9dcf80e4683949f15ca4b511f4ac0a6e14d4e1ac60c6ecd40" dependencies = [ "bumpalo", - "proc-macro2", - "quote", - "syn", + "proc-macro2 1.0.103", + "quote 1.0.43", + "syn 2.0.114", "wasm-bindgen-shared", ] @@ -2748,9 +2948,9 @@ version = "0.60.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf" dependencies = [ - "proc-macro2", - "quote", - "syn", + "proc-macro2 1.0.103", + "quote 1.0.43", + "syn 2.0.114", ] [[package]] @@ -2759,9 +2959,9 @@ version = "0.59.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358" dependencies = [ - "proc-macro2", - "quote", - "syn", + "proc-macro2 1.0.103", + "quote 1.0.43", + "syn 2.0.114", ] [[package]] @@ -3095,10 +3295,10 @@ version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b659052874eb698efe5b9e8cf382204678a0086ebf46982b79d6ca3182927e5d" dependencies = [ - "proc-macro2", - "quote", - "syn", - "synstructure", + "proc-macro2 1.0.103", + "quote 1.0.43", + "syn 2.0.114", + "synstructure 0.13.2", ] [[package]] @@ -3116,9 +3316,9 @@ version = "0.8.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d8a8d209fdf45cf5138cbb5a506f6b52522a25afccc534d1475dad8e31105c6a" dependencies = [ - "proc-macro2", - "quote", - "syn", + "proc-macro2 1.0.103", + "quote 1.0.43", + "syn 2.0.114", ] [[package]] @@ -3136,10 +3336,10 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" dependencies = [ - "proc-macro2", - "quote", - "syn", - "synstructure", + "proc-macro2 1.0.103", + "quote 1.0.43", + "syn 2.0.114", + "synstructure 0.13.2", ] [[package]] @@ -3176,9 +3376,9 @@ version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eadce39539ca5cb3985590102671f2567e659fca9666581ad3411d59207951f3" dependencies = [ - "proc-macro2", - "quote", - "syn", + "proc-macro2 1.0.103", + "quote 1.0.43", + "syn 2.0.114", ] [[package]] diff --git a/cli/Cargo.toml b/cli/Cargo.toml index e506a0d7..d97171f1 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -11,7 +11,7 @@ clap = { version = "4.5.54", features = ["derive"] } console = "0.16.2" dialoguer = "0.12.0" dirs = "6.0.0" -droplet-rs = { path = "../droplet-rs", version = "0.14" } +droplet-rs = { path = "../libraries/droplet" } fern = { version = "0.7.1", features = ["colored"] } futures = "0.3.31" indicatif = "0.18.3" diff --git a/cli/src/commands/upload/interface.rs b/cli/src/commands/upload/interface.rs index 2a16e552..dab98556 100644 --- a/cli/src/commands/upload/interface.rs +++ b/cli/src/commands/upload/interface.rs @@ -3,7 +3,7 @@ use std::path::Path; use crate::{ cli::UploadInfo, commands::connect::{config::Config, config_option::ConfigOption}, - manifest::{CompressionOption, DepotManifest, generate_v2_manifest}, + manifest::{ClosureFactory, CompressionOption, DepotManifest, generate_v2_manifest}, operator_builder::OperatorBuilder, }; use futures::AsyncWriteExt; @@ -12,13 +12,13 @@ use opendal::{FuturesAsyncWriter, Operator}; use tokio_util::compat::{Compat, FuturesAsyncWriteCompatExt}; pub async fn upload( - info: &UploadInfo, + upload_info: &UploadInfo, config: Config, name: &Option, ) -> anyhow::Result<()> { - let game_id = &info.game_id; - let path = &info.path; - let version_id = &info.version_id; + let game_id = upload_info.game_id.clone(); + let path = upload_info.path.clone(); + let version_id = upload_info.version_id.clone(); let operator = get_operator(config, name)?; @@ -27,28 +27,30 @@ pub async fn upload( info!("Uploading chunks"); let v2_manifest = generate_v2_manifest( - Path::new(path), - async |id: String| { - info!("Uploading chunk id {id}"); - let writer = operator - .writer(&format!("{game_id}/{version_id}/{id}")) - .await - .unwrap() - .into_futures_async_write() - .compat_write(); - writer - }, - |writer: Compat| async { - writer.into_inner().close().await.unwrap(); - }, + Path::new(&path), + ClosureFactory::new( + async move |id: String| { + info!("Uploading chunk id {id}"); + let writer = operator + .writer(&format!("{game_id}/{version_id}/{id}")) + .await + .unwrap() + .into_futures_async_write() + .compat_write(); + writer + }, + |writer: Compat| async { + writer.into_inner().close().await.unwrap(); + }, + ), ) .await?; info!("Finished uploading chunks"); existing_depot_manifest.append( - game_id.to_string(), - version_id.to_string(), + upload_info.game_id.to_string(), + upload_info.version_id.to_string(), CompressionOption::None, ); Ok(()) diff --git a/cli/src/main.rs b/cli/src/main.rs index 0a0be5c4..91cc05e7 100644 --- a/cli/src/main.rs +++ b/cli/src/main.rs @@ -1,3 +1,5 @@ +#![feature(async_fn_traits)] + use crate::commands::connect::config::manage_configuration; use crate::{ cli::{Cli, Commands}, diff --git a/cli/src/manifest.rs b/cli/src/manifest.rs index b84884c2..7ad8d42d 100644 --- a/cli/src/manifest.rs +++ b/cli/src/manifest.rs @@ -1,8 +1,7 @@ use std::{collections::HashMap, path::Path}; -use droplet_rs::manifest::{ - Manifest, generate_manifest_rusty, generate_manifest_rusty_v2, -}; +use async_trait::async_trait; +use droplet_rs::manifest::{Manifest, ManifestWriterFactory, generate_manifest_rusty}; use indicatif::{ProgressBar, ProgressStyle}; use log::info; use serde::{Deserialize, Serialize}; @@ -40,11 +39,60 @@ impl DepotManifest { } } -pub async fn generate_v2_manifest(dir: &Path, factory: F, closer: CloseF) -> anyhow::Result +pub struct ClosureFactory where - W: AsyncWrite + Unpin, - F: AsyncFn(String) -> W, - CloseF: AsyncFn(W) + Writer: AsyncWrite + Unpin, + Factory: AsyncFn(String) -> Writer, + Closer: AsyncFn(Writer), +{ + writer: Factory, + closer: Closer, +} + +#[async_trait] +impl< + W: AsyncWrite + Unpin + Send + Sync, + F: AsyncFn(String) -> W + Send + Sync + 'static, + C: AsyncFn(W) + Send + Sync, +> ManifestWriterFactory for ClosureFactory +where + for<'a> F::CallRefFuture<'a>: Send, + for<'b> C::CallRefFuture<'b>: Send, +{ + type Writer = W; + + async fn create(&self, id: String) -> anyhow::Result { + let func = &self.writer; + let output = func(id).await; + Ok(output) + } + async fn close(&self, writer: Self::Writer) -> anyhow::Result<()> { + let func = &self.closer; + func(writer).await; + Ok(()) + } +} + +impl< + W: AsyncWrite + Unpin + Send + Sync, + F: AsyncFn(String) -> W + Send + Sync + 'static, + C: AsyncFn(W) + Sync, +> ClosureFactory +where + for<'a> F::CallRefFuture<'a>: Send, + for<'b> C::CallRefFuture<'b>: Send, +{ + pub fn new(f: F, c: C) -> Self { + Self { + writer: f, + closer: c, + } + } +} + +pub async fn generate_v2_manifest(dir: &Path, factory: Factory) -> anyhow::Result +where + Factory: ManifestWriterFactory, { let progress_bar = ProgressBar::new(10_000).with_style( ProgressStyle::default_bar() @@ -52,15 +100,15 @@ where .unwrap(), ); - generate_manifest_rusty_v2( + generate_manifest_rusty( dir, |progress| { let progress_int = (progress * 100f32).round() as u64; progress_bar.set_position(progress_int); }, |log| progress_bar.suspend(|| info!("{}", log)), - factory, - closer + Some(&factory), + None, ) .await } diff --git a/desktop/.gitmodules b/desktop/.gitmodules deleted file mode 100644 index df4511d8..00000000 --- a/desktop/.gitmodules +++ /dev/null @@ -1,6 +0,0 @@ -[submodule "src-tauri/tailscale/libtailscale"] - path = src-tauri/tailscale/libtailscale - url = https://github.com/tailscale/libtailscale.git -[submodule "libs/drop-base"] - path = libs/drop-base - url = https://github.com/drop-oss/drop-base.git diff --git a/desktop/build.mjs b/desktop/build.mjs index 68d5a184..aeb341d1 100644 --- a/desktop/build.mjs +++ b/desktop/build.mjs @@ -21,13 +21,6 @@ async function spawn(exec, opts) { }); } -const expectedLibs = ["drop-base/package.json"]; - -for (const lib of expectedLibs) { - const path = `./libs/${lib}`; - if (!fs.existsSync(path)) throw `Missing "${expectedLibs}". Run "git submodule update --init --recursive"`; -} - const views = fs.readdirSync(".").filter((view) => { const expectedPath = `./${view}/package.json`; return fs.existsSync(expectedPath); diff --git a/desktop/main/components/LibrarySearch.vue b/desktop/main/components/LibrarySearch.vue index ba48f73d..38f927aa 100644 --- a/desktop/main/components/LibrarySearch.vue +++ b/desktop/main/components/LibrarySearch.vue @@ -36,7 +36,7 @@ as="div" v-for="(nav, navIndex) in filteredNavigation" :key="nav.id" - :class="['first:pt-0 last:pb-0', nav.tools ? 'mt-auto' : '']" + :class="['first:pt-0 last:pb-0', nav.tools && !filteredNavigation[navIndex - 1].tools ? 'mt-auto' : '']" v-slot="{ open }" :default-open="nav.deft" > diff --git a/desktop/main/tailwind.config.js b/desktop/main/tailwind.config.js index 92d4cf72..2e71f1d7 100644 --- a/desktop/main/tailwind.config.js +++ b/desktop/main/tailwind.config.js @@ -1,3 +1,7 @@ +const path = require('path'); + +const dropbase = path.join(__dirname, "../../libraries/base") + /** @type {import('tailwindcss').Config} */ export default { content: [ @@ -7,7 +11,7 @@ export default { "./plugins/**/*.{js,ts}", "./app.vue", "./error.vue", - "../libs/drop-base/**/*.{js,vue,ts}", + `${dropbase}/components/**/*.{js,vue,ts}`, ], theme: { extend: { diff --git a/desktop/src-tauri/Cargo.lock b/desktop/src-tauri/Cargo.lock index 07185eac..32d9f45a 100644 --- a/desktop/src-tauri/Cargo.lock +++ b/desktop/src-tauri/Cargo.lock @@ -2,15 +2,6 @@ # It is not intended for manual editing. version = 4 -[[package]] -name = "addr2line" -version = "0.25.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b5d307320b3181d6d7954e663bd7c774a838b8220fe0593c86d9fb09f498b4b" -dependencies = [ - "gimli", -] - [[package]] name = "adler2" version = "2.0.1" @@ -82,73 +73,6 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" -[[package]] -name = "asn1-rs" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5493c3bedbacf7fd7382c6346bbd66687d12bbaad3a89a2d2c303ee6cf20b048" -dependencies = [ - "asn1-rs-derive 0.5.1", - "asn1-rs-impl", - "displaydoc", - "nom", - "num-traits", - "rusticata-macros", - "thiserror 1.0.69", - "time", -] - -[[package]] -name = "asn1-rs" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56624a96882bb8c26d61312ae18cb45868e5a9992ea73c58e45c3101e56a1e60" -dependencies = [ - "asn1-rs-derive 0.6.0", - "asn1-rs-impl", - "displaydoc", - "nom", - "num-traits", - "rusticata-macros", - "thiserror 2.0.17", - "time", -] - -[[package]] -name = "asn1-rs-derive" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "965c2d33e53cb6b267e148a4cb0760bc01f4904c1cd4bb4002a085bb016d1490" -dependencies = [ - "proc-macro2 1.0.105", - "quote 1.0.43", - "syn 2.0.114", - "synstructure 0.13.2", -] - -[[package]] -name = "asn1-rs-derive" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3109e49b1e4909e9db6515a30c633684d68cdeaa252f215214cb4fa1a5bfee2c" -dependencies = [ - "proc-macro2 1.0.105", - "quote 1.0.43", - "syn 2.0.114", - "synstructure 0.13.2", -] - -[[package]] -name = "asn1-rs-impl" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b18050c2cd6fe86c3a76584ef5e0baf286d038cda203eb6223df2cc413565f7" -dependencies = [ - "proc-macro2 1.0.105", - "quote 1.0.43", - "syn 2.0.114", -] - [[package]] name = "async-broadcast" version = "0.7.2" @@ -266,8 +190,8 @@ version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11" dependencies = [ - "proc-macro2 1.0.105", - "quote 1.0.43", + "proc-macro2", + "quote", "syn 2.0.114", ] @@ -339,8 +263,8 @@ version = "0.1.89" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9035ad2d096bed7955a320ee7e2230574d28fd3c3a0f186cbea1ff3c7eed5dbb" dependencies = [ - "proc-macro2 1.0.105", - "quote 1.0.43", + "proc-macro2", + "quote", "syn 2.0.114", ] @@ -412,21 +336,6 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" -[[package]] -name = "backtrace" -version = "0.3.76" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb531853791a215d7c62a30daf0dde835f381ab5de4589cfe7c649d2cbe92bd6" -dependencies = [ - "addr2line", - "cfg-if", - "libc", - "miniz_oxide", - "object", - "rustc-demangle", - "windows-link 0.2.1", -] - [[package]] name = "base16ct" version = "0.2.0" @@ -488,8 +397,8 @@ version = "0.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "238b90427dfad9da4a9abd60f3ec1cdee6b80454bde49ed37f1781dd8e9dc7f9" dependencies = [ - "proc-macro2 1.0.105", - "quote 1.0.43", + "proc-macro2", + "quote", "syn 2.0.114", ] @@ -1071,8 +980,8 @@ dependencies = [ "itoa", "matches", "phf 0.10.1", - "proc-macro2 1.0.105", - "quote 1.0.43", + "proc-macro2", + "quote", "smallvec", "syn 1.0.109", ] @@ -1083,7 +992,7 @@ version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13b588ba4ac1a99f7f2964d24b3d896ddc6bf847ee3855dbd4366f058cfcd331" dependencies = [ - "quote 1.0.43", + "quote", "syn 2.0.114", ] @@ -1093,7 +1002,7 @@ version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a2785755761f3ddc1492979ce1e48d2c00d09311c39e4466429188f3dd6501" dependencies = [ - "quote 1.0.43", + "quote", "syn 2.0.114", ] @@ -1128,8 +1037,8 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ - "proc-macro2 1.0.105", - "quote 1.0.43", + "proc-macro2", + "quote", "syn 2.0.114", ] @@ -1151,8 +1060,8 @@ checksum = "1247195ecd7e3c85f83c8d2a366e4210d588e802133e1e355180a9870b517ea4" dependencies = [ "fnv", "ident_case", - "proc-macro2 1.0.105", - "quote 1.0.43", + "proc-macro2", + "quote", "strsim", "syn 2.0.114", ] @@ -1164,7 +1073,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d38308df82d1080de0afee5d069fa14b0326a88c14f15c5ccda35b4a6c414c81" dependencies = [ "darling_core", - "quote 1.0.43", + "quote", "syn 2.0.114", ] @@ -1233,34 +1142,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "der-parser" -version = "9.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cd0a5c643689626bec213c4d8bd4d96acc8ffdb4ad4bb6bc16abf27d5f4b553" -dependencies = [ - "asn1-rs 0.6.2", - "displaydoc", - "nom", - "num-bigint", - "num-traits", - "rusticata-macros", -] - -[[package]] -name = "der-parser" -version = "10.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07da5016415d5a3c4dd39b11ed26f915f52fc4e0dc197d87908bc916e51bc1a6" -dependencies = [ - "asn1-rs 0.7.1", - "displaydoc", - "nom", - "num-bigint", - "num-traits", - "rusticata-macros", -] - [[package]] name = "deranged" version = "0.4.0" @@ -1284,8 +1165,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6edb4b64a43d977b8e99788fe3a04d483834fba1215a7e02caa415b626497f7f" dependencies = [ "convert_case", - "proc-macro2 1.0.105", - "quote 1.0.43", + "proc-macro2", + "quote", "rustc_version", "syn 2.0.114", ] @@ -1305,11 +1186,11 @@ version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "799a97264921d8623a957f6c3b9011f3b5492f557bbb7a5a19b7fa6d06ba8dcb" dependencies = [ - "proc-macro2 1.0.105", - "quote 1.0.43", + "proc-macro2", + "quote", "rustc_version", "syn 2.0.114", - "unicode-xid 0.2.6", + "unicode-xid", ] [[package]] @@ -1413,8 +1294,8 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ - "proc-macro2 1.0.105", - "quote 1.0.43", + "proc-macro2", + "quote", "syn 2.0.114", ] @@ -1436,8 +1317,8 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fbbb781877580993a8707ec48672673ec7b81eeba04cfd2310bd28c08e47c8f" dependencies = [ - "proc-macro2 1.0.105", - "quote 1.0.43", + "proc-macro2", + "quote", "syn 2.0.114", ] @@ -1501,7 +1382,6 @@ dependencies = [ "deranged 0.4.0", "dirs 6.0.0", "download_manager", - "droplet-rs 0.7.3", "filetime", "futures-core", "futures-lite", @@ -1564,43 +1444,10 @@ dependencies = [ ] [[package]] -name = "droplet-rs" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "926e179267dfe9fd891d4141d65d71fba06b6b82cd6834916a6310794df7d739" +name = "droplet_types" +version = "0.1.0" dependencies = [ - "hex 0.4.3", - "rcgen", - "ring", - "time", - "time-macros", - "webpki", - "x509-parser 0.17.0", -] - -[[package]] -name = "droplet-rs" -version = "0.16.3" -dependencies = [ - "anyhow", - "async-trait", - "dyn-clone", - "futures", - "getrandom 0.3.4", - "hex 0.4.3", - "humansize", - "libarchive-drop", - "rcgen", - "ring", "serde", - "serde_json", - "sha2 0.10.9", - "speedometer", - "test-generator", - "time", - "tokio", - "uuid", - "x509-parser 0.17.0", ] [[package]] @@ -1760,8 +1607,8 @@ version = "0.7.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "67c78a4d8fdf9953a5c9d458f9efe940fd97a0cab0941c075a813ac594733827" dependencies = [ - "proc-macro2 1.0.105", - "quote 1.0.43", + "proc-macro2", + "quote", "syn 2.0.114", ] @@ -1828,28 +1675,6 @@ dependencies = [ "pin-project-lite", ] -[[package]] -name = "failure" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d32e9bd16cc02eae7db7ef620b392808b89f6a5e16bb3497d159c6b92a0f4f86" -dependencies = [ - "backtrace", - "failure_derive", -] - -[[package]] -name = "failure_derive" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa4da3c766cd7a0db8242e326e9e4e081edd567072893ed320008189715366a4" -dependencies = [ - "proc-macro2 1.0.105", - "quote 1.0.43", - "syn 1.0.109", - "synstructure 0.12.6", -] - [[package]] name = "fake-simd" version = "0.1.2" @@ -1956,8 +1781,8 @@ version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" dependencies = [ - "proc-macro2 1.0.105", - "quote 1.0.43", + "proc-macro2", + "quote", "syn 2.0.114", ] @@ -2059,8 +1884,8 @@ version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ - "proc-macro2 1.0.105", - "quote 1.0.43", + "proc-macro2", + "quote", "syn 2.0.114", ] @@ -2117,7 +1942,7 @@ dependencies = [ "ctr", "database", "download_manager", - "droplet-rs 0.16.3", + "droplet_types", "futures-util", "hex 0.4.3", "log", @@ -2304,12 +2129,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "gimli" -version = "0.32.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e629b9b98ef3dd8afe6ca2bd0f89306cec16d43d907889945bc5d6687f2f13c7" - [[package]] name = "gio" version = "0.18.4" @@ -2380,8 +2199,8 @@ dependencies = [ "heck 0.4.1", "proc-macro-crate 2.0.2", "proc-macro-error", - "proc-macro2 1.0.105", - "quote 1.0.43", + "proc-macro2", + "quote", "syn 2.0.114", ] @@ -2482,8 +2301,8 @@ checksum = "52ff3c5b21f14f0736fed6dcfc0bfb4225ebf5725f3c0209edeec181e4d73e9d" dependencies = [ "proc-macro-crate 1.3.1", "proc-macro-error", - "proc-macro2 1.0.105", - "quote 1.0.43", + "proc-macro2", + "quote", "syn 2.0.114", ] @@ -3285,24 +3104,6 @@ dependencies = [ "once_cell", ] -[[package]] -name = "libarchive-drop" -version = "0.1.1" -dependencies = [ - "libarchive3-sys", - "libc", -] - -[[package]] -name = "libarchive3-sys" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3cd3beae8f59a4c7a806523269b5392037577c150446e88d684dfa6de6031ca7" -dependencies = [ - "libc", - "pkg-config", -] - [[package]] name = "libc" version = "0.2.180" @@ -3468,8 +3269,8 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "88a9689d8d44bf9964484516275f5cd4c9b59457a6940c1d5d0ecbb94510a36b" dependencies = [ - "proc-macro2 1.0.105", - "quote 1.0.43", + "proc-macro2", + "quote", "syn 2.0.114", ] @@ -3543,8 +3344,8 @@ version = "5.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49e7bc1560b95a3c4a25d03de42fe76ca718ab92d1a22a55b9b4cf67b3ae635c" dependencies = [ - "proc-macro2 1.0.105", - "quote 1.0.43", + "proc-macro2", + "quote", "syn 2.0.114", ] @@ -3564,12 +3365,6 @@ dependencies = [ "unicase", ] -[[package]] -name = "minimal-lexical" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" - [[package]] name = "miniz_oxide" version = "0.8.9" @@ -3655,8 +3450,8 @@ name = "native_model_macro" version = "0.6.4" dependencies = [ "log", - "proc-macro2 1.0.105", - "quote 1.0.43", + "proc-macro2", + "quote", "syn 2.0.114", ] @@ -3727,16 +3522,6 @@ version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb" -[[package]] -name = "nom" -version = "7.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" -dependencies = [ - "memchr", - "minimal-lexical", -] - [[package]] name = "ntapi" version = "0.4.2" @@ -3859,8 +3644,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff32365de1b6743cb203b710788263c44a03de03802daf96092f2da4fe6ba4d7" dependencies = [ "proc-macro-crate 3.4.0", - "proc-macro2 1.0.105", - "quote 1.0.43", + "proc-macro2", + "quote", "syn 2.0.114", ] @@ -4115,33 +3900,6 @@ dependencies = [ "objc2-security", ] -[[package]] -name = "object" -version = "0.37.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff76201f031d8863c38aa7f905eca4f53abbfa15f609db4277d44cd8938f33fe" -dependencies = [ - "memchr", -] - -[[package]] -name = "oid-registry" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8d8034d9489cdaf79228eb9f6a3b8d7bb32ba00d6645ebd48eef4077ceb5bd9" -dependencies = [ - "asn1-rs 0.6.2", -] - -[[package]] -name = "oid-registry" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12f40cff3dde1b6087cc5d5f5d4d65712f34016a03ed60e9c08dcc392736b5b7" -dependencies = [ - "asn1-rs 0.7.1", -] - [[package]] name = "once_cell" version = "1.21.3" @@ -4193,8 +3951,8 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ - "proc-macro2 1.0.105", - "quote 1.0.43", + "proc-macro2", + "quote", "syn 2.0.114", ] @@ -4526,8 +4284,8 @@ dependencies = [ "phf_generator 0.10.0", "phf_shared 0.10.0", "proc-macro-hack", - "proc-macro2 1.0.105", - "quote 1.0.43", + "proc-macro2", + "quote", "syn 1.0.109", ] @@ -4539,8 +4297,8 @@ checksum = "f84ac04429c13a7ff43785d75ad27569f2951ce0ffd30a3321230db2fc727216" dependencies = [ "phf_generator 0.11.3", "phf_shared 0.11.3", - "proc-macro2 1.0.105", - "quote 1.0.43", + "proc-macro2", + "quote", "syn 2.0.114", ] @@ -4586,8 +4344,8 @@ version = "1.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e918e4ff8c4549eb882f14b3a4bc8c8bc93de829416eacf579f1207a8fbf861" dependencies = [ - "proc-macro2 1.0.105", - "quote 1.0.43", + "proc-macro2", + "quote", "syn 2.0.114", ] @@ -4767,8 +4525,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" dependencies = [ "proc-macro-error-attr", - "proc-macro2 1.0.105", - "quote 1.0.43", + "proc-macro2", + "quote", "syn 1.0.109", "version_check", ] @@ -4779,8 +4537,8 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" dependencies = [ - "proc-macro2 1.0.105", - "quote 1.0.43", + "proc-macro2", + "quote", "version_check", ] @@ -4790,15 +4548,6 @@ version = "0.5.20+deprecated" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" -[[package]] -name = "proc-macro2" -version = "0.4.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759" -dependencies = [ - "unicode-xid 0.1.0", -] - [[package]] name = "proc-macro2" version = "1.0.105" @@ -4893,22 +4642,13 @@ dependencies = [ "windows-sys 0.60.2", ] -[[package]] -name = "quote" -version = "0.6.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ce23b6b870e8f94f81fb0a363d65d86675884b34a09043c81e5562f11c1f8e1" -dependencies = [ - "proc-macro2 0.4.30", -] - [[package]] name = "quote" version = "1.0.43" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc74d9a594b72ae6656596548f56f667211f8a97b3d4c3d467150794690dc40a" dependencies = [ - "proc-macro2 1.0.105", + "proc-macro2", ] [[package]] @@ -5053,20 +4793,6 @@ dependencies = [ "crossbeam-utils", ] -[[package]] -name = "rcgen" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75e669e5202259b5314d1ea5397316ad400819437857b90861765f24c4cf80a2" -dependencies = [ - "pem", - "ring", - "rustls-pki-types", - "time", - "x509-parser 0.16.0", - "yasna", -] - [[package]] name = "redox_syscall" version = "0.2.16" @@ -5131,8 +4857,8 @@ version = "1.0.25" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b7186006dcb21920990093f30e3dea63b7d6e977bf1256be20c3563a5db070da" dependencies = [ - "proc-macro2 1.0.105", - "quote 1.0.43", + "proc-macro2", + "quote", "syn 2.0.114", ] @@ -5187,7 +4913,6 @@ dependencies = [ "chrono", "client", "database", - "droplet-rs 0.7.3", "gethostname", "hex 0.4.3", "http 1.4.0", @@ -5482,12 +5207,6 @@ dependencies = [ "thiserror 1.0.69", ] -[[package]] -name = "rustc-demangle" -version = "0.1.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b50b8869d9fc858ce7266cce0194bd74df58b9d0e3f6df3a9fc8eb470d95c09d" - [[package]] name = "rustc-hash" version = "2.1.1" @@ -5503,15 +5222,6 @@ dependencies = [ "semver", ] -[[package]] -name = "rusticata-macros" -version = "4.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "faf0c4a6ece9950b9abdb62b1cfcf2a68b3b67a10ba445b3bb85be2a293d0632" -dependencies = [ - "nom", -] - [[package]] name = "rustix" version = "0.38.44" @@ -5660,8 +5370,8 @@ version = "0.8.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32e265784ad618884abaea0600a9adf15393368d840e0222d101a072f3f7534d" dependencies = [ - "proc-macro2 1.0.105", - "quote 1.0.43", + "proc-macro2", + "quote", "serde_derive_internals", "syn 2.0.114", ] @@ -5816,8 +5526,8 @@ version = "1.0.228" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" dependencies = [ - "proc-macro2 1.0.105", - "quote 1.0.43", + "proc-macro2", + "quote", "syn 2.0.114", ] @@ -5827,8 +5537,8 @@ version = "0.29.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" dependencies = [ - "proc-macro2 1.0.105", - "quote 1.0.43", + "proc-macro2", + "quote", "syn 2.0.114", ] @@ -5851,8 +5561,8 @@ version = "0.1.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "175ee3e80ae9982737ca543e96133087cbd9a485eecc3bc4de9c1a37b47ea59c" dependencies = [ - "proc-macro2 1.0.105", - "quote 1.0.43", + "proc-macro2", + "quote", "syn 2.0.114", ] @@ -5912,8 +5622,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "52a8e3ca0ca629121f70ab50f95249e5a6f925cc0f6ffe8256c45b728875706c" dependencies = [ "darling", - "proc-macro2 1.0.105", - "quote 1.0.43", + "proc-macro2", + "quote", "syn 2.0.114", ] @@ -5947,8 +5657,8 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "772ee033c0916d670af7860b6e1ef7d658a4629a6d0b4c8c3e67f09b3765b75d" dependencies = [ - "proc-macro2 1.0.105", - "quote 1.0.43", + "proc-macro2", + "quote", "syn 2.0.114", ] @@ -6230,15 +5940,6 @@ dependencies = [ "system-deps", ] -[[package]] -name = "speedometer" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2789736092fa21b44baf8590acb4b360cb91f0f597bd6c1f1741ca9644c95c1e" -dependencies = [ - "failure", -] - [[package]] name = "spin" version = "0.9.8" @@ -6320,8 +6021,8 @@ checksum = "c711928715f1fe0fe509c53b43e993a9a557babc2d0a3567d0a3006f1ac931a0" dependencies = [ "phf_generator 0.11.3", "phf_shared 0.11.3", - "proc-macro2 1.0.105", - "quote 1.0.43", + "proc-macro2", + "quote", ] [[package]] @@ -6347,25 +6048,14 @@ dependencies = [ "serde_json", ] -[[package]] -name = "syn" -version = "0.15.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ca4b3b69a77cbe1ffc9e198781b7acb0c7365a883670e8f1c1bc66fba79a5c5" -dependencies = [ - "proc-macro2 0.4.30", - "quote 0.6.13", - "unicode-xid 0.1.0", -] - [[package]] name = "syn" version = "1.0.109" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" dependencies = [ - "proc-macro2 1.0.105", - "quote 1.0.43", + "proc-macro2", + "quote", "unicode-ident", ] @@ -6375,8 +6065,8 @@ version = "2.0.114" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d4d107df263a3013ef9b1879b0df87d706ff80f65a86ea879bd9c31f9b307c2a" dependencies = [ - "proc-macro2 1.0.105", - "quote 1.0.43", + "proc-macro2", + "quote", "unicode-ident", ] @@ -6395,26 +6085,14 @@ dependencies = [ "futures-core", ] -[[package]] -name = "synstructure" -version = "0.12.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" -dependencies = [ - "proc-macro2 1.0.105", - "quote 1.0.43", - "syn 1.0.109", - "unicode-xid 0.2.6", -] - [[package]] name = "synstructure" version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" dependencies = [ - "proc-macro2 1.0.105", - "quote 1.0.43", + "proc-macro2", + "quote", "syn 2.0.114", ] @@ -6556,8 +6234,8 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f4e16beb8b2ac17db28eab8bca40e62dbfbb34c0fcdc6d9826b11b7b5d047dfd" dependencies = [ - "proc-macro2 1.0.105", - "quote 1.0.43", + "proc-macro2", + "quote", "syn 2.0.114", ] @@ -6673,8 +6351,8 @@ dependencies = [ "json-patch", "plist", "png", - "proc-macro2 1.0.105", - "quote 1.0.43", + "proc-macro2", + "quote", "semver", "serde", "serde_json", @@ -6695,8 +6373,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3764a12f886d8245e66b7ee9b43ccc47883399be2019a61d80cf0f4117446fde" dependencies = [ "heck 0.5.0", - "proc-macro2 1.0.105", - "quote 1.0.43", + "proc-macro2", + "quote", "syn 2.0.114", "tauri-codegen", "tauri-utils", @@ -6943,8 +6621,8 @@ dependencies = [ "log", "memchr", "phf 0.11.3", - "proc-macro2 1.0.105", - "quote 1.0.43", + "proc-macro2", + "quote", "regex", "schemars 0.8.22", "semver", @@ -6996,18 +6674,6 @@ dependencies = [ "utf-8", ] -[[package]] -name = "test-generator" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b23be2add79223226e1cb6446cb3e37506a5927089870687a0f1149bb7a073a" -dependencies = [ - "glob", - "proc-macro2 0.4.30", - "quote 0.6.13", - "syn 0.15.44", -] - [[package]] name = "thiserror" version = "1.0.69" @@ -7032,8 +6698,8 @@ version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ - "proc-macro2 1.0.105", - "quote 1.0.43", + "proc-macro2", + "quote", "syn 2.0.114", ] @@ -7043,8 +6709,8 @@ version = "2.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3ff15c8ecd7de3849db632e14d18d2571fa09dfc5ed93479bc4485c7a517c913" dependencies = [ - "proc-macro2 1.0.105", - "quote 1.0.43", + "proc-macro2", + "quote", "syn 2.0.114", ] @@ -7065,8 +6731,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "482c185e5675626c9a130b3a8f362c322a239338c882f745a1d9a85838b987f0" dependencies = [ "parking_lot 0.11.2", - "proc-macro2 1.0.105", - "quote 1.0.43", + "proc-macro2", + "quote", "syn 1.0.109", ] @@ -7157,8 +6823,8 @@ version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "af407857209536a95c8e56f8231ef2c2e2aff839b22e07a1ffcbc617e9db9fa5" dependencies = [ - "proc-macro2 1.0.105", - "quote 1.0.43", + "proc-macro2", + "quote", "syn 2.0.114", ] @@ -7354,8 +7020,8 @@ version = "0.1.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da" dependencies = [ - "proc-macro2 1.0.105", - "quote 1.0.43", + "proc-macro2", + "quote", "syn 2.0.114", ] @@ -7522,12 +7188,6 @@ version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" -[[package]] -name = "unicode-xid" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" - [[package]] name = "unicode-xid" version = "0.2.6" @@ -7626,8 +7286,8 @@ version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39d11901c36b3650df7acb0f9ebe624f35b5ac4e1922ecd3c57f444648429594" dependencies = [ - "proc-macro2 1.0.105", - "quote 1.0.43", + "proc-macro2", + "quote", "syn 2.0.114", ] @@ -7753,7 +7413,7 @@ version = "0.2.106" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "48cb0d2638f8baedbc542ed444afc0644a29166f1595371af4fecf8ce1e7eeb3" dependencies = [ - "quote 1.0.43", + "quote", "wasm-bindgen-macro-support", ] @@ -7764,8 +7424,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cefb59d5cd5f92d9dcf80e4683949f15ca4b511f4ac0a6e14d4e1ac60c6ecd40" dependencies = [ "bumpalo", - "proc-macro2 1.0.105", - "quote 1.0.43", + "proc-macro2", + "quote", "syn 2.0.114", "wasm-bindgen-shared", ] @@ -7872,16 +7532,6 @@ dependencies = [ "system-deps", ] -[[package]] -name = "webpki" -version = "0.22.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed63aea5ce73d0ff405984102c42de94fc55a6b75765d621c65262469b3c9b53" -dependencies = [ - "ring", - "untrusted", -] - [[package]] name = "webpki-roots" version = "1.0.5" @@ -7911,8 +7561,8 @@ version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "67a921c1b6914c367b2b823cd4cde6f96beec77d30a939c8199bb377cf9b9b54" dependencies = [ - "proc-macro2 1.0.105", - "quote 1.0.43", + "proc-macro2", + "quote", "syn 2.0.114", ] @@ -8081,8 +7731,8 @@ version = "0.60.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf" dependencies = [ - "proc-macro2 1.0.105", - "quote 1.0.43", + "proc-macro2", + "quote", "syn 2.0.114", ] @@ -8092,8 +7742,8 @@ version = "0.59.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358" dependencies = [ - "proc-macro2 1.0.105", - "quote 1.0.43", + "proc-macro2", + "quote", "syn 2.0.114", ] @@ -8636,42 +8286,6 @@ dependencies = [ "pkg-config", ] -[[package]] -name = "x509-parser" -version = "0.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcbc162f30700d6f3f82a24bf7cc62ffe7caea42c0b2cba8bf7f3ae50cf51f69" -dependencies = [ - "asn1-rs 0.6.2", - "data-encoding", - "der-parser 9.0.0", - "lazy_static", - "nom", - "oid-registry 0.7.1", - "ring", - "rusticata-macros", - "thiserror 1.0.69", - "time", -] - -[[package]] -name = "x509-parser" -version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4569f339c0c402346d4a75a9e39cf8dad310e287eef1ff56d4c68e5067f53460" -dependencies = [ - "asn1-rs 0.7.1", - "data-encoding", - "der-parser 10.0.0", - "lazy_static", - "nom", - "oid-registry 0.8.1", - "ring", - "rusticata-macros", - "thiserror 2.0.17", - "time", -] - [[package]] name = "xattr" version = "1.6.1" @@ -8698,15 +8312,6 @@ version = "0.8.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fdd20c5420375476fbd4394763288da7eb0cc0b8c11deed431a91562af7335d3" -[[package]] -name = "yasna" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e17bb3549cc1321ae1296b9cdc2698e2b6cb1992adfa19a8c72e5b7a738f44cd" -dependencies = [ - "time", -] - [[package]] name = "yoke" version = "0.8.1" @@ -8724,10 +8329,10 @@ version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b659052874eb698efe5b9e8cf382204678a0086ebf46982b79d6ca3182927e5d" dependencies = [ - "proc-macro2 1.0.105", - "quote 1.0.43", + "proc-macro2", + "quote", "syn 2.0.114", - "synstructure 0.13.2", + "synstructure", ] [[package]] @@ -8804,8 +8409,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "267db9407081e90bbfa46d841d3cbc60f59c0351838c4bc65199ecd79ab1983e" dependencies = [ "proc-macro-crate 3.4.0", - "proc-macro2 1.0.105", - "quote 1.0.43", + "proc-macro2", + "quote", "syn 2.0.114", "zvariant_utils 2.1.0", ] @@ -8817,8 +8422,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aad23e2d2f91cae771c7af7a630a49e755f1eb74f8a46e9f6d5f7a146edf5a37" dependencies = [ "proc-macro-crate 3.4.0", - "proc-macro2 1.0.105", - "quote 1.0.43", + "proc-macro2", + "quote", "syn 2.0.114", "zbus_names 4.3.1", "zvariant 5.9.1", @@ -8862,8 +8467,8 @@ version = "0.8.33" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2c7962b26b0a8685668b671ee4b54d007a67d4eaf05fda79ac0ecf41e32270f1" dependencies = [ - "proc-macro2 1.0.105", - "quote 1.0.43", + "proc-macro2", + "quote", "syn 2.0.114", ] @@ -8882,10 +8487,10 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" dependencies = [ - "proc-macro2 1.0.105", - "quote 1.0.43", + "proc-macro2", + "quote", "syn 2.0.114", - "synstructure 0.13.2", + "synstructure", ] [[package]] @@ -8903,8 +8508,8 @@ version = "1.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "85a5b4158499876c763cb03bc4e49185d3cccbabb15b33c627f7884f43db852e" dependencies = [ - "proc-macro2 1.0.105", - "quote 1.0.43", + "proc-macro2", + "quote", "syn 2.0.114", ] @@ -8936,8 +8541,8 @@ version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eadce39539ca5cb3985590102671f2567e659fca9666581ad3411d59207951f3" dependencies = [ - "proc-macro2 1.0.105", - "quote 1.0.43", + "proc-macro2", + "quote", "syn 2.0.114", ] @@ -9009,8 +8614,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "73e2ba546bda683a90652bac4a279bc146adad1386f25379cf73200d2002c449" dependencies = [ "proc-macro-crate 3.4.0", - "proc-macro2 1.0.105", - "quote 1.0.43", + "proc-macro2", + "quote", "syn 2.0.114", "zvariant_utils 2.1.0", ] @@ -9022,8 +8627,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ba44e1f8f4da9e6e2d25d2a60b116ef8b9d0be174a7685e55bb12a99866279a7" dependencies = [ "proc-macro-crate 3.4.0", - "proc-macro2 1.0.105", - "quote 1.0.43", + "proc-macro2", + "quote", "syn 2.0.114", "zvariant_utils 3.3.0", ] @@ -9034,8 +8639,8 @@ version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c51bcff7cc3dbb5055396bcf774748c3dab426b4b8659046963523cee4808340" dependencies = [ - "proc-macro2 1.0.105", - "quote 1.0.43", + "proc-macro2", + "quote", "syn 2.0.114", ] @@ -9045,8 +8650,8 @@ version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f75c23a64ef8f40f13a6989991e643554d9bef1d682a281160cf0c1bc389c5e9" dependencies = [ - "proc-macro2 1.0.105", - "quote 1.0.43", + "proc-macro2", + "quote", "serde", "syn 2.0.114", "winnow 0.7.14", diff --git a/desktop/src-tauri/Cargo.toml b/desktop/src-tauri/Cargo.toml index b7840e2e..63dfd083 100644 --- a/desktop/src-tauri/Cargo.toml +++ b/desktop/src-tauri/Cargo.toml @@ -41,7 +41,6 @@ database = { path = "./database" } # database deranged = "=0.4.0" dirs = "6.0.0" download_manager = { path = "./download_manager", version = "0.1.0" } # download manager -droplet-rs = "0.7.3" filetime = "0.2.25" futures-core = "0.3.31" futures-lite = "2.6.0" diff --git a/desktop/src-tauri/download_manager/src/depot_manager.rs b/desktop/src-tauri/download_manager/src/depot_manager.rs index 6cfc8b70..8b2f2ff3 100644 --- a/desktop/src-tauri/download_manager/src/depot_manager.rs +++ b/desktop/src-tauri/download_manager/src/depot_manager.rs @@ -1,7 +1,9 @@ use std::{ collections::HashMap, + env, sync::RwLock, - time::{Duration, Instant}, usize, + time::{Duration, Instant}, + usize, }; use futures_util::StreamExt; @@ -34,7 +36,7 @@ struct Depot { manifest: Option, latest_speed: Option, // bytes per second current_downloads: SyncSemaphore, - enabled: bool + enabled: bool, } pub struct DepotManager { @@ -113,10 +115,16 @@ impl DepotManager { for depot in &mut new_depots { if let Err(sync_error) = self.sync_depot(depot).await { warn!("failed to sync depot {}: {:?}", depot.endpoint, sync_error); - depot.enabled = false; + if env::var("FORCE_ENABLE_DEPOTS") + .map(|v| !v.is_empty()) + .unwrap_or(false) + { + } else { + depot.enabled = false; + } } } - + let enabled = new_depots.iter().filter(|v| v.enabled).count(); if enabled == 0 { return Err(RemoteAccessError::NoDepots); diff --git a/desktop/src-tauri/games/Cargo.toml b/desktop/src-tauri/games/Cargo.toml index 703dd08c..4720a872 100644 --- a/desktop/src-tauri/games/Cargo.toml +++ b/desktop/src-tauri/games/Cargo.toml @@ -14,7 +14,7 @@ crossbeam-channel = "0.5.15" ctr = "0.9.2" database = { path = "../database", version = "0.1.0" } download_manager = { path = "../download_manager", version = "0.1.0" } -droplet-rs = { path = "../../../libraries/droplet" } +droplet_types = { path = "../../../libraries/droplet_types" } futures-util = "*" hex = "0.4.3" log = "0.4.28" diff --git a/desktop/src-tauri/games/src/downloads/download_agent.rs b/desktop/src-tauri/games/src/downloads/download_agent.rs index db34d96a..9718ca27 100644 --- a/desktop/src-tauri/games/src/downloads/download_agent.rs +++ b/desktop/src-tauri/games/src/downloads/download_agent.rs @@ -11,7 +11,7 @@ use download_manager::util::download_thread_control_flag::{ DownloadThreadControl, DownloadThreadControlFlag, }; use download_manager::util::progress_object::{ProgressHandle, ProgressObject, ProgressType}; -use droplet_rs::manifest::{ChunkData, Manifest}; +use droplet_types::{ChunkData, Manifest}; use futures_util::StreamExt; use futures_util::stream::FuturesUnordered; use log::{debug, error, info, warn}; diff --git a/desktop/src-tauri/games/src/downloads/download_logic.rs b/desktop/src-tauri/games/src/downloads/download_logic.rs index aa8ea4a3..4d9ab3ab 100644 --- a/desktop/src-tauri/games/src/downloads/download_logic.rs +++ b/desktop/src-tauri/games/src/downloads/download_logic.rs @@ -13,7 +13,7 @@ use download_manager::util::download_thread_control_flag::{ DownloadThreadControl, DownloadThreadControlFlag, }; use download_manager::util::progress_object::ProgressHandle; -use droplet_rs::manifest::ChunkData; +use droplet_types::ChunkData; use futures_util::StreamExt as _; use log::{debug, info}; use remote::auth::generate_authorization_header; diff --git a/desktop/src-tauri/remote/Cargo.toml b/desktop/src-tauri/remote/Cargo.toml index 2fb28fba..85d38e6f 100644 --- a/desktop/src-tauri/remote/Cargo.toml +++ b/desktop/src-tauri/remote/Cargo.toml @@ -10,7 +10,6 @@ bytes = "1.11.0" chrono = "0.4.42" client = { path = "../client", version = "0.1.0" } database = { path = "../database", version = "0.1.0" } -droplet-rs = "0.7.3" gethostname = "1.0.2" hex = "0.4.3" http = "1.3.1" diff --git a/desktop/src-tauri/tauri.conf.json b/desktop/src-tauri/tauri.conf.json index 4a0ee9e4..bb111300 100644 --- a/desktop/src-tauri/tauri.conf.json +++ b/desktop/src-tauri/tauri.conf.json @@ -27,7 +27,7 @@ }, "bundle": { "active": true, - "targets": ["nsis", "deb", "rpm", "dmg", "appimage"], + "targets": ["nsis", "deb", "rpm", "dmg"], "windows": { "nsis": { "installMode": "both" diff --git a/libraries/droplet/.gitignore b/libraries/droplet/.gitignore index 340991a0..aba9ad45 100644 --- a/libraries/droplet/.gitignore +++ b/libraries/droplet/.gitignore @@ -21,6 +21,7 @@ target/ /target perf.data +perf.data.old flamegraph.svg *.json diff --git a/libraries/droplet/.gitmodules b/libraries/droplet/.gitmodules deleted file mode 100644 index d471795d..00000000 --- a/libraries/droplet/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "libarchive-rust"] - path = libarchive-rust - url = https://github.com/Drop-OSS/libarchive-rust.git diff --git a/libraries/droplet/Cargo.lock b/libraries/droplet/Cargo.lock index 2a1665cf..9a38602f 100644 --- a/libraries/droplet/Cargo.lock +++ b/libraries/droplet/Cargo.lock @@ -19,9 +19,9 @@ checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" [[package]] name = "anyhow" -version = "1.0.100" +version = "1.0.102" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a23eb6b1614318a8071c9b2521f36b424b2c83db5eb3a0fead4a6c0809af6e61" +checksum = "7f202df86484c868dbad7eaa557ef785d5c66295e41b460ef922eca0723b842c" [[package]] name = "asn1-rs" @@ -51,7 +51,7 @@ dependencies = [ "nom", "num-traits", "rusticata-macros", - "thiserror 2.0.12", + "thiserror 2.0.18", "time", ] @@ -61,10 +61,10 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "965c2d33e53cb6b267e148a4cb0760bc01f4904c1cd4bb4002a085bb016d1490" dependencies = [ - "proc-macro2 1.0.94", - "quote 1.0.40", + "proc-macro2 1.0.106", + "quote 1.0.45", "syn 2.0.117", - "synstructure 0.13.1", + "synstructure 0.13.2", ] [[package]] @@ -73,10 +73,10 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3109e49b1e4909e9db6515a30c633684d68cdeaa252f215214cb4fa1a5bfee2c" dependencies = [ - "proc-macro2 1.0.94", - "quote 1.0.40", + "proc-macro2 1.0.106", + "quote 1.0.45", "syn 2.0.117", - "synstructure 0.13.1", + "synstructure 0.13.2", ] [[package]] @@ -85,8 +85,8 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7b18050c2cd6fe86c3a76584ef5e0baf286d038cda203eb6223df2cc413565f7" dependencies = [ - "proc-macro2 1.0.94", - "quote 1.0.40", + "proc-macro2 1.0.106", + "quote 1.0.45", "syn 2.0.117", ] @@ -96,16 +96,16 @@ version = "0.1.89" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9035ad2d096bed7955a320ee7e2230574d28fd3c3a0f186cbea1ff3c7eed5dbb" dependencies = [ - "proc-macro2 1.0.94", - "quote 1.0.40", + "proc-macro2 1.0.106", + "quote 1.0.45", "syn 2.0.117", ] [[package]] name = "autocfg" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" +checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" [[package]] name = "backtrace" @@ -128,6 +128,12 @@ version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" +[[package]] +name = "bitflags" +version = "2.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "843867be96c8daad0d758b57df9392b6d8d271134fce549de6ce169ff98a92af" + [[package]] name = "block-buffer" version = "0.10.4" @@ -139,30 +145,31 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.19.0" +version = "3.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46c5e41b57b8bba42a04676d81cb89e9ee8e859a1a66f80a5a72e1cb76b34d43" +checksum = "5d20789868f4b01b2f2caec9f5c4e0213b41e3e5702a50157d699ae31ced2fcb" [[package]] name = "bytes" -version = "1.11.0" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b35204fbdc0b3f4446b89fc1ac2cf84a8a68971995d0bf2e925ec7cd960f9cb3" +checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33" [[package]] name = "cc" -version = "1.2.17" +version = "1.2.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fcb57c740ae1daf453ae85f16e37396f672b039e00d9d866e07ddb24e328e3a" +checksum = "e1e928d4b69e3077709075a938a05ffbedfa53a84c8f766efbf8220bb1ff60e1" dependencies = [ + "find-msvc-tools", "shlex", ] [[package]] name = "cfg-if" -version = "1.0.0" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" [[package]] name = "cpufeatures" @@ -185,9 +192,9 @@ dependencies = [ [[package]] name = "data-encoding" -version = "2.8.0" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "575f75dfd25738df5b91b8e43e14d44bda14637a58fae779fd2b064f8bf3e010" +checksum = "d7a1e2f27636f116493b8b860f5546edb47c8d8f8ea73e1d2a20be88e28d1fea" [[package]] name = "der-parser" @@ -219,9 +226,9 @@ dependencies = [ [[package]] name = "deranged" -version = "0.4.1" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28cfac68e08048ae1883171632c2aef3ebc555621ae56fbccce1cbf22dd7f058" +checksum = "7cd812cc2bc1d69d4764bd80df88b4317eaef9e773c75226407d9bc0876b211c" dependencies = [ "powerfmt", ] @@ -242,8 +249,8 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ - "proc-macro2 1.0.94", - "quote 1.0.40", + "proc-macro2 1.0.106", + "quote 1.0.45", "syn 2.0.117", ] @@ -253,6 +260,7 @@ version = "0.16.3" dependencies = [ "anyhow", "async-trait", + "droplet_types", "dyn-clone", "futures", "getrandom 0.3.4", @@ -272,12 +280,35 @@ dependencies = [ "x509-parser 0.17.0", ] +[[package]] +name = "droplet_types" +version = "0.1.0" +dependencies = [ + "serde", +] + [[package]] name = "dyn-clone" version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d0881ea181b1df73ff77ffaaf9c7544ecc11e82fba9b5f27b262a3c73a332555" +[[package]] +name = "equivalent" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" + +[[package]] +name = "errno" +version = "0.3.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" +dependencies = [ + "libc", + "windows-sys 0.61.2", +] + [[package]] name = "failure" version = "0.1.8" @@ -294,17 +325,29 @@ version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aa4da3c766cd7a0db8242e326e9e4e081edd567072893ed320008189715366a4" dependencies = [ - "proc-macro2 1.0.94", - "quote 1.0.40", + "proc-macro2 1.0.106", + "quote 1.0.45", "syn 1.0.109", "synstructure 0.12.6", ] [[package]] -name = "futures" -version = "0.3.31" +name = "find-msvc-tools" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" +checksum = "5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582" + +[[package]] +name = "foldhash" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" + +[[package]] +name = "futures" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b147ee9d1f6d097cef9ce628cd2ee62288d963e16fb287bd9286455b241382d" dependencies = [ "futures-channel", "futures-core", @@ -317,9 +360,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.31" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" +checksum = "07bbe89c50d7a535e539b8c17bc0b49bdb77747034daa8087407d655f3f7cc1d" dependencies = [ "futures-core", "futures-sink", @@ -327,15 +370,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.31" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" +checksum = "7e3450815272ef58cec6d564423f6e755e25379b217b0bc688e295ba24df6b1d" [[package]] name = "futures-executor" -version = "0.3.31" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" +checksum = "baf29c38818342a3b26b5b923639e7b1f4a61fc5e76102d4b1981c6dc7a7579d" dependencies = [ "futures-core", "futures-task", @@ -344,38 +387,38 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.31" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" +checksum = "cecba35d7ad927e23624b22ad55235f2239cfa44fd10428eecbeba6d6a717718" [[package]] name = "futures-macro" -version = "0.3.31" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" +checksum = "e835b70203e41293343137df5c0664546da5745f82ec9b84d40be8336958447b" dependencies = [ - "proc-macro2 1.0.94", - "quote 1.0.40", + "proc-macro2 1.0.106", + "quote 1.0.45", "syn 2.0.117", ] [[package]] name = "futures-sink" -version = "0.3.31" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" +checksum = "c39754e157331b013978ec91992bde1ac089843443c49cbc7f46150b0fad0893" [[package]] name = "futures-task" -version = "0.3.31" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" +checksum = "037711b3d59c33004d3856fbdc83b99d4ff37a24768fa1be9ce3538a1cde4393" [[package]] name = "futures-util" -version = "0.3.31" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" +checksum = "389ca41296e6190b48053de0321d02a77f32f8a5d2461dd38762c0593805c6d6" dependencies = [ "futures-channel", "futures-core", @@ -385,7 +428,6 @@ dependencies = [ "futures-task", "memchr", "pin-project-lite", - "pin-utils", "slab", ] @@ -401,9 +443,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.15" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" +checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0" dependencies = [ "cfg-if", "libc", @@ -418,10 +460,23 @@ checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" dependencies = [ "cfg-if", "libc", - "r-efi", + "r-efi 5.3.0", "wasip2", ] +[[package]] +name = "getrandom" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0de51e6874e94e7bf76d726fc5d13ba782deca734ff60d5bb2fb2607c7406555" +dependencies = [ + "cfg-if", + "libc", + "r-efi 6.0.0", + "wasip2", + "wasip3", +] + [[package]] name = "gimli" version = "0.32.3" @@ -434,6 +489,27 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0cc23270f6e1808e30a928bdc84dea0b9b4136a8bc82338574f23baf47bbd280" +[[package]] +name = "hashbrown" +version = "0.15.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" +dependencies = [ + "foldhash", +] + +[[package]] +name = "hashbrown" +version = "0.16.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" + +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + [[package]] name = "hex" version = "0.4.3" @@ -450,16 +526,34 @@ dependencies = [ ] [[package]] -name = "itoa" -version = "1.0.15" +name = "id-arena" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" +checksum = "3d3067d79b975e8844ca9eb072e16b31c3c1c36928edf9c6789548c524d0d954" + +[[package]] +name = "indexmap" +version = "2.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7714e70437a7dc3ac8eb7e6f8df75fd8eb422675fc7678aff7364301092b1017" +dependencies = [ + "equivalent", + "hashbrown 0.16.1", + "serde", + "serde_core", +] + +[[package]] +name = "itoa" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682" [[package]] name = "js-sys" -version = "0.3.83" +version = "0.3.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "464a3709c7f55f1f721e5389aa6ea4e3bc6aba669353300af094b29ffbdde1d8" +checksum = "797146bb2677299a1eb6b7b50a890f4c361b29ef967addf5b2fa45dae1bb6d7d" dependencies = [ "once_cell", "wasm-bindgen", @@ -471,6 +565,12 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" +[[package]] +name = "leb128fmt" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09edd9e8b54e49e587e4f6295a7d29c3ea94d469cb40ab8ca70b288248a81db2" + [[package]] name = "libarchive-drop" version = "0.1.1" @@ -491,21 +591,27 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.182" +version = "0.2.183" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6800badb6cb2082ffd7b6a67e6125bb39f18782f793520caee8cb8846be06112" +checksum = "b5b646652bf6661599e1da8901b3b9522896f01e736bad5f723fe7a3a27f899d" [[package]] name = "libm" -version = "0.2.15" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9fbbcab51052fe104eb5e5d351cf728d30a5be1fe14d9be8a3b097481fb97de" +checksum = "b6d2cec3eae94f9f509c767b45932f1ada8350c4bdb85af2fcab4a3c14807981" + +[[package]] +name = "log" +version = "0.4.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" [[package]] name = "memchr" -version = "2.7.4" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" +checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79" [[package]] name = "minimal-lexical" @@ -524,9 +630,9 @@ dependencies = [ [[package]] name = "mio" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69d83b0086dc8ecf3ce9ae2874b2d1290252e2a30720bea58a5c6639b0092873" +checksum = "50b7e5b27aa02a74bac8c3f23f448f8d87ff11f92d3aac1a6ed369ee08cc56c1" dependencies = [ "libc", "wasi", @@ -555,9 +661,9 @@ dependencies = [ [[package]] name = "num-conv" -version = "0.1.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" +checksum = "c6673768db2d862beb9b39a78fdcb1a69439615d5794a1be50caa9bc92c81967" [[package]] name = "num-integer" @@ -606,31 +712,25 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.21.3" +version = "1.21.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" +checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50" [[package]] name = "pem" -version = "3.0.5" +version = "3.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38af38e8470ac9dee3ce1bae1af9c1671fffc44ddfd8bd1d0a3445bf349a8ef3" +checksum = "1d30c53c26bc5b31a98cd02d20f25a7c8567146caf63ed593a9d87b2775291be" dependencies = [ "base64", - "serde", + "serde_core", ] [[package]] name = "pin-project-lite" -version = "0.2.16" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" - -[[package]] -name = "pin-utils" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" +checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" [[package]] name = "pkg-config" @@ -644,6 +744,16 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" +[[package]] +name = "prettyplease" +version = "0.2.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b" +dependencies = [ + "proc-macro2 1.0.106", + "syn 2.0.117", +] + [[package]] name = "proc-macro2" version = "0.4.30" @@ -655,9 +765,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.94" +version = "1.0.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a31971752e70b8b2686d7e46ec17fb38dad4051d94024c88df49b667caea9c84" +checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934" dependencies = [ "unicode-ident", ] @@ -673,11 +783,11 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.40" +version = "1.0.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" +checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924" dependencies = [ - "proc-macro2 1.0.94", + "proc-macro2 1.0.106", ] [[package]] @@ -686,6 +796,12 @@ version = "5.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" +[[package]] +name = "r-efi" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" + [[package]] name = "rcgen" version = "0.13.2" @@ -708,7 +824,7 @@ checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" dependencies = [ "cc", "cfg-if", - "getrandom 0.2.15", + "getrandom 0.2.17", "libc", "untrusted", "windows-sys 0.52.0", @@ -731,9 +847,12 @@ dependencies = [ [[package]] name = "rustls-pki-types" -version = "1.11.0" +version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "917ce264624a4b4db1c364dcc35bfca9ded014d0a958cd47ad3e960e988ea51c" +checksum = "be040f8b0a225e40375822a563fa9524378b9d63112f53e19ffff34df5d33fdd" +dependencies = [ + "zeroize", +] [[package]] name = "rustversion" @@ -742,10 +861,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" [[package]] -name = "ryu" -version = "1.0.20" +name = "semver" +version = "1.0.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" +checksum = "d767eb0aabc880b29956c35734170f26ed551a859dbd361d140cdbeca61ab1e2" [[package]] name = "serde" @@ -772,22 +891,22 @@ version = "1.0.228" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" dependencies = [ - "proc-macro2 1.0.94", - "quote 1.0.40", + "proc-macro2 1.0.106", + "quote 1.0.45", "syn 2.0.117", ] [[package]] name = "serde_json" -version = "1.0.145" +version = "1.0.149" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "402a6f66d8c709116cf22f558eab210f5a50187f702eb4d7e5ef38d9a7f1c79c" +checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86" dependencies = [ "itoa", "memchr", - "ryu", "serde", "serde_core", + "zmij", ] [[package]] @@ -809,18 +928,19 @@ checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" [[package]] name = "signal-hook-registry" -version = "1.4.6" +version = "1.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2a4719bff48cee6b39d12c020eeb490953ad2443b7055bd0b21fca26bd8c28b" +checksum = "c4db69cba1110affc0e9f7bcd48bbf87b3f4fc7c61fc9155afd4c469eb3d6c1b" dependencies = [ + "errno", "libc", ] [[package]] name = "slab" -version = "0.4.11" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a2ae44ef20feb57a68b23d846850f861394c2e02dc425a50098ae8c90267589" +checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5" [[package]] name = "speedometer" @@ -848,8 +968,8 @@ version = "1.0.109" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" dependencies = [ - "proc-macro2 1.0.94", - "quote 1.0.40", + "proc-macro2 1.0.106", + "quote 1.0.45", "unicode-ident", ] @@ -859,8 +979,8 @@ version = "2.0.117" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99" dependencies = [ - "proc-macro2 1.0.94", - "quote 1.0.40", + "proc-macro2 1.0.106", + "quote 1.0.45", "unicode-ident", ] @@ -870,20 +990,20 @@ version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" dependencies = [ - "proc-macro2 1.0.94", - "quote 1.0.40", + "proc-macro2 1.0.106", + "quote 1.0.45", "syn 1.0.109", "unicode-xid 0.2.6", ] [[package]] name = "synstructure" -version = "0.13.1" +version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" +checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" dependencies = [ - "proc-macro2 1.0.94", - "quote 1.0.40", + "proc-macro2 1.0.106", + "quote 1.0.45", "syn 2.0.117", ] @@ -910,11 +1030,11 @@ dependencies = [ [[package]] name = "thiserror" -version = "2.0.12" +version = "2.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "567b8a2dae586314f7be2a752ec7474332959c6460e02bde30d702a66d488708" +checksum = "4288b5bcbc7920c07a1149a35cf9590a2aa808e0bc1eafaade0b80947865fbc4" dependencies = [ - "thiserror-impl 2.0.12", + "thiserror-impl 2.0.18", ] [[package]] @@ -923,48 +1043,48 @@ version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ - "proc-macro2 1.0.94", - "quote 1.0.40", + "proc-macro2 1.0.106", + "quote 1.0.45", "syn 2.0.117", ] [[package]] name = "thiserror-impl" -version = "2.0.12" +version = "2.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f7cf42b4507d8ea322120659672cf1b9dbb93f8f2d4ecfd6e51350ff5b17a1d" +checksum = "ebc4ee7f67670e9b64d05fa4253e753e016c6c95ff35b89b7941d6b856dec1d5" dependencies = [ - "proc-macro2 1.0.94", - "quote 1.0.40", + "proc-macro2 1.0.106", + "quote 1.0.45", "syn 2.0.117", ] [[package]] name = "time" -version = "0.3.41" +version = "0.3.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a7619e19bc266e0f9c5e6686659d394bc57973859340060a69221e57dbc0c40" +checksum = "743bd48c283afc0388f9b8827b976905fb217ad9e647fae3a379a9283c4def2c" dependencies = [ "deranged", "itoa", "num-conv", "powerfmt", - "serde", + "serde_core", "time-core", "time-macros", ] [[package]] name = "time-core" -version = "0.1.4" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9e9a38711f559d9e3ce1cdb06dd7c5b8ea546bc90052da6d06bb76da74bb07c" +checksum = "7694e1cfe791f8d31026952abf09c69ca6f6fa4e1a1229e18988f06a04a12dca" [[package]] name = "time-macros" -version = "0.2.22" +version = "0.2.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3526739392ec93fd8b359c8e98514cb3e8e021beb4e5f597b00a0221f8ed8a49" +checksum = "2e70e4c5a0e0a8a4823ad65dfe1a6930e4f4d756dcd9dd7939022b5e8c501215" dependencies = [ "num-conv", "time-core", @@ -972,9 +1092,9 @@ dependencies = [ [[package]] name = "tokio" -version = "1.48.0" +version = "1.50.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff360e02eab121e0bc37a2d3b4d4dc622e6eda3a8e5253d5435ecf5bd4c68408" +checksum = "27ad5e34374e03cfffefc301becb44e9dc3c17584f414349ebe29ed26661822d" dependencies = [ "bytes", "libc", @@ -987,12 +1107,12 @@ dependencies = [ [[package]] name = "tokio-macros" -version = "2.6.0" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af407857209536a95c8e56f8231ef2c2e2aff839b22e07a1ffcbc617e9db9fa5" +checksum = "5c55a2eff8b69ce66c84f85e1da1c233edc36ceb85a2058d11b0d6a3c7e7569c" dependencies = [ - "proc-macro2 1.0.94", - "quote 1.0.40", + "proc-macro2 1.0.106", + "quote 1.0.45", "syn 2.0.117", ] @@ -1004,9 +1124,9 @@ checksum = "562d481066bde0658276a35467c4af00bdc6ee726305698a55b86e61d7ad82bb" [[package]] name = "unicode-ident" -version = "1.0.18" +version = "1.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512" +checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" [[package]] name = "unicode-xid" @@ -1028,11 +1148,11 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "uuid" -version = "1.19.0" +version = "1.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2e054861b4bd027cd373e18e8d8d8e6548085000e41290d95ce0c373a654b4a" +checksum = "5ac8b6f42ead25368cf5b098aeb3dc8a1a2c05a3eee8a9a1a68c640edbfc79d9" dependencies = [ - "getrandom 0.3.4", + "getrandom 0.4.2", "js-sys", "wasm-bindgen", ] @@ -1045,24 +1165,33 @@ checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" [[package]] name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" +version = "0.11.1+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" +checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" [[package]] name = "wasip2" -version = "1.0.1+wasi-0.2.4" +version = "1.0.2+wasi-0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0562428422c63773dad2c345a1882263bbf4d65cf3f42e90921f787ef5ad58e7" +checksum = "9517f9239f02c069db75e65f174b3da828fe5f5b945c4dd26bd25d89c03ebcf5" +dependencies = [ + "wit-bindgen", +] + +[[package]] +name = "wasip3" +version = "0.4.0+wasi-0.3.0-rc-2026-01-06" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5428f8bf88ea5ddc08faddef2ac4a67e390b88186c703ce6dbd955e1c145aca5" dependencies = [ "wit-bindgen", ] [[package]] name = "wasm-bindgen" -version = "0.2.106" +version = "0.2.116" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d759f433fa64a2d763d1340820e46e111a7a5ab75f993d1852d70b03dbb80fd" +checksum = "7dc0882f7b5bb01ae8c5215a1230832694481c1a4be062fd410e12ea3da5b631" dependencies = [ "cfg-if", "once_cell", @@ -1073,36 +1202,70 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.106" +version = "0.2.116" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48cb0d2638f8baedbc542ed444afc0644a29166f1595371af4fecf8ce1e7eeb3" +checksum = "75973d3066e01d035dbedaad2864c398df42f8dd7b1ea057c35b8407c015b537" dependencies = [ - "quote 1.0.40", + "quote 1.0.45", "wasm-bindgen-macro-support", ] [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.106" +version = "0.2.116" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cefb59d5cd5f92d9dcf80e4683949f15ca4b511f4ac0a6e14d4e1ac60c6ecd40" +checksum = "91af5e4be765819e0bcfee7322c14374dc821e35e72fa663a830bbc7dc199eac" dependencies = [ "bumpalo", - "proc-macro2 1.0.94", - "quote 1.0.40", + "proc-macro2 1.0.106", + "quote 1.0.45", "syn 2.0.117", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.106" +version = "0.2.116" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbc538057e648b67f72a982e708d485b2efa771e1ac05fec311f9f63e5800db4" +checksum = "c9bf0406a78f02f336bf1e451799cca198e8acde4ffa278f0fb20487b150a633" dependencies = [ "unicode-ident", ] +[[package]] +name = "wasm-encoder" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "990065f2fe63003fe337b932cfb5e3b80e0b4d0f5ff650e6985b1048f62c8319" +dependencies = [ + "leb128fmt", + "wasmparser", +] + +[[package]] +name = "wasm-metadata" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb0e353e6a2fbdc176932bbaab493762eb1255a7900fe0fea1a2f96c296cc909" +dependencies = [ + "anyhow", + "indexmap", + "wasm-encoder", + "wasmparser", +] + +[[package]] +name = "wasmparser" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47b807c72e1bac69382b3a6fb3dbe8ea4c0ed87ff5629b8685ae6b9a611028fe" +dependencies = [ + "bitflags", + "hashbrown 0.15.5", + "indexmap", + "semver", +] + [[package]] name = "windows-link" version = "0.2.1" @@ -1193,9 +1356,91 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "wit-bindgen" -version = "0.46.0" +version = "0.51.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f17a85883d4e6d00e8a97c586de764dabcc06133f7f1d55dce5cdc070ad7fe59" +checksum = "d7249219f66ced02969388cf2bb044a09756a083d0fab1e566056b04d9fbcaa5" +dependencies = [ + "wit-bindgen-rust-macro", +] + +[[package]] +name = "wit-bindgen-core" +version = "0.51.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea61de684c3ea68cb082b7a88508a8b27fcc8b797d738bfc99a82facf1d752dc" +dependencies = [ + "anyhow", + "heck", + "wit-parser", +] + +[[package]] +name = "wit-bindgen-rust" +version = "0.51.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7c566e0f4b284dd6561c786d9cb0142da491f46a9fbed79ea69cdad5db17f21" +dependencies = [ + "anyhow", + "heck", + "indexmap", + "prettyplease", + "syn 2.0.117", + "wasm-metadata", + "wit-bindgen-core", + "wit-component", +] + +[[package]] +name = "wit-bindgen-rust-macro" +version = "0.51.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c0f9bfd77e6a48eccf51359e3ae77140a7f50b1e2ebfe62422d8afdaffab17a" +dependencies = [ + "anyhow", + "prettyplease", + "proc-macro2 1.0.106", + "quote 1.0.45", + "syn 2.0.117", + "wit-bindgen-core", + "wit-bindgen-rust", +] + +[[package]] +name = "wit-component" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d66ea20e9553b30172b5e831994e35fbde2d165325bec84fc43dbf6f4eb9cb2" +dependencies = [ + "anyhow", + "bitflags", + "indexmap", + "log", + "serde", + "serde_derive", + "serde_json", + "wasm-encoder", + "wasm-metadata", + "wasmparser", + "wit-parser", +] + +[[package]] +name = "wit-parser" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ecc8ac4bc1dc3381b7f59c34f00b67e18f910c2c0f50015669dde7def656a736" +dependencies = [ + "anyhow", + "id-arena", + "indexmap", + "log", + "semver", + "serde", + "serde_derive", + "serde_json", + "unicode-xid 0.2.6", + "wasmparser", +] [[package]] name = "x509-parser" @@ -1229,7 +1474,7 @@ dependencies = [ "oid-registry 0.8.1", "ring", "rusticata-macros", - "thiserror 2.0.12", + "thiserror 2.0.18", "time", ] @@ -1241,3 +1486,15 @@ checksum = "e17bb3549cc1321ae1296b9cdc2698e2b6cb1992adfa19a8c72e5b7a738f44cd" dependencies = [ "time", ] + +[[package]] +name = "zeroize" +version = "1.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b97154e67e32c85465826e8bcc1c59429aaaf107c1e4a9e53c8d8ccd5eff88d0" + +[[package]] +name = "zmij" +version = "1.0.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa" diff --git a/libraries/droplet/Cargo.toml b/libraries/droplet/Cargo.toml index 0eec32d2..c59cbf89 100644 --- a/libraries/droplet/Cargo.toml +++ b/libraries/droplet/Cargo.toml @@ -7,6 +7,7 @@ license = "AGPL-3.0-only" description = "Droplet is a `napi.rs` Rust/Node.js package full of high-performance and low-level utils for Drop" [dependencies] +droplet_types = { path = "../droplet_types" } hex = "0.4.3" time = "0.3.41" ring = "0.17.14" diff --git a/libraries/droplet/libarchive-rust b/libraries/droplet/libarchive-rust deleted file mode 160000 index fdb73ef2..00000000 --- a/libraries/droplet/libarchive-rust +++ /dev/null @@ -1 +0,0 @@ -Subproject commit fdb73ef2dedb031e396153113ff9eee4ee082dc2 diff --git a/libraries/droplet/src/lib.rs b/libraries/droplet/src/lib.rs index 666a17bc..b13f620c 100644 --- a/libraries/droplet/src/lib.rs +++ b/libraries/droplet/src/lib.rs @@ -1,13 +1,14 @@ #![deny(clippy::all)] #![feature(impl_trait_in_bindings)] - +#![feature(nonpoison_mutex)] +#![feature(sync_nonpoison)] pub mod file_utils; pub mod manifest; pub mod ssl; pub mod versions; pub mod vm; -extern crate libarchive_drop; +pub use manifest::{CHUNK_SIZE, MAX_FILE_COUNT}; #[cfg(test)] pub mod tests; diff --git a/libraries/droplet/src/main.rs b/libraries/droplet/src/main.rs index b37cc682..c8fe74bf 100644 --- a/libraries/droplet/src/main.rs +++ b/libraries/droplet/src/main.rs @@ -1,8 +1,21 @@ use std::{env, path::PathBuf}; -use droplet_rs::manifest::generate_manifest_rusty; +use droplet_rs::manifest::{ManifestWriterFactory, generate_manifest_rusty}; use tokio::runtime::Handle; +struct SinkFactory {} +#[async_trait::async_trait] +impl ManifestWriterFactory for SinkFactory { + type Writer = tokio::io::Sink; + async fn create(&self, _id: String) -> anyhow::Result { + Ok(tokio::io::sink()) + } + + async fn close(&self, _writer: Self::Writer) -> anyhow::Result<()> { + Ok(()) + } +} + #[tokio::main] pub async fn main() { let mut args = env::args(); @@ -17,6 +30,7 @@ pub async fn main() { |message| { println!("{}", message); }, + Some(&SinkFactory {}), None, ) .await diff --git a/libraries/droplet/src/manifest.rs b/libraries/droplet/src/manifest.rs index f4c80138..145558c4 100644 --- a/libraries/droplet/src/manifest.rs +++ b/libraries/droplet/src/manifest.rs @@ -1,162 +1,172 @@ -use std::{ - collections::HashMap, - mem, - path::Path, - sync::{ - atomic::{AtomicU64, Ordering}, - Arc, - }, -}; +use std::{collections::HashMap, ops::Not, path::Path}; use anyhow::anyhow; +use async_trait::async_trait; +use futures::StreamExt; use hex::ToHex as _; use humansize::{format_size, BINARY}; -use serde::{Deserialize, Serialize}; use sha2::{Digest as _, Sha256}; -use tokio::{ - io::AsyncReadExt as _, - join, - sync::{Mutex, Semaphore}, - task::JoinSet, -}; +use tokio::io::AsyncWriteExt; +use tokio::io::{AsyncReadExt as _, AsyncWrite}; +use tokio::sync::Semaphore; +pub use droplet_types::{ChunkData, FileEntry, Manifest}; -#[derive(Serialize, Deserialize, Clone)] -pub struct FileEntry { - pub filename: String, - pub start: usize, - pub length: usize, - pub permissions: u32, -} -#[derive(Serialize, Deserialize, Clone)] -pub struct ChunkData { - pub files: Vec, - pub checksum: String, - pub iv: [u8; 16], -} - -#[derive(Serialize, Deserialize)] -pub struct Manifest { - pub version: String, - pub chunks: HashMap, - pub size: u64, - pub key: [u8; 16], -} - -const CHUNK_SIZE: u64 = 1024 * 1024 * 64; -const MAX_FILE_COUNT: usize = 512; +pub const CHUNK_SIZE: u64 = 1024 * 1024 * 64; +pub const MAX_FILE_COUNT: usize = 512; use crate::versions::{ create_backend_constructor, types::{VersionBackend, VersionFile}, }; -pub async fn generate_manifest_rusty( - dir: &Path, - progress_sfn: V, - log_sfn: T, - reader_semaphore: Option>, -) -> anyhow::Result { - let backend = - create_backend_constructor(dir).ok_or(anyhow!("Could not create backend for path."))?()?; - - let required_single_file = backend.require_whole_files(); +#[async_trait] +pub trait ManifestWriterFactory: Send + Sync { + type Writer: AsyncWrite + Unpin; + async fn create(&self, id: String) -> anyhow::Result; + async fn close(&self, writer: Self::Writer) -> anyhow::Result<()>; +} +pub async fn generate_manifest_rusty( + dir: P, + progress_sfn: ProgFn, + log_sfn: LogFn, + factory: Option<&dyn ManifestWriterFactory>, + semaphore: Option<&Semaphore>, +) -> anyhow::Result +where + P: AsRef, + LogFn: Fn(String) + Clone, + ProgFn: Fn(f32), + Writer: AsyncWrite + Unpin, +{ + let backend = create_backend_constructor(dir).ok_or(anyhow!( + "Could not create backend for path. Is this structure supported?" + ))?()?; let mut files = backend.list_files().await?; - files.sort_by_key(|b| std::cmp::Reverse(b.size)); - // Filepath to chunk data - let mut chunks: Vec> = Vec::new(); - let mut current_chunk: Vec<(VersionFile, u64, u64)> = Vec::new(); + files.sort_by(|a, b| b.size.cmp(&a.size)); - log_sfn("organizing files into chunks...".to_string()); + log_sfn("organising files into chunks...".to_string()); - if required_single_file { - for version_file in files { - if version_file.size >= CHUNK_SIZE { - let size = version_file.size; - chunks.push(vec![(version_file, 0, size)]); - - continue; - } - - let mut current_size = current_chunk.iter().map(|v| v.2).sum::(); - - let size = version_file.size; - current_chunk.push((version_file, 0, size)); - - current_size += size; - - if current_size >= CHUNK_SIZE { - // Pop current and add, then reset - let new_chunk = std::mem::take(&mut current_chunk); - chunks.push(new_chunk); - } - - if current_chunk.len() >= MAX_FILE_COUNT { - chunks.push(std::mem::take(&mut current_chunk)); - } - - continue; - } - } else { - for version_file in files { - if current_chunk.len() >= MAX_FILE_COUNT { - chunks.push(std::mem::take(&mut current_chunk)); - } - - let current_size = current_chunk.iter().map(|v| v.2).sum::(); - - if version_file.size + current_size < CHUNK_SIZE { - let size = version_file.size; - current_chunk.push((version_file, 0, size)); - - continue; - } - - // Fill up current chunk - let remaining = CHUNK_SIZE - current_size; - current_chunk.push((version_file.clone(), 0, remaining)); - chunks.push(std::mem::take(&mut current_chunk)); - - // This is our offset in our current file - let mut offset = remaining; - while offset < version_file.size { - let length = CHUNK_SIZE.min(version_file.size - offset); - if length == CHUNK_SIZE { - chunks.push(vec![(version_file.clone(), offset, length)]); - } else { - current_chunk.push((version_file.clone(), offset, length)); - } - offset += length; - } - } - } - - if !current_chunk.is_empty() { - chunks.push(current_chunk); - } + let chunks = organise_files(files, backend.require_whole_files()); log_sfn(format!( "organized into {} chunks, generating checksums...", chunks.len() )); + let manifest = read_chunks_and_generate_manifest( + backend.as_ref(), + chunks, + progress_sfn, + &log_sfn, + factory, + semaphore, + ) + .await?; - let manifest: Arc>> = Arc::new(Mutex::new(HashMap::new())); - let total_manifest_length = Arc::new(AtomicU64::new(0)); + let mut key = [0u8; 16]; + getrandom::fill(&mut key).map_err(|err| anyhow!("failed to generate key: {:?}", err))?; - // SAFETY: we .join_all() the futures using this - let backend: &'static (dyn VersionBackend + Send + Sync) = unsafe { mem::transmute(&*backend) }; + let total_manifest_length = manifest + .values() + .map(|value| value.files.iter().map(|f| f.length as u64).sum::()) + .sum::(); - let mut futures: JoinSet> = JoinSet::new(); - let (send_log, mut recieve_log) = tokio::sync::mpsc::channel(16); - let chunks_length = chunks.len(); - for (index, chunk) in chunks.into_iter().enumerate() { - let send_log = send_log.clone(); - let total_manifest_length = total_manifest_length.clone(); - let manifest = manifest.clone(); - let reader_semaphore = reader_semaphore.clone(); - futures.spawn(async move { - let mut read_buf = vec![0u8; 1024 * 1024 * 8]; + Ok(Manifest { + version: "2".to_string(), + chunks: manifest, + size: total_manifest_length, + key, + }) +} + +fn organise_files( + files: Vec, + require_whole_files: bool, +) -> Vec> { + let mut chunks = Vec::new(); + let mut current_chunk = Vec::new(); + + for version_file in files { + if current_chunk.len() >= MAX_FILE_COUNT { + // Pop current chunk + chunks.push(std::mem::take(&mut current_chunk)); + println!("Chunks: {}", chunks.len()); + } + let current_chunk_size = current_chunk + .iter() + .map(|(_, _, length)| *length) + .sum::(); + let version_file_size = version_file.size; + + if require_whole_files { + // If the current chunk is larger than chunk size, there's no point adding + // it to the current_chunk. Just push it by itself + if version_file_size >= CHUNK_SIZE { + chunks.push(vec![(version_file, 0, version_file_size)]); + println!("Chunks: {}", chunks.len()); + continue; + } + + current_chunk.push((version_file, 0, version_file_size)); + if current_chunk_size + version_file_size >= CHUNK_SIZE { + // Pop current chunk + chunks.push(std::mem::take(&mut current_chunk)); + println!("Chunks: {}", chunks.len()); + } + } else { + // Enough space for it to be put in immediately + if version_file_size + current_chunk_size < CHUNK_SIZE { + current_chunk.push((version_file, 0, version_file_size)); + continue; + } + + let bytes_free_in_existing_chunk = CHUNK_SIZE - current_chunk_size; + current_chunk.push((version_file.clone(), 0, bytes_free_in_existing_chunk)); + chunks.push(std::mem::take(&mut current_chunk)); + + // Loop over remaining data and create sufficient chunks to use it + let mut offset = bytes_free_in_existing_chunk; + while offset < version_file_size { + let length = CHUNK_SIZE.min(version_file_size - offset); + if length == CHUNK_SIZE { + chunks.push(vec![(version_file.clone(), offset, length)]); + println!("Chunks: {}", chunks.len()); + } else { + current_chunk.push((version_file.clone(), offset, length)); + println!("Chunks: {}", chunks.len()); + } + offset += length; + } + } + } + if current_chunk.is_empty().not() { + chunks.push(current_chunk); + println!("Pushed final chunk: {}", chunks.len()); + } + println!("Chunks: {}", chunks.len()); + chunks +} + +async fn read_chunks_and_generate_manifest( + backend: &(dyn VersionBackend + Send + Sync), + chunks: Vec>, + progress_sfn: ProgFn, + log_sfn: &LogFn, + factory: Option<&dyn ManifestWriterFactory>, + semaphore: Option<&Semaphore>, +) -> anyhow::Result> +where + LogFn: Fn(String), + ProgFn: Fn(f32), + Writer: AsyncWrite + Unpin, +{ + let total_chunk_count = chunks.len(); + + let futures = chunks.into_iter().enumerate().map(|(index, chunk)| { + // To make the borrow checker happy + async move { + let mut read_buf = vec![0; 1024 * 1024 * 64]; let uuid = uuid::Uuid::new_v4().to_string(); let mut hasher = Sha256::new(); @@ -168,91 +178,92 @@ pub async fn generate_manifest_rusty( checksum: String::new(), iv, }; - - let mut chunk_length = 0; - + let mut chunk_length = 0u64; + let mut writer = match factory { + Some(factory) => Some(factory.create(uuid.clone()).await?), + None => None, + }; for (file, start, length) in chunk { - let permit = if let Some(reader_semaphore) = &reader_semaphore { - Some(reader_semaphore.acquire().await?) + let permit = if let Some(semaphore) = &semaphore { + Some(semaphore.acquire().await?) } else { None }; - - let mut reader = backend.reader(&file, start, start + length).await?; - - let mut total = 0; - - loop { - let amount = reader.read(&mut read_buf).await?; - if amount == 0 { - break; - } - total += amount; - hasher.update(&read_buf[0..amount]); - } - - if total as u64 > length { - panic!("read too much: target {}, got {}", length, total); - } - + chunk_data.files.push( + read_and_generate_chunk_file_data( + backend, + &file, + start, + length, + &mut hasher, + &mut read_buf, + &mut writer, + ) + .await?, + ); chunk_length += length; - - chunk_data.files.push(FileEntry { - filename: file.relative_filename, - start: start.try_into().unwrap(), - length: length.try_into().unwrap(), - permissions: file.permission, - }); - drop(permit); } - - send_log - .send(format!( - "created chunk of size {} ({}b) from {} files (index {})", - format_size(chunk_length, BINARY), - chunk_length, - chunk_data.files.len(), - index - )) - .await?; - - total_manifest_length.fetch_add(chunk_length, Ordering::Relaxed); - + if let Some(factory) = factory { + factory.close(writer.expect("Failed to get writer")).await?; + } let hash: String = hasher.finalize().encode_hex(); chunk_data.checksum = hash; - { - let mut manifest_lock = manifest.lock().await; - manifest_lock.insert(uuid, chunk_data); - }; - Ok(()) - }); + log_sfn(format!( + "created chunk of size {} ({}b) from {} files (index {})", + format_size(chunk_length, BINARY), + chunk_length, + chunk_data.files.len(), + index + )); + + Ok::<_, anyhow::Error>((uuid, chunk_data)) + } + }); + let mut stream = futures::stream::iter(futures) + .buffer_unordered(semaphore.map(|s| s.available_permits()).unwrap_or(4)) + .enumerate(); + let mut results = HashMap::new(); + let mut current_progress = 0f32; + while let Some((_, res)) = stream.next().await { + let (id, data) = res?; + current_progress += 1.0; + progress_sfn((current_progress / total_chunk_count as f32) * 100.0f32); + results.insert(id, data); } - drop(send_log); - join!( - async move { - let mut current_progress = 0f32; - let total_progress = chunks_length as f32; - while let Some(message) = recieve_log.recv().await { - log_sfn(message); - current_progress += 1.0f32; - progress_sfn((current_progress / total_progress) * 100.0f32) - } - }, - futures.join_all() - ); + Ok(results) +} +async fn read_and_generate_chunk_file_data( + backend: &(dyn VersionBackend + Sync + Send), + file: &VersionFile, + start: u64, + length: u64, + hasher: &mut Sha256, + read_buf: &mut [u8], + writer: &mut Option, +) -> anyhow::Result +where + Writer: AsyncWrite + Unpin, +{ + let mut reader = backend.reader(file, start, start + length).await?; - let manifest = manifest.lock().await; - let manifest = manifest.clone(); + loop { + let amount = reader.read(read_buf).await?; - let mut key = [0u8; 16]; - getrandom::fill(&mut key).map_err(|err| anyhow!("failed to generate key: {:?}", err))?; + if amount == 0 { + break; + } + if let Some(writer) = writer.as_mut() { + writer.write_all(&read_buf[0..amount]).await?; + } + hasher.update(&read_buf[0..amount]); + } - Ok(Manifest { - version: "2".to_string(), - chunks: manifest, - size: total_manifest_length.fetch_add(0, Ordering::Relaxed), - key, + Ok(FileEntry { + filename: file.relative_filename.clone(), + start: start.try_into().unwrap(), + length: length.try_into().unwrap(), + permissions: file.permission, }) } diff --git a/libraries/droplet/src/tests.rs b/libraries/droplet/src/tests.rs index 0b81dd15..c4ac0079 100644 --- a/libraries/droplet/src/tests.rs +++ b/libraries/droplet/src/tests.rs @@ -4,8 +4,9 @@ extern crate test_generator; use std::path::Path; use test_generator::test_resources; +use tokio::io::SimplexStream; -use crate::manifest::generate_manifest_rusty; +use crate::manifest::{generate_manifest_rusty, ManifestWriterFactory}; #[test_resources("testfiles/**/*.7z")] fn manifest_gen(resource: &str) { @@ -22,6 +23,7 @@ fn manifest_gen(resource: &str) { |message| { println!("({}) {}", filepath.display(), message); }, + None::<&dyn ManifestWriterFactory>, // Dummy type signature, not actually used None, ) .await diff --git a/libraries/droplet/src/versions/archive_backend.rs b/libraries/droplet/src/versions/archive_backend.rs index 2c0b4f22..01d27476 100644 --- a/libraries/droplet/src/versions/archive_backend.rs +++ b/libraries/droplet/src/versions/archive_backend.rs @@ -28,12 +28,12 @@ impl ZipVersionBackend { } } -struct ArchiveReader<'a> { +struct ArchiveReader { archive: FileReader, - prev_block: Option<&'a [u8]>, + prev_block: Option>, } -impl<'a> AsyncRead for ArchiveReader<'a> { +impl AsyncRead for ArchiveReader { fn poll_read( mut self: std::pin::Pin<&mut Self>, _cx: &mut std::task::Context<'_>, @@ -41,9 +41,8 @@ impl<'a> AsyncRead for ArchiveReader<'a> { ) -> std::task::Poll> { if let Some(block) = &mut self.prev_block { let to_read = buf.remaining().min(block.len()); - let result = block.split_off(..to_read); - let result = result.unwrap(); // SAFETY: above .min statement - buf.put_slice(result); + let result = block.split_off(to_read); + buf.put_slice(&result); // If the block is empty, we can read more if block.is_empty() { @@ -52,27 +51,31 @@ impl<'a> AsyncRead for ArchiveReader<'a> { return Poll::Ready(Ok(())); } } - let block = match self.archive.read_block() { - Ok(v) => v, - Err(err) => return Poll::Ready(Err(std::io::Error::other(err.to_string()))), - }; + let prev_block_update = { + let block = match self.archive.read_block() { + Ok(v) => v, + Err(err) => return Poll::Ready(Err(std::io::Error::other(err.to_string()))), + }; - let mut block = match block { - Some(v) => v, - None => return Poll::Ready(Ok(())), - }; + let mut block = match block { + Some(v) => v, + None => return Poll::Ready(Ok(())), + }; - let write_amount = buf.remaining().min(block.len()); - let to_write = block.split_off(..write_amount); - let to_write = to_write.unwrap(); // SAFETY: above .min statement - buf.put_slice(to_write); + let write_amount = buf.remaining().min(block.len()); + let to_write = block.split_off(..write_amount); + let to_write = to_write.unwrap(); // SAFETY: above .min statement + buf.put_slice(to_write); - if !block.is_empty() { - #[cfg(debug_assertions)] - if self.prev_block.is_some() { - panic!("replacing prev_block while it contains data") + if !block.is_empty() { + Some(block[buf.remaining()..].to_vec()) + } else { + None } - self.prev_block.replace(&block[buf.remaining()..]); + }; + + if let Some(prev_block) = prev_block_update { + self.prev_block.replace(prev_block); } Poll::Ready(Ok(())) diff --git a/libraries/droplet/src/versions/mod.rs b/libraries/droplet/src/versions/mod.rs index 89874d1b..6b2ba0a3 100644 --- a/libraries/droplet/src/versions/mod.rs +++ b/libraries/droplet/src/versions/mod.rs @@ -5,10 +5,11 @@ use std::{ use anyhow::Result; -use crate::versions::{ - archive_backend::ZipVersionBackend, path_backend::PathVersionBackend, types::VersionBackend, -}; +use crate::versions::{path_backend::PathVersionBackend, types::VersionBackend}; +use crate::versions::archive_backend::ZipVersionBackend; + +// libarchive backend is Linux-only for now pub mod archive_backend; pub mod path_backend; @@ -33,10 +34,13 @@ const SUPPORTED_FILE_EXTENSIONS: [&str; 11] = [ ]; pub mod types; -#[allow(clippy::type_complexity)] -pub fn create_backend_constructor<'a>( - path: &Path, -) -> Option Result>>> { +pub fn create_backend_constructor<'a, P>( + path: P, +) -> Option Result>>> +where + P: AsRef, +{ + let path = path.as_ref(); if !path.exists() { return None; } @@ -49,8 +53,7 @@ pub fn create_backend_constructor<'a>( })); }; - let file_extension = path.extension().and_then(|v| v.to_str())?; - + let file_extension = path.extension().map(|v| v.to_str()).flatten()?; if SUPPORTED_FILE_EXTENSIONS.contains(&file_extension) { let buf = path.to_path_buf(); return Some(Box::new(move || Ok(Box::new(ZipVersionBackend::new(buf)?)))); diff --git a/libraries/droplet_types/.gitignore b/libraries/droplet_types/.gitignore new file mode 100644 index 00000000..aba9ad45 --- /dev/null +++ b/libraries/droplet_types/.gitignore @@ -0,0 +1,28 @@ +# Generated by Cargo +# will have compiled files and executables +debug/ +target/ + +# These are backup files generated by rustfmt +**/*.rs.bk + +# MSVC Windows builds of rustc generate these, which store debugging information +*.pdb + +# RustRover +# JetBrains specific template is maintained in a separate JetBrains.gitignore that can +# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore +# and can be added to the global gitignore or merged into this file. For a more nuclear +# option (not recommended) you can uncomment the following to ignore the entire idea folder. +#.idea/ + +# Added by cargo + +/target + +perf.data +perf.data.old +flamegraph.svg +*.json + +.direnv \ No newline at end of file diff --git a/libraries/droplet_types/Cargo.lock b/libraries/droplet_types/Cargo.lock new file mode 100644 index 00000000..804f9a59 --- /dev/null +++ b/libraries/droplet_types/Cargo.lock @@ -0,0 +1,75 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "droplet_types" +version = "0.1.0" +dependencies = [ + "serde", +] + +[[package]] +name = "proc-macro2" +version = "1.0.106" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quote" +version = "1.0.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "serde" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" +dependencies = [ + "serde_core", + "serde_derive", +] + +[[package]] +name = "serde_core" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "syn" +version = "2.0.117" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "unicode-ident" +version = "1.0.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" diff --git a/libraries/droplet_types/Cargo.toml b/libraries/droplet_types/Cargo.toml new file mode 100644 index 00000000..c30a5d8f --- /dev/null +++ b/libraries/droplet_types/Cargo.toml @@ -0,0 +1,7 @@ +[package] +name = "droplet_types" +version = "0.1.0" +edition = "2024" + +[dependencies] +serde = { version = "*", features = ["derive"] } diff --git a/libraries/droplet_types/README.md b/libraries/droplet_types/README.md new file mode 100644 index 00000000..a3ab780d --- /dev/null +++ b/libraries/droplet_types/README.md @@ -0,0 +1,6 @@ +# droplet_types + +Shared types between the cross-platform client and the droplet-rs crate. + + +Split off from droplet-rs because of cross-compiling issues with the desktop client, and there's no need to compile the entirety of droplet-rs if we're only using a few types. \ No newline at end of file diff --git a/libraries/droplet_types/src/lib.rs b/libraries/droplet_types/src/lib.rs new file mode 100644 index 00000000..b1b0ab8b --- /dev/null +++ b/libraries/droplet_types/src/lib.rs @@ -0,0 +1,27 @@ +use std::collections::HashMap; + +use serde::{Deserialize, Serialize}; + +#[derive(Serialize, Deserialize, Clone)] +pub struct FileEntry { + pub filename: String, + pub start: usize, + pub length: usize, // TODO: Replace with u64 for 32 bit clients + pub permissions: u32, +} + +#[derive(Serialize, Deserialize, Clone)] +pub struct ChunkData { + pub files: Vec, + pub checksum: String, + pub iv: [u8; 16], +} + +#[derive(Serialize, Deserialize)] +pub struct Manifest { + pub version: String, + pub chunks: HashMap, + pub size: u64, + pub key: [u8; 16], +} + diff --git a/libraries/libarchive/Cargo.toml b/libraries/libarchive/Cargo.toml index 11e0573a..0e2eba16 100644 --- a/libraries/libarchive/Cargo.toml +++ b/libraries/libarchive/Cargo.toml @@ -3,10 +3,10 @@ name = "libarchive-drop" version = "0.1.1" authors = ["Jamie Winsor ", "Drop OSS"] license = "Apache-2.0" -repository = "https://github.com/Drop-OSS/libarchive-rust" +repository = "https://lab.droposs.org/drop-oss/drop/-/tree/develop/libraries/libarchive" description = "A safe Rust API for authoring and extracting archives with libarchive" keywords = ["libarchive", "archive", "tar", "zip"] [dependencies] libc = ">= 0.2.0" -libarchive3-sys = "0.1" +libarchive3-sys = "0.1.2" diff --git a/libraries/libarchive/tests/lib.rs b/libraries/libarchive/tests/lib.rs index d35c5373..ffbe355b 100644 --- a/libraries/libarchive/tests/lib.rs +++ b/libraries/libarchive/tests/lib.rs @@ -1,10 +1,10 @@ -extern crate libarchive; +extern crate libarchive_drop; pub mod util; -use libarchive::archive::{self, ReadFilter, ReadFormat}; -use libarchive::reader::{self, Reader}; -use libarchive::writer; +use libarchive_drop::archive::{self, ReadFilter, ReadFormat}; +use libarchive_drop::reader::{self, Reader}; +use libarchive_drop::writer; use std::fs::File; #[test] diff --git a/promo/public/gallery/store.png b/promo/public/gallery/store.png index 0270e9d8..7a594d27 100644 Binary files a/promo/public/gallery/store.png and b/promo/public/gallery/store.png differ diff --git a/promo/src/app/about/page.tsx b/promo/src/app/about/page.tsx index 57a06903..99e20f93 100644 --- a/promo/src/app/about/page.tsx +++ b/promo/src/app/about/page.tsx @@ -25,14 +25,14 @@ function Header() {

Our mission

-

+

We aim to build a "Steam-like experience for DRM-free games". One of the major sticking points of DRM games, and why platforms like Steam have done so well, is that they provide awesome features like worldwide play-together, social features, and useful overlays and tools. We aim to replicate this for any game.

-

+

Don't get us wrong, we don't think Steam or Valve is bad. They are unusually consumer-friendly, and provide a great service. They will always have a place, providing a marketplace for DRM @@ -41,16 +41,16 @@ function Header() {

The Numbers -
+
-
-
Lines of code
+
+
Lines of code
k
-
-
+
+
Individual open-source projects
@@ -59,13 +59,13 @@ function Header() {
-
Docker pulls
+
Docker pulls
k
-
Contributors
+
Contributors
> @@ -91,7 +91,7 @@ function FrequentlyAskedQuestions() {
Do you intend to replace Steam?
-
+
No. Drop is not a replacement for Steam, in the sense that we will ever offer a marketplace for developers to sell games. Drop can replace Steam for an individual, if they only played @@ -102,7 +102,7 @@ function FrequentlyAskedQuestions() {
Will Drop ever cost money or require a subscription?
-
+
We believe in paying for services, not code. All our projects are and always will be open source (AGPLv3), and we endeavour to allow users to self-host as much of it as possible. @@ -114,7 +114,7 @@ function FrequentlyAskedQuestions() {
Is Drop legal?
-
+
Yes. Officially, Drop is only for DRM-free games, like the ones you purchase from GOG or download from itch.io,{' '} and that you have a license to redistribute. We @@ -126,7 +126,7 @@ function FrequentlyAskedQuestions() {
How can I support Drop or get involved?
-
+
Thank you for helping us out! If you're looking to contribute code, check out our{' '} ) { return ( - + {children} diff --git a/promo/src/app/news/[slug]/page.tsx b/promo/src/app/news/[slug]/page.tsx index 873431a1..42380e65 100644 --- a/promo/src/app/news/[slug]/page.tsx +++ b/promo/src/app/news/[slug]/page.tsx @@ -61,7 +61,7 @@ export default async function BlogPost({ className="aspect-square size-6 rounded-full object-cover" /> )} -
{author.name}
+
{author.name}
)} { @@ -69,7 +69,7 @@ export default async function BlogPost({ {tags.map((tag) => (
{tag}
@@ -77,7 +77,7 @@ export default async function BlogPost({ } -
+
{post.image && ( -
+
404 diff --git a/promo/src/app/page.tsx b/promo/src/app/page.tsx index d07260ee..b9bf0c03 100644 --- a/promo/src/app/page.tsx +++ b/promo/src/app/page.tsx @@ -5,8 +5,8 @@ import { Footer } from '@/components/footer' import { Gradient } from '@/components/gradient' import { LogoCluster } from '@/components/logo-cluster' import { Navbar } from '@/components/navbar' -import { Screenshot } from '@/components/screenshot' import { Heading, Subheading } from '@/components/text' +import { ArrowDownCircleIcon } from '@heroicons/react/24/solid' import type { Metadata } from 'next' export const metadata: Metadata = { @@ -21,16 +21,18 @@ function Hero() {
-

+

An open Steam.

-

+

Drop is an open-source, self-hosted alternative to platforms like Steam and Epic.

- - +
@@ -42,18 +44,49 @@ function Hero() { function FeatureSection() { return ( -
- - - A better experience for DRM‑free games. - - - +
+
+
+ Drop OSS + + The ultimate self-hosted game manager. + + +

+ Drop is built from the ground up to be flexible, fast, and + beautiful. It's designed to scale with your library, and handle + thousands of games. +

+
+
+
+
+ App screenshot + +
+
+
+
+
+
{' '} +
ASDASDASDAS
+
+
+
) } @@ -132,7 +165,7 @@ export default function Home() {
-
+
diff --git a/promo/src/app/sponsors/page.tsx b/promo/src/app/sponsors/page.tsx index 5b7435a8..5e1444f4 100644 --- a/promo/src/app/sponsors/page.tsx +++ b/promo/src/app/sponsors/page.tsx @@ -26,7 +26,7 @@ function CTA() {
-

+

If you're looking to give back to the project financially - first off, thank you. It really does help a lot. There are two options for contributing: our OpenCollective, which funds @@ -45,7 +45,6 @@ function CTA() { diff --git a/promo/src/components/bento-card.tsx b/promo/src/components/bento-card.tsx index 0d1262d2..1fe8263f 100644 --- a/promo/src/components/bento-card.tsx +++ b/promo/src/components/bento-card.tsx @@ -29,28 +29,21 @@ export function BentoCard({ data-dark={dark ? 'true' : undefined} className={clsx( className, - 'group relative flex flex-col overflow-hidden rounded-lg', - 'bg-white shadow-xs ring-1 ring-black/5', - 'data-dark:bg-gray-800 data-dark:ring-white/15', + 'group relative flex flex-col overflow-hidden rounded-lg ring-1', + 'bg-zinc-900 ring-white/15', )} >

{graphic} - {fade.includes('top') && ( -
- )} - {fade.includes('bottom') && ( -
- )}
{eyebrow} -

+

{title}

-

+

{description}

diff --git a/promo/src/components/button.tsx b/promo/src/components/button.tsx index d4240c89..05d72c30 100644 --- a/promo/src/components/button.tsx +++ b/promo/src/components/button.tsx @@ -5,22 +5,22 @@ import { Link } from './link' const variants = { primary: clsx( 'inline-flex items-center justify-center px-4 py-[calc(--spacing(2)-1px)]', - 'rounded-full border border-transparent bg-gray-950 shadow-md', + 'rounded-lg border border-transparent bg-gray-950 shadow-md', 'text-base font-medium whitespace-nowrap text-white', 'data-disabled:bg-gray-950 data-disabled:opacity-40 data-hover:bg-gray-800', ), secondary: clsx( 'relative inline-flex items-center justify-center px-4 py-[calc(--spacing(2)-1px)]', - 'rounded-full border border-transparent bg-white/15 shadow-md ring-1 ring-[#D15052]/15', + 'rounded-lg border border-transparent bg-white/15 shadow-md ring-1 ring-[#D15052]/15', 'after:absolute after:inset-0 after:rounded-full after:shadow-[inset_0_0_2px_1px_#ffffff4d]', - 'text-base font-medium whitespace-nowrap text-gray-950', + 'text-base font-medium whitespace-nowrap text-zinc-100', 'data-disabled:bg-white/15 data-disabled:opacity-40 data-hover:bg-white/20', ), outline: clsx( - 'inline-flex items-center justify-center px-2 py-[calc(--spacing(1.5)-1px)]', - 'rounded-lg border border-transparent shadow-sm ring-1 ring-black/10', - 'text-sm font-medium whitespace-nowrap text-gray-950', - 'data-disabled:bg-transparent data-disabled:opacity-40 data-hover:bg-gray-50', + 'inline-flex items-center justify-center px-4 py-[calc(--spacing(1.5)-1px)]', + 'rounded-lg border border-transparent shadow-sm ring-1 ring-white/5', + 'text-sm font-medium whitespace-nowrap text-zinc-100', + 'data-disabled:bg-transparent data-disabled:opacity-40 data-hover:bg-zinc-900', ), } diff --git a/promo/src/components/comparison.tsx b/promo/src/components/comparison.tsx index fec9e2d9..38b6ad4c 100644 --- a/promo/src/components/comparison.tsx +++ b/promo/src/components/comparison.tsx @@ -39,7 +39,7 @@ function GameVaultLogo() { return (
GameVault Logo - +
GameVault+ icon +
coming soon™
) @@ -121,6 +121,7 @@ const projects: Array<{ 'Installer/setup games': true, 'Portable games': true, 'Archives support': 'All 7-zip formats', + 'Automatic import': 'Bulk-import tool', }, Metadata: { 'Additional with plugins': false, @@ -230,7 +231,7 @@ const projects: Array<{ 'Non-versioned layout': true, 'Automatic import': true, 'Archives support': 'All 7-zip formats', - 'Portable games': true + 'Portable games': true, }, Metadata: { IGDB: true, @@ -279,14 +280,14 @@ function Header() { ) } -function PricingCards() { +function ProjectCards() { return (
{projects.map((tier, tierIndex) => ( - + ))}
@@ -294,22 +295,22 @@ function PricingCards() { ) } -function PricingCard({ tier }: { tier: (typeof projects)[number] }) { +function ProjectCard({ tier }: { tier: (typeof projects)[number] }) { return ( -
+
-
+
{tier.logo()}
{tier.name} -

{tier.description}

+

{tier.description}

-

+

Key features:

    @@ -324,10 +325,10 @@ function PricingCard({ tier }: { tier: (typeof projects)[number] }) { ) } -function PricingTable({ - selectedTier: selectedProject, +function ProjectTable({ + selectedProject, }: { - selectedTier: (typeof projects)[number] + selectedProject: (typeof projects)[number] }) { function onlyUnique(value: T, index: number, array: Array) { return array.indexOf(value) === index @@ -385,7 +386,7 @@ function PricingTable({ {selectedProject.name} - + -
    +
    {section}
    @@ -452,11 +453,11 @@ function PricingTable({ {features[section].map((name) => ( {name} @@ -488,7 +489,7 @@ function PricingTable({ ) : ( -
    {value}
    +
    {value}
    )} ) @@ -514,10 +515,10 @@ function FeatureItem({ return (
  • - + {disabled && Coming soon:} {description} @@ -553,8 +554,8 @@ export default function Pricing() {
    - - + +
) diff --git a/promo/src/components/downloads.tsx b/promo/src/components/downloads.tsx index 88b38e9c..fdd0a48d 100644 --- a/promo/src/components/downloads.tsx +++ b/promo/src/components/downloads.tsx @@ -226,14 +226,14 @@ function DownloadCard({ return (
-
+
{data.icon()} {data.name}
-

+

{data.description}

@@ -266,11 +266,11 @@ export default function DownloadCards() {
-