From 43ba5b50ae099ad5d7b05f24cfcdb1143354336d Mon Sep 17 00:00:00 2001 From: Felix Date: Sun, 12 Apr 2026 16:04:08 +0200 Subject: [PATCH 1/2] Fix compatibility with current Pumpkin nightlies --- .github/workflows/rust.yml | 25 +- README.md | 3 +- build.sh | 1 + java/gradle/wrapper/gradle-wrapper.properties | 2 +- java/patchbukkit/build.gradle.kts | 19 +- rust/Cargo.lock | 2009 +++++++++++++++-- rust/Cargo.toml | 3 + rust/build/main.rs | 4 +- rust/build/protobufs.rs | 7 + rust/build/pumpkin.rs | 64 + rust/src/commands/mod.rs | 4 +- rust/src/directories.rs | 6 +- rust/src/java/plugin/command_manager.rs | 89 +- rust/src/java/resources.rs | 141 +- rust/src/lib.rs | 8 + 15 files changed, 2031 insertions(+), 354 deletions(-) create mode 100644 rust/build/pumpkin.rs diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 075b634..f7112bf 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -20,10 +20,6 @@ jobs: with: java-version: "25" distribution: "temurin" - - name: Install Protoc - uses: arduino/setup-protoc@v3 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - name: Setup Gradle uses: gradle/actions/setup-gradle@v5 - name: Build JAR with Gradle @@ -82,10 +78,9 @@ jobs: with: name: patchbukkit-jar path: java/patchbukkit/build/libs/ - - name: Install Protoc - uses: arduino/setup-protoc@v3 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} + - name: Sync Pumpkin dependencies + run: cargo update -p pumpkin -p pumpkin-api-macros -p pumpkin-data -p pumpkin-protocol -p pumpkin-util + working-directory: rust - name: Clippy (debug) run: cargo clippy --all-targets --all-features working-directory: rust @@ -108,10 +103,9 @@ jobs: with: name: patchbukkit-jar path: java/patchbukkit/build/libs/ - - name: Install Protoc - uses: arduino/setup-protoc@v3 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} + - name: Sync Pumpkin dependencies + run: cargo update -p pumpkin -p pumpkin-api-macros -p pumpkin-data -p pumpkin-protocol -p pumpkin-util + working-directory: rust - name: Clippy (release) run: cargo clippy --release --all-targets --all-features working-directory: rust @@ -142,10 +136,9 @@ jobs: with: name: patchbukkit-jar path: java/patchbukkit/build/libs/ - - name: Install Protoc - uses: arduino/setup-protoc@v3 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} + - name: Sync Pumpkin dependencies + run: cargo update -p pumpkin -p pumpkin-api-macros -p pumpkin-data -p pumpkin-protocol -p pumpkin-util + working-directory: rust - name: Build Release shell: bash run: | diff --git a/README.md b/README.md index 5e31f75..e00b52a 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,7 @@ If you wish to contribute to PatchBukkit, follow the following steps: > Your PumpkinMC server must be built with the same nightly toolchain as PatchBukkit. 1. Run `./build.sh` -2. Copy the `target/debug/patchbukkit` binary to the `plugins` directory in your PumpkinMC server. +2. Copy the generated native library from `rust/target/debug/` (or `rust/target/release/`) to your PumpkinMC `plugins/` directory. +3. Start Pumpkin once to create the `patchbukkit/` directory in your server root, then place your `.jar` plugins in `patchbukkit/patchbukkit-plugins/`. There is also an [architecture guide](https://github.com/Pumpkin-MC/PatchBukkit/blob/master/ARCHITECTURE.md) available. diff --git a/build.sh b/build.sh index 94066e0..d3b72d4 100755 --- a/build.sh +++ b/build.sh @@ -2,4 +2,5 @@ cd java ./gradlew jar cd .. cd rust +cargo update -p pumpkin -p pumpkin-api-macros -p pumpkin-data -p pumpkin-protocol -p pumpkin-util cargo build diff --git a/java/gradle/wrapper/gradle-wrapper.properties b/java/gradle/wrapper/gradle-wrapper.properties index 37f78a6..5c5334e 100644 --- a/java/gradle/wrapper/gradle-wrapper.properties +++ b/java/gradle/wrapper/gradle-wrapper.properties @@ -1,7 +1,7 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists distributionUrl=https\://services.gradle.org/distributions/gradle-9.3.1-bin.zip -networkTimeout=10000 +networkTimeout=120000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/java/patchbukkit/build.gradle.kts b/java/patchbukkit/build.gradle.kts index 901b1df..980d9bb 100644 --- a/java/patchbukkit/build.gradle.kts +++ b/java/patchbukkit/build.gradle.kts @@ -45,7 +45,7 @@ repositories { } dependencies { - compileOnly("io.papermc.paper:paper-api:1.21.11-R0.1-SNAPSHOT") + implementation("io.papermc.paper:paper-api:1.21.11-R0.1-SNAPSHOT") implementation("net.sf.jopt-simple:jopt-simple:6.0-alpha-3") implementation("io.github.astonbitecode:j4rs:0.24.0") implementation("org.apache.maven:maven-resolver-provider:3.9.6") @@ -69,3 +69,20 @@ tasks.withType { "-Xlint:-deprecation" )) } + +tasks.named("jar") { + duplicatesStrategy = DuplicatesStrategy.EXCLUDE + dependsOn(configurations.runtimeClasspath) + + from({ + configurations.runtimeClasspath.get() + .filter { it.name.endsWith(".jar") } + .map { zipTree(it) } + }) + + exclude( + "META-INF/*.SF", + "META-INF/*.DSA", + "META-INF/*.RSA" + ) +} diff --git a/rust/Cargo.lock b/rust/Cargo.lock index 7590295..31e483e 100644 --- a/rust/Cargo.lock +++ b/rust/Cargo.lock @@ -8,7 +8,16 @@ version = "0.25.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5d307320b3181d6d7954e663bd7c774a838b8220fe0593c86d9fb09f498b4b" dependencies = [ - "gimli", + "gimli 0.32.3", +] + +[[package]] +name = "addr2line" +version = "0.26.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59317f77929f0e679d39364702289274de2f0f0b22cbf50b2b8cff2169a0b27a" +dependencies = [ + "gimli 0.33.1", ] [[package]] @@ -50,6 +59,27 @@ dependencies = [ "memchr", ] +[[package]] +name = "allocator-api2" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" + +[[package]] +name = "ambient-authority" +version = "0.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9d4ee0d472d1cd2e28c97dfa124b3d8d992e10eb0a035f33f5d12e3a177ba3b" + +[[package]] +name = "android_system_properties" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" +dependencies = [ + "libc", +] + [[package]] name = "annotate-snippets" version = "0.12.12" @@ -117,11 +147,17 @@ version = "1.0.102" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f202df86484c868dbad7eaa557ef785d5c66295e41b460ef922eca0723b842c" +[[package]] +name = "arbitrary" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3d036a3c4ab069c7b410a2ce876bd74808d2d0888a82667669f8e783a898bf1" + [[package]] name = "arc-swap" -version = "1.8.2" +version = "1.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9f3647c145568cec02c42054e07bdf9a5a698e15b466fb2341bfc393cd24aa5" +checksum = "6a3a1fd6f75306b68087b831f025c712524bcb19aad54e557b1129cfa0a2b207" dependencies = [ "rustversion", ] @@ -144,6 +180,17 @@ dependencies = [ "tokio", ] +[[package]] +name = "async-trait" +version = "0.1.89" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9035ad2d096bed7955a320ee7e2230574d28fd3c3a0f186cbea1ff3c7eed5dbb" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "atomic" version = "0.6.1" @@ -153,6 +200,15 @@ dependencies = [ "bytemuck", ] +[[package]] +name = "atomic-polyfill" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8cf2bce30dfe09ef0bfaef228b9d414faaf7e563035494d7fe092dba54b300f4" +dependencies = [ + "critical-section", +] + [[package]] name = "autocfg" version = "1.5.0" @@ -165,11 +221,11 @@ version = "0.3.76" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bb531853791a215d7c62a30daf0dde835f381ab5de4589cfe7c649d2cbe92bd6" dependencies = [ - "addr2line", + "addr2line 0.25.1", "cfg-if", "libc", "miniz_oxide", - "object", + "object 0.37.3", "rustc-demangle", "windows-link", ] @@ -213,6 +269,15 @@ version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "843867be96c8daad0d758b57df9392b6d8d271134fce549de6ce169ff98a92af" +[[package]] +name = "bitmaps" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "031043d04099746d8db04daf1fa424b2bc8bd69d92b25962dcde24da39ab64a2" +dependencies = [ + "typenum", +] + [[package]] name = "block-buffer" version = "0.10.4" @@ -236,6 +301,9 @@ name = "bumpalo" version = "3.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5d20789868f4b01b2f2caec9f5c4e0213b41e3e5702a50157d699ae31ced2fcb" +dependencies = [ + "allocator-api2", +] [[package]] name = "bytemuck" @@ -243,6 +311,12 @@ version = "1.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c8efb64bd706a16a1bdde310ae86b351e4d21550d98d056f22f8a7f7a2183fec" +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + [[package]] name = "bytes" version = "1.11.1" @@ -258,6 +332,84 @@ dependencies = [ "libbz2-rs-sys", ] +[[package]] +name = "cap-fs-ext" +version = "3.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5528f85b1e134ae811704e41ef80930f56e795923f866813255bc342cc20654" +dependencies = [ + "cap-primitives", + "cap-std", + "io-lifetimes", + "windows-sys 0.59.0", +] + +[[package]] +name = "cap-net-ext" +version = "3.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20a158160765c6a7d0d8c072a53d772e4cb243f38b04bfcf6b4939cfbe7482e7" +dependencies = [ + "cap-primitives", + "cap-std", + "rustix 1.1.4", + "smallvec 1.15.1", +] + +[[package]] +name = "cap-primitives" +version = "3.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6cf3aea8a5081171859ef57bc1606b1df6999df4f1110f8eef68b30098d1d3a" +dependencies = [ + "ambient-authority", + "fs-set-times", + "io-extras", + "io-lifetimes", + "ipnet", + "maybe-owned", + "rustix 1.1.4", + "rustix-linux-procfs", + "windows-sys 0.59.0", + "winx", +] + +[[package]] +name = "cap-rand" +version = "3.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8144c22e24bbcf26ade86cb6501a0916c46b7e4787abdb0045a467eb1645a1d" +dependencies = [ + "ambient-authority", + "rand 0.8.5", +] + +[[package]] +name = "cap-std" +version = "3.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6dc3090992a735d23219de5c204927163d922f42f575a0189b005c62d37549a" +dependencies = [ + "cap-primitives", + "io-extras", + "io-lifetimes", + "rustix 1.1.4", +] + +[[package]] +name = "cap-time-ext" +version = "3.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "def102506ce40c11710a9b16e614af0cde8e76ae51b1f48c04b8d79f4b671a80" +dependencies = [ + "ambient-authority", + "cap-primitives", + "iana-time-zone", + "once_cell", + "rustix 1.1.4", + "winx", +] + [[package]] name = "castaway" version = "0.2.4" @@ -317,6 +469,19 @@ dependencies = [ "rand_core 0.10.0", ] +[[package]] +name = "chrono" +version = "0.4.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c673075a2e0e5f4a1dde27ce9dee1ea4558c7ffe648f576438a20ca1d2acc4b0" +dependencies = [ + "iana-time-zone", + "js-sys", + "num-traits", + "wasm-bindgen", + "windows-link", +] + [[package]] name = "cipher" version = "0.4.4" @@ -342,6 +507,15 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "de0758edba32d61d1fd9f4d69491b47604b91ee2f7e6b33de7e54ca4ebe55dc3" +[[package]] +name = "cobs" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fa961b519f0b462e3a3b4a34b64d119eeaca1d59af726fe450bbba07a9fc0a1" +dependencies = [ + "thiserror 2.0.18", +] + [[package]] name = "colorchoice" version = "1.0.4" @@ -434,6 +608,21 @@ dependencies = [ "url", ] +[[package]] +name = "core-foundation-sys" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" + +[[package]] +name = "cpp_demangle" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2bb79cb74d735044c972aae58ed0aaa9a837e85b01106a54c39e42e97f62253" +dependencies = [ + "cfg-if", +] + [[package]] name = "cpubits" version = "0.1.0" @@ -458,6 +647,148 @@ dependencies = [ "libc", ] +[[package]] +name = "cranelift-assembler-x64" +version = "0.130.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "046d4b584c3bb9b5eb500c8f29549bec36be11000f1ba2a927cef3d1a9875691" +dependencies = [ + "cranelift-assembler-x64-meta", +] + +[[package]] +name = "cranelift-assembler-x64-meta" +version = "0.130.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9b194a7870becb1490366fc0ae392ccd188065ff35f8391e77ac659db6fb977" +dependencies = [ + "cranelift-srcgen", +] + +[[package]] +name = "cranelift-bforest" +version = "0.130.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb6a4ab44c6b371e661846b97dab687387a60ac4e2f864e2d4257284aad9e889" +dependencies = [ + "cranelift-entity", + "wasmtime-internal-core", +] + +[[package]] +name = "cranelift-bitset" +version = "0.130.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8b7a44150c2f471a94023482bda1902710746e4bed9f9973d60c5a94319b06d" +dependencies = [ + "serde", + "serde_derive", + "wasmtime-internal-core", +] + +[[package]] +name = "cranelift-codegen" +version = "0.130.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01b06598133b1dd76758b8b95f8d6747c124124aade50cea96a3d88b962da9fa" +dependencies = [ + "bumpalo", + "cranelift-assembler-x64", + "cranelift-bforest", + "cranelift-bitset", + "cranelift-codegen-meta", + "cranelift-codegen-shared", + "cranelift-control", + "cranelift-entity", + "cranelift-isle", + "gimli 0.33.1", + "hashbrown 0.16.1", + "libm", + "log", + "pulley-interpreter", + "regalloc2", + "rustc-hash", + "serde", + "smallvec 1.15.1", + "target-lexicon", + "wasmtime-internal-core", +] + +[[package]] +name = "cranelift-codegen-meta" +version = "0.130.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6190e2e7bcf0a678da2f715363d34ed530fedf7a2f0ab75edaefef72a70465ff" +dependencies = [ + "cranelift-assembler-x64-meta", + "cranelift-codegen-shared", + "cranelift-srcgen", + "heck", + "pulley-interpreter", +] + +[[package]] +name = "cranelift-codegen-shared" +version = "0.130.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f583cf203d1aa8b79560e3b01f929bdacf9070b015eec4ea9c46e22a3f83e4a0" + +[[package]] +name = "cranelift-control" +version = "0.130.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "803159df35cc398ae54473c150b16d6c77e92ab2948be638488de126a3328fbc" +dependencies = [ + "arbitrary", +] + +[[package]] +name = "cranelift-entity" +version = "0.130.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3109e417257082d88087f5bcce677525bdaa8322b88dd7f175ed1a1fd41d546c" +dependencies = [ + "cranelift-bitset", + "serde", + "serde_derive", + "wasmtime-internal-core", +] + +[[package]] +name = "cranelift-frontend" +version = "0.130.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14db6b0e0e4994c581092df78d837be2072578f7cb2528f96a6cf895e56dee63" +dependencies = [ + "cranelift-codegen", + "log", + "smallvec 1.15.1", + "target-lexicon", +] + +[[package]] +name = "cranelift-isle" +version = "0.130.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec66ea5025c7317383699778282ac98741d68444f956e3b1d7b62f12b7216e67" + +[[package]] +name = "cranelift-native" +version = "0.130.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "373ade56438e6232619d85678477d0a88a31b3581936e0503e61e96b546b0800" +dependencies = [ + "cranelift-codegen", + "libc", + "target-lexicon", +] + +[[package]] +name = "cranelift-srcgen" +version = "0.130.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef53619d3cd5c78fd998c6d9420547af26b72e6456f94c2a8a2334cb76b42baa" + [[package]] name = "crc" version = "3.3.0" @@ -480,7 +811,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e75b2483e97a5a7da73ac68a05b629f9c53cff58d8ed1c77866079e18b00dba5" dependencies = [ "digest 0.10.7", - "spin", + "spin 0.10.0", ] [[package]] @@ -492,6 +823,12 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "critical-section" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "790eea4361631c5e7d22598ecd5723ff611904e3344ce8720784c93e3d83d40b" + [[package]] name = "crossbeam" version = "0.8.4" @@ -550,9 +887,9 @@ checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" [[package]] name = "crossfire" -version = "3.1.4" +version = "3.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fb12e9c05ae4854f743f0acec2f817148ba59a902484f6aa298d4fc7df2fac4" +checksum = "e0042e53977a94d5d10de04ce7eb6016aa212c08e83ea202f7a9f102ff104303" dependencies = [ "crossbeam-utils", "futures-core", @@ -574,9 +911,9 @@ dependencies = [ [[package]] name = "crypto-bigint" -version = "0.7.0-rc.28" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96dacf199529fb801ae62a9aafdc01b189e9504c0d1ee1512a4c16bcd8666a93" +checksum = "42a0d26b245348befa0c121944541476763dcc46ede886c88f9d12e1697d27c3" dependencies = [ "cpubits", "ctutils", @@ -607,11 +944,11 @@ dependencies = [ [[package]] name = "crypto-primes" -version = "0.7.0-pre.9" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6081ce8b60c0e533e2bba42771b94eb6149052115f4179744d5779883dc98583" +checksum = "21f41f23de7d24cdbda7f0c4d9c0351f99a4ceb258ef30e5c1927af8987ffe5a" dependencies = [ - "crypto-bigint 0.7.0-rc.28", + "crypto-bigint 0.7.3", "libm", "rand_core 0.10.0", ] @@ -674,6 +1011,15 @@ dependencies = [ "parking_lot_core", ] +[[package]] +name = "debugid" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef552e6f588e446098f6ba40d89ac146c8c7b64aade83c051ee00bb5d2bc18d" +dependencies = [ + "uuid", +] + [[package]] name = "deflate64" version = "0.1.11" @@ -725,9 +1071,9 @@ dependencies = [ [[package]] name = "digest" -version = "0.11.1" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "285743a676ccb6b3e116bc14cc69319b957867930ae9c4822f8e0f54509d7243" +checksum = "4850db49bf08e663084f7fb5c87d202ef91a3907271aff24a94eb97ff039153c" dependencies = [ "block-buffer 0.12.0", "const-oid 0.10.2", @@ -735,6 +1081,16 @@ dependencies = [ "ctutils", ] +[[package]] +name = "directories-next" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "339ee130d97a610ea5a5872d2bbb130fdf68884ff09d3028b81bec8a1ac23bbc" +dependencies = [ + "cfg-if", + "dirs-sys-next", +] + [[package]] name = "dirs" version = "6.0.0" @@ -752,10 +1108,21 @@ checksum = "e01a3366d27ee9890022452ee61b2b63a67e6f13f58900b651ff5665f0bb1fab" dependencies = [ "libc", "option-ext", - "redox_users", + "redox_users 0.5.2", "windows-sys 0.61.2", ] +[[package]] +name = "dirs-sys-next" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" +dependencies = [ + "libc", + "redox_users 0.4.6", + "winapi", +] + [[package]] name = "displaydoc" version = "0.2.5" @@ -823,6 +1190,18 @@ dependencies = [ "zeroize", ] +[[package]] +name = "embedded-io" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef1a6892d9eef45c8fa6b9e0086428a2cca8491aca8f787c534a3d6d0bcb3ced" + +[[package]] +name = "embedded-io" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edd0f118536f44f5ccd48bcb8b111bdc3de888b58c74639dfb034a357d0f206d" + [[package]] name = "encoding_rs" version = "0.8.35" @@ -843,9 +1222,9 @@ dependencies = [ [[package]] name = "endian-type" -version = "0.1.2" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c34f04666d835ff5d62e058c3995147c06f42fe86ff053337632bca83e42702d" +checksum = "869b0adbda23651a9c5c0c3d270aac9fcb52e8622a8f2b17e57802d7791962f2" [[package]] name = "enum_dispatch" @@ -917,7 +1296,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ce92ff622d6dadf7349484f42c93271a0d49b7cc4d466a936405bacbe10aa78" dependencies = [ "cfg-if", - "rustix", + "rustix 1.1.4", "windows-sys 0.59.0", ] @@ -949,6 +1328,12 @@ version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582" +[[package]] +name = "fixedbitset" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" + [[package]] name = "fixedbitset" version = "0.5.7" @@ -978,6 +1363,12 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" +[[package]] +name = "foldhash" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb" + [[package]] name = "form_urlencoded" version = "1.2.2" @@ -987,6 +1378,17 @@ dependencies = [ "percent-encoding", ] +[[package]] +name = "fs-set-times" +version = "0.20.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94e7099f6313ecacbe1256e8ff9d617b75d1bcb16a6fddef94866d225a01a14a" +dependencies = [ + "io-lifetimes", + "rustix 1.1.4", + "windows-sys 0.59.0", +] + [[package]] name = "fs_extra" version = "1.3.0" @@ -1081,6 +1483,20 @@ dependencies = [ "slab", ] +[[package]] +name = "fxprof-processed-profile" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25234f20a3ec0a962a61770cfe39ecf03cb529a6e474ad8cff025ed497eda557" +dependencies = [ + "bitflags", + "debugid", + "rustc-hash", + "serde", + "serde_derive", + "serde_json", +] + [[package]] name = "garde" version = "0.22.1" @@ -1160,14 +1576,26 @@ 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 = "group" -version = "0.13.0" +name = "gimli" +version = "0.33.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19e16c5073773ccf057c282be832a59ee53ef5ff98db3aeff7f8314f52ffc196" +dependencies = [ + "fnv", + "hashbrown 0.16.1", + "indexmap", + "stable_deref_trait", +] + +[[package]] +name = "glob" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0cc23270f6e1808e30a928bdc84dea0b9b4136a8bc82338574f23baf47bbd280" + +[[package]] +name = "group" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" dependencies = [ @@ -1176,6 +1604,15 @@ dependencies = [ "subtle", ] +[[package]] +name = "hash32" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0c35f58762feb77d74ebe43bdbc3210f09be9fe6742234d573bacc26ed92b67" +dependencies = [ + "byteorder", +] + [[package]] name = "hashbrown" version = "0.14.5" @@ -1188,7 +1625,7 @@ version = "0.15.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" dependencies = [ - "foldhash", + "foldhash 0.1.5", ] [[package]] @@ -1196,6 +1633,25 @@ name = "hashbrown" version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" +dependencies = [ + "foldhash 0.2.0", + "serde", + "serde_core", +] + +[[package]] +name = "heapless" +version = "0.7.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdc6457c0eb62c71aac4bc17216026d8410337c4126773b9c5daba343f17964f" +dependencies = [ + "atomic-polyfill", + "hash32", + "rustc_version", + "serde", + "spin 0.9.8", + "stable_deref_trait", +] [[package]] name = "heck" @@ -1229,11 +1685,11 @@ dependencies = [ [[package]] name = "hmac" -version = "0.13.0-rc.5" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef451d73f36d8a3f93ad32c332ea01146c9650e1ec821a9b0e46c01277d544f8" +checksum = "6303bc9732ae41b04cb554b844a762b4115a61bfaa81e3e83050991eeb56863f" dependencies = [ - "digest 0.11.1", + "digest 0.11.2", ] [[package]] @@ -1270,6 +1726,30 @@ dependencies = [ "typenum", ] +[[package]] +name = "iana-time-zone" +version = "0.1.65" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e31bc9ad994ba00e440a8aa5c9ef0ec67d5cb5e5cb0cc7f8b744a35b389cc470" +dependencies = [ + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "log", + "wasm-bindgen", + "windows-core", +] + +[[package]] +name = "iana-time-zone-haiku" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" +dependencies = [ + "cc", +] + [[package]] name = "icu_collections" version = "2.1.1" @@ -1384,6 +1864,20 @@ dependencies = [ "icu_properties", ] +[[package]] +name = "im-rc" +version = "15.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af1955a75fa080c677d3972822ec4bad316169ab1cfc6c257a942c2265dbe5fe" +dependencies = [ + "bitmaps", + "rand_core 0.6.4", + "rand_xoshiro", + "sized-chunks", + "typenum", + "version_check", +] + [[package]] name = "indexmap" version = "2.13.0" @@ -1405,6 +1899,28 @@ dependencies = [ "generic-array", ] +[[package]] +name = "io-extras" +version = "0.18.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2285ddfe3054097ef4b2fe909ef8c3bcd1ea52a8f0d274416caebeef39f04a65" +dependencies = [ + "io-lifetimes", + "windows-sys 0.59.0", +] + +[[package]] +name = "io-lifetimes" +version = "2.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06432fb54d3be7964ecd3649233cddf80db2832f47fec34c01f65b3d9d774983" + +[[package]] +name = "ipnet" +version = "2.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d98f6fed1fde3f8c21bc40a1abb88dd75e67924f9cffc3ef95607bad8017f8e2" + [[package]] name = "is_ci" version = "1.2.0" @@ -1432,6 +1948,26 @@ version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "92ecc6618181def0457392ccd0ee51198e065e016d1d527a7ac1b6dc7c1f09d2" +[[package]] +name = "ittapi" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b996fe614c41395cdaedf3cf408a9534851090959d90d54a535f675550b64b1" +dependencies = [ + "anyhow", + "ittapi-sys", + "log", +] + +[[package]] +name = "ittapi-sys" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52f5385394064fa2c886205dba02598013ce83d3e92d33dbdc0c52fe0e7bf4fc" +dependencies = [ + "cc", +] + [[package]] name = "j4rs" version = "0.24.0" @@ -1529,6 +2065,12 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" +[[package]] +name = "leb128" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67" + [[package]] name = "leb128fmt" version = "0.1.0" @@ -1543,9 +2085,9 @@ checksum = "2c4a545a15244c7d945065b5d392b2d2d7f21526fba56ce51467b06ed445e8f7" [[package]] name = "libc" -version = "0.2.182" +version = "0.2.184" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6800badb6cb2082ffd7b6a67e6125bb39f18782f793520caee8cb8846be06112" +checksum = "48f5d2a454e16a5ea0f4ced81bd44e4cfc7bd3a507b61887c99fd3538b28e4af" [[package]] name = "libloading" @@ -1582,6 +2124,12 @@ dependencies = [ "libc", ] +[[package]] +name = "linux-raw-sys" +version = "0.4.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" + [[package]] name = "linux-raw-sys" version = "0.12.1" @@ -1641,15 +2189,30 @@ dependencies = [ "sha2 0.10.9", ] +[[package]] +name = "mach2" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d640282b302c0bb0a2a8e0233ead9035e3bed871f0b7e81fe4a1ec829765db44" +dependencies = [ + "libc", +] + [[package]] name = "matchers" -version = "0.1.0" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" +checksum = "d1525a2a28c7f4fa0fc98bb91ae755d1e2d1505079e05539e35bc876b5d65ae9" dependencies = [ - "regex-automata 0.1.10", + "regex-automata", ] +[[package]] +name = "maybe-owned" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4facc753ae494aeb6e3c22f839b158aebd4f9270f55cd3c79906c45476c47ab4" + [[package]] name = "md-5" version = "0.10.6" @@ -1672,6 +2235,15 @@ version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79" +[[package]] +name = "memfd" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad38eb12aea514a0466ea40a80fd8cc83637065948eb4a426e4aa46261175227" +dependencies = [ + "rustix 1.1.4", +] + [[package]] name = "miette" version = "7.6.0" @@ -1714,9 +2286,9 @@ dependencies = [ [[package]] name = "mio" -version = "1.1.1" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a69bcab0ad47271a0234d9422b131806bf3968021e5dc9328caf2d4cd58557fc" +checksum = "50b7e5b27aa02a74bac8c3f23f448f8d87ff11f92d3aac1a6ed369ee08cc56c1" dependencies = [ "libc", "wasi", @@ -1740,9 +2312,9 @@ dependencies = [ [[package]] name = "nix" -version = "0.30.1" +version = "0.31.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74523f3a35e05aba87a1d978330aef40f67b0304ac79c1c00b294c9830543db6" +checksum = "5d6d0705320c1e6ba1d912b5e37cf18071b6c2e9b7fa8215a1e8a7651966f5d3" dependencies = [ "bitflags", "cfg-if", @@ -1757,15 +2329,23 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2bf50223579dc7cdcfb3bfcacf7069ff68243f8c363f62ffa99cf000a6b9c451" [[package]] -name = "nu-ansi-term" -version = "0.46.0" +name = "ntapi" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" +checksum = "c3b335231dfd352ffb0f8017f3b6027a4917f7df785ea2143d8af2adc66980ae" dependencies = [ - "overload", "winapi", ] +[[package]] +name = "nu-ansi-term" +version = "0.50.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5" +dependencies = [ + "windows-sys 0.61.2", +] + [[package]] name = "num-bigint" version = "0.4.6" @@ -1821,6 +2401,34 @@ dependencies = [ "libc", ] +[[package]] +name = "num_threads" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c7398b9c8b70908f6371f47ed36737907c87c52af34c268fed0bf0ceb92ead9" +dependencies = [ + "libc", +] + +[[package]] +name = "objc2-core-foundation" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a180dd8642fa45cdb7dd721cd4c11b1cadd4929ce112ebd8b9f5803cc79d536" +dependencies = [ + "bitflags", +] + +[[package]] +name = "objc2-io-kit" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33fafba39597d6dc1fb709123dfa8289d39406734be322956a69f0931c73bb15" +dependencies = [ + "libc", + "objc2-core-foundation", +] + [[package]] name = "object" version = "0.37.3" @@ -1830,6 +2438,18 @@ dependencies = [ "memchr", ] +[[package]] +name = "object" +version = "0.38.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "271638cd5fa9cca89c4c304675ca658efc4e64a66c716b7cfe1afb4b9611dbbc" +dependencies = [ + "crc32fast", + "hashbrown 0.16.1", + "indexmap", + "memchr", +] + [[package]] name = "once_cell" version = "1.21.3" @@ -1848,12 +2468,6 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" -[[package]] -name = "overload" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" - [[package]] name = "owo-colors" version = "4.3.0" @@ -1906,6 +2520,7 @@ dependencies = [ "log", "prost", "prost-build", + "protoc-bin-vendored", "pumpkin", "pumpkin-api-macros", "pumpkin-data", @@ -1917,7 +2532,7 @@ dependencies = [ "serde-saphyr", "serde_json", "tokio", - "toml", + "toml 1.1.2+spec-1.1.0", "tracing", "uuid", "walkdir", @@ -1958,13 +2573,23 @@ version = "2.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" +[[package]] +name = "petgraph" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db" +dependencies = [ + "fixedbitset 0.4.2", + "indexmap", +] + [[package]] name = "petgraph" version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8701b58ea97060d5e5b155d383a69952a60943f0e6dfe30b04c287beb0b27455" dependencies = [ - "fixedbitset", + "fixedbitset 0.5.7", "hashbrown 0.15.5", "indexmap", ] @@ -2069,6 +2694,40 @@ dependencies = [ "portable-atomic", ] +[[package]] +name = "postcard" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6764c3b5dd454e283a30e6dfe78e9b31096d9e32036b5d1eaac7a6119ccb9a24" +dependencies = [ + "cobs", + "embedded-io 0.4.0", + "embedded-io 0.6.1", + "heapless", + "serde", +] + +[[package]] +name = "postcard-derive" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0232bd009a197ceec9cc881ba46f727fcd8060a2d8d6a9dde7a69030a6fe2bb" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "postcard-schema" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9475666d89f42231a0a57da32d5f6ca7f9b5cd4c335ea1fe8f3278215b7a21ff" +dependencies = [ + "postcard-derive", + "serde", +] + [[package]] name = "potential_utf" version = "0.1.4" @@ -2090,6 +2749,15 @@ version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "efca4c95a19a79d1c98f791f10aebd5c1363b473244630bb7dbde1dc98455a24" +[[package]] +name = "ppv-lite86" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" +dependencies = [ + "zerocopy", +] + [[package]] name = "prettyplease" version = "0.2.37" @@ -2160,7 +2828,7 @@ dependencies = [ "itertools", "log", "multimap", - "petgraph", + "petgraph 0.8.3", "prettyplease", "prost", "prost-types", @@ -2191,21 +2859,111 @@ dependencies = [ "prost", ] +[[package]] +name = "protoc-bin-vendored" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1c381df33c98266b5f08186583660090a4ffa0889e76c7e9a5e175f645a67fa" +dependencies = [ + "protoc-bin-vendored-linux-aarch_64", + "protoc-bin-vendored-linux-ppcle_64", + "protoc-bin-vendored-linux-s390_64", + "protoc-bin-vendored-linux-x86_32", + "protoc-bin-vendored-linux-x86_64", + "protoc-bin-vendored-macos-aarch_64", + "protoc-bin-vendored-macos-x86_64", + "protoc-bin-vendored-win32", +] + +[[package]] +name = "protoc-bin-vendored-linux-aarch_64" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c350df4d49b5b9e3ca79f7e646fde2377b199e13cfa87320308397e1f37e1a4c" + +[[package]] +name = "protoc-bin-vendored-linux-ppcle_64" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a55a63e6c7244f19b5c6393f025017eb5d793fd5467823a099740a7a4222440c" + +[[package]] +name = "protoc-bin-vendored-linux-s390_64" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1dba5565db4288e935d5330a07c264a4ee8e4a5b4a4e6f4e83fad824cc32f3b0" + +[[package]] +name = "protoc-bin-vendored-linux-x86_32" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8854774b24ee28b7868cd71dccaae8e02a2365e67a4a87a6cd11ee6cdbdf9cf5" + +[[package]] +name = "protoc-bin-vendored-linux-x86_64" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b38b07546580df720fa464ce124c4b03630a6fb83e05c336fea2a241df7e5d78" + +[[package]] +name = "protoc-bin-vendored-macos-aarch_64" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89278a9926ce312e51f1d999fee8825d324d603213344a9a706daa009f1d8092" + +[[package]] +name = "protoc-bin-vendored-macos-x86_64" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81745feda7ccfb9471d7a4de888f0652e806d5795b61480605d4943176299756" + +[[package]] +name = "protoc-bin-vendored-win32" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95067976aca6421a523e491fce939a3e65249bac4b977adee0ee9771568e8aa3" + +[[package]] +name = "pulley-interpreter" +version = "43.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "010dec3755eb61b2f1051ecb3611b718460b7a74c131e474de2af20a845938af" +dependencies = [ + "cranelift-bitset", + "log", + "pulley-macros", + "wasmtime-internal-core", +] + +[[package]] +name = "pulley-macros" +version = "43.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad360c32e85ca4b083ac0e2b6856e8f11c3d5060dafa7d5dc57b370857fa3018" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "pumpkin" -version = "0.1.0-dev+1.21.11" -source = "git+https://github.com/Pumpkin-MC/Pumpkin.git?branch=master#552d7b8d497132ae6f54bbc592b83eba3cd1130a" +version = "0.1.0-dev+26.1" +source = "git+https://github.com/Pumpkin-MC/Pumpkin.git?branch=master#988ef8764f0dadd094313122e8f57f57ce97f468" dependencies = [ "arc-swap", "base64", + "bitflags", "bytes", + "chrono", "crossbeam", "flate2", "futures", - "hmac 0.13.0-rc.5", + "hmac 0.13.0", "libloading 0.9.0", "num-bigint", "pkcs8 0.11.0-rc.11", + "postcard", "pumpkin-config", "pumpkin-data", "pumpkin-inventory", @@ -2217,25 +2975,31 @@ dependencies = [ "rand 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "rsa", "rustc-hash", + "rustc_version_runtime", "rustyline", "serde", "serde_json", - "sha1 0.11.0-rc.5", - "sha2 0.11.0-rc.5", - "thiserror", + "sha1 0.11.0", + "sha2 0.11.0", + "sysinfo", + "thiserror 2.0.18", "time", "tokio", "tokio-util", "tracing", + "tracing-serde-structured", "tracing-subscriber", "ureq", "uuid", + "wasmparser 0.246.2", + "wasmtime", + "wasmtime-wasi", ] [[package]] name = "pumpkin-api-macros" -version = "0.1.0-dev+1.21.11" -source = "git+https://github.com/Pumpkin-MC/Pumpkin.git?branch=master#552d7b8d497132ae6f54bbc592b83eba3cd1130a" +version = "0.1.0-dev+26.1" +source = "git+https://github.com/Pumpkin-MC/Pumpkin.git?branch=master#988ef8764f0dadd094313122e8f57f57ce97f468" dependencies = [ "proc-macro-error2", "proc-macro2", @@ -2243,49 +3007,61 @@ dependencies = [ "syn", ] +[[package]] +name = "pumpkin-codecs" +version = "0.1.0-dev+26.1" +source = "git+https://github.com/Pumpkin-MC/Pumpkin.git?branch=master#988ef8764f0dadd094313122e8f57f57ce97f468" +dependencies = [ + "dashmap", + "either", + "serde_json", + "tracing", +] + [[package]] name = "pumpkin-config" -version = "0.1.0-dev+1.21.11" -source = "git+https://github.com/Pumpkin-MC/Pumpkin.git?branch=master#552d7b8d497132ae6f54bbc592b83eba3cd1130a" +version = "0.1.0-dev+26.1" +source = "git+https://github.com/Pumpkin-MC/Pumpkin.git?branch=master#988ef8764f0dadd094313122e8f57f57ce97f468" dependencies = [ "pumpkin-util", "serde", - "toml", + "toml 1.1.2+spec-1.1.0", "tracing", "uuid", ] [[package]] name = "pumpkin-data" -version = "0.1.0-dev+1.21.11" -source = "git+https://github.com/Pumpkin-MC/Pumpkin.git?branch=master#552d7b8d497132ae6f54bbc592b83eba3cd1130a" +version = "0.1.0-dev+26.1" +source = "git+https://github.com/Pumpkin-MC/Pumpkin.git?branch=master#988ef8764f0dadd094313122e8f57f57ce97f468" dependencies = [ "crc-fast", "phf", "pumpkin-nbt", "pumpkin-util", + "rand 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde", ] [[package]] name = "pumpkin-inventory" -version = "0.1.0-dev+1.21.11" -source = "git+https://github.com/Pumpkin-MC/Pumpkin.git?branch=master#552d7b8d497132ae6f54bbc592b83eba3cd1130a" +version = "0.1.0-dev+26.1" +source = "git+https://github.com/Pumpkin-MC/Pumpkin.git?branch=master#988ef8764f0dadd094313122e8f57f57ce97f468" dependencies = [ "crossbeam-utils", "pumpkin-data", "pumpkin-protocol", "pumpkin-util", "pumpkin-world", - "thiserror", + "thiserror 2.0.18", "tokio", "tracing", ] [[package]] name = "pumpkin-macros" -version = "0.1.0-dev+1.21.11" -source = "git+https://github.com/Pumpkin-MC/Pumpkin.git?branch=master#552d7b8d497132ae6f54bbc592b83eba3cd1130a" +version = "0.1.0-dev+26.1" +source = "git+https://github.com/Pumpkin-MC/Pumpkin.git?branch=master#988ef8764f0dadd094313122e8f57f57ce97f468" dependencies = [ "proc-macro-error2", "pumpkin-data", @@ -2295,20 +3071,22 @@ dependencies = [ [[package]] name = "pumpkin-nbt" -version = "0.1.0-dev+1.21.11" -source = "git+https://github.com/Pumpkin-MC/Pumpkin.git?branch=master#552d7b8d497132ae6f54bbc592b83eba3cd1130a" +version = "0.1.0-dev+26.1" +source = "git+https://github.com/Pumpkin-MC/Pumpkin.git?branch=master#988ef8764f0dadd094313122e8f57f57ce97f468" dependencies = [ "bytes", "cesu8", "flate2", + "pumpkin-codecs", "serde", - "thiserror", + "thiserror 2.0.18", + "tracing", ] [[package]] name = "pumpkin-protocol" -version = "0.1.0-dev+1.21.11" -source = "git+https://github.com/Pumpkin-MC/Pumpkin.git?branch=master#552d7b8d497132ae6f54bbc592b83eba3cd1130a" +version = "0.1.0-dev+26.1" +source = "git+https://github.com/Pumpkin-MC/Pumpkin.git?branch=master#988ef8764f0dadd094313122e8f57f57ce97f468" dependencies = [ "aes", "async-compression", @@ -2323,15 +3101,15 @@ dependencies = [ "pumpkin-world", "serde", "take_mut", - "thiserror", + "thiserror 2.0.18", "tokio", "uuid", ] [[package]] name = "pumpkin-util" -version = "0.1.0-dev+1.21.11" -source = "git+https://github.com/Pumpkin-MC/Pumpkin.git?branch=master#552d7b8d497132ae6f54bbc592b83eba3cd1130a" +version = "0.1.0-dev+26.1" +source = "git+https://github.com/Pumpkin-MC/Pumpkin.git?branch=master#988ef8764f0dadd094313122e8f57f57ce97f468" dependencies = [ "base64", "bytes", @@ -2348,15 +3126,15 @@ dependencies = [ "serde", "serde_json", "syn", - "thiserror", + "thiserror 2.0.18", "tokio", "uuid", ] [[package]] name = "pumpkin-world" -version = "0.1.0-dev+1.21.11" -source = "git+https://github.com/Pumpkin-MC/Pumpkin.git?branch=master#552d7b8d497132ae6f54bbc592b83eba3cd1130a" +version = "0.1.0-dev+26.1" +source = "git+https://github.com/Pumpkin-MC/Pumpkin.git?branch=master#988ef8764f0dadd094313122e8f57f57ce97f468" dependencies = [ "bitflags", "bytes", @@ -2377,9 +3155,9 @@ dependencies = [ "rustc-hash", "ruzstd", "serde", - "sha2 0.11.0-rc.5", + "sha2 0.11.0", "slotmap", - "thiserror", + "thiserror 2.0.18", "tokio", "tokio-util", "tracing", @@ -2403,9 +3181,9 @@ checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" [[package]] name = "radix_trie" -version = "0.2.1" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c069c179fcdc6a2fe24d8d18305cf085fdbd4f922c041943e203685d6a1c58fd" +checksum = "3b4431027dcd37fc2a73ef740b5f233aa805897935b8bce0195e41bbf9a3289a" dependencies = [ "endian-type", "nibble_vec", @@ -2413,7 +3191,18 @@ dependencies = [ [[package]] name = "rand" -version = "0.10.0" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha", + "rand_core 0.6.4", +] + +[[package]] +name = "rand" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bc266eb313df6c5c09c1c7b1fbe2510961e5bcd3add930c1e31f7ed9da0feff8" dependencies = [ @@ -2432,6 +3221,16 @@ dependencies = [ "rand_core 0.10.0", ] +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core 0.6.4", +] + [[package]] name = "rand_core" version = "0.6.4" @@ -2447,6 +3246,35 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c8d0fd677905edcbeedbf2edb6494d676f0e98d54d5cf9bda0b061cb8fb8aba" +[[package]] +name = "rand_xoshiro" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f97cdb2a36ed4183de61b2f824cc45c9f1037f28afe0a322e9fff4c108b5aaa" +dependencies = [ + "rand_core 0.6.4", +] + +[[package]] +name = "rayon" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "368f01d005bf8fd9b1206fb6fa653e6c4a81ceb1466406b81792d87c5677a58f" +dependencies = [ + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22e18b0f0062d30d4230b2e85ff77fdfe4326feb054b9783a3460d8435c8ab91" +dependencies = [ + "crossbeam-deque", + "crossbeam-utils", +] + [[package]] name = "redox_syscall" version = "0.5.18" @@ -2456,6 +3284,17 @@ dependencies = [ "bitflags", ] +[[package]] +name = "redox_users" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" +dependencies = [ + "getrandom 0.2.17", + "libredox", + "thiserror 1.0.69", +] + [[package]] name = "redox_users" version = "0.5.2" @@ -2464,28 +3303,33 @@ checksum = "a4e608c6638b9c18977b00b475ac1f28d14e84b27d8d42f70e0bf1e3dec127ac" dependencies = [ "getrandom 0.2.17", "libredox", - "thiserror", + "thiserror 2.0.18", ] [[package]] -name = "regex" -version = "1.12.3" +name = "regalloc2" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e10754a14b9137dd7b1e3e5b0493cc9171fdd105e0ab477f51b72e7f3ac0e276" +checksum = "952ddbfc6f9f64d006c3efd8c9851a6ba2f2b944ba94730db255d55006e0ffda" dependencies = [ - "aho-corasick", - "memchr", - "regex-automata 0.4.14", - "regex-syntax 0.8.10", + "allocator-api2", + "bumpalo", + "hashbrown 0.15.5", + "log", + "rustc-hash", + "smallvec 1.15.1", ] [[package]] -name = "regex-automata" -version = "0.1.10" +name = "regex" +version = "1.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" +checksum = "e10754a14b9137dd7b1e3e5b0493cc9171fdd105e0ab477f51b72e7f3ac0e276" dependencies = [ - "regex-syntax 0.6.29", + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", ] [[package]] @@ -2496,15 +3340,9 @@ checksum = "6e1dd4122fc1595e8162618945476892eefca7b88c52820e74af6262213cae8f" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.8.10", + "regex-syntax", ] -[[package]] -name = "regex-syntax" -version = "0.6.29" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" - [[package]] name = "regex-syntax" version = "0.8.10" @@ -2537,14 +3375,14 @@ dependencies = [ [[package]] name = "rsa" -version = "0.10.0-rc.15" +version = "0.10.0-rc.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b342b99544549f37509ed7fd42b0cea04bfd9ce07c16ca56094cf0fbeefbbcd" +checksum = "87ed3e93fc7e473e464b9726f4759659e72bc8665e4b8ea227547024f416d905" dependencies = [ "const-oid 0.10.2", - "crypto-bigint 0.7.0-rc.28", + "crypto-bigint 0.7.3", "crypto-primes", - "digest 0.11.1", + "digest 0.11.2", "pkcs1", "pkcs8 0.11.0-rc.11", "rand_core 0.10.0", @@ -2596,9 +3434,41 @@ checksum = "b50b8869d9fc858ce7266cce0194bd74df58b9d0e3f6df3a9fc8eb470d95c09d" [[package]] name = "rustc-hash" -version = "2.1.1" +version = "2.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94300abf3f1ae2e2b8ffb7b58043de3d399c73fa6f4b73826402a5c457614dbe" + +[[package]] +name = "rustc_version" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" +dependencies = [ + "semver", +] + +[[package]] +name = "rustc_version_runtime" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dd18cd2bae1820af0b6ad5e54f4a51d0f3fcc53b05f845675074efcc7af071d" +dependencies = [ + "rustc_version", + "semver", +] + +[[package]] +name = "rustix" +version = "0.38.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d" +checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" +dependencies = [ + "bitflags", + "errno", + "libc", + "linux-raw-sys 0.4.15", + "windows-sys 0.59.0", +] [[package]] name = "rustix" @@ -2609,10 +3479,20 @@ dependencies = [ "bitflags", "errno", "libc", - "linux-raw-sys", + "linux-raw-sys 0.12.1", "windows-sys 0.61.2", ] +[[package]] +name = "rustix-linux-procfs" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2fc84bf7e9aa16c4f2c758f27412dc9841341e16aa682d9c7ac308fe3ee12056" +dependencies = [ + "once_cell", + "rustix 1.1.4", +] + [[package]] name = "rustls" version = "0.23.37" @@ -2656,14 +3536,13 @@ checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" [[package]] name = "rustyline" -version = "17.0.2" +version = "18.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e902948a25149d50edc1a8e0141aad50f54e22ba83ff988cf8f7c9ef07f50564" +checksum = "4a990b25f351b25139ddc7f21ee3f6f56f86d6846b74ac8fad3a719a287cd4a0" dependencies = [ "bitflags", "cfg-if", "clipboard-win", - "fd-lock", "home", "libc", "log", @@ -2673,7 +3552,7 @@ dependencies = [ "unicode-segmentation", "unicode-width 0.2.2", "utf8parse", - "windows-sys 0.60.2", + "windows-sys 0.61.2", ] [[package]] @@ -2708,7 +3587,7 @@ checksum = "2f9bae8d059bf1ca32753cf3cdafbf5d391502de2fc2ca54510811fe9c100d90" dependencies = [ "arraydeque", "smallvec 2.0.0-alpha.12", - "thiserror", + "thiserror 2.0.18", ] [[package]] @@ -2736,6 +3615,10 @@ name = "semver" version = "1.0.27" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d767eb0aabc880b29956c35734170f26ed551a859dbd361d140cdbeca61ab1e2" +dependencies = [ + "serde", + "serde_core", +] [[package]] name = "serde" @@ -2808,13 +3691,26 @@ dependencies = [ [[package]] name = "serde_spanned" -version = "1.0.4" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8bbf91e5a4d6315eee45e704372590b30e260ee83af6639d64557f51b067776" +checksum = "6662b5879511e06e8999a8a235d848113e942c9124f211511b16466ee2995f26" dependencies = [ "serde_core", ] +[[package]] +name = "serde_yaml" +version = "0.9.34+deprecated" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47" +dependencies = [ + "indexmap", + "itoa", + "ryu", + "serde", + "unsafe-libyaml", +] + [[package]] name = "serdect" version = "0.4.2" @@ -2838,13 +3734,13 @@ dependencies = [ [[package]] name = "sha1" -version = "0.11.0-rc.5" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b167252f3c126be0d8926639c4c4706950f01445900c4b3db0fd7e89fcb750a" +checksum = "aacc4cc499359472b4abe1bf11d0b12e688af9a805fa5e3016f9a386dc2d0214" dependencies = [ "cfg-if", - "cpufeatures 0.2.17", - "digest 0.11.1", + "cpufeatures 0.3.0", + "digest 0.11.2", ] [[package]] @@ -2860,13 +3756,13 @@ dependencies = [ [[package]] name = "sha2" -version = "0.11.0-rc.5" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c5f3b1e2dc8aad28310d8410bd4d7e180eca65fca176c52ab00d364475d0024" +checksum = "446ba717509524cb3f22f17ecc096f10f4822d76ab5c0b9822c5f9c284e825f4" dependencies = [ "cfg-if", - "cpufeatures 0.2.17", - "digest 0.11.1", + "cpufeatures 0.3.0", + "digest 0.11.2", ] [[package]] @@ -2919,7 +3815,7 @@ version = "3.0.0-rc.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f1880df446116126965eeec169136b2e0251dba37c6223bcc819569550edea3" dependencies = [ - "digest 0.11.1", + "digest 0.11.2", "rand_core 0.10.0", ] @@ -2935,6 +3831,16 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b2aa850e253778c88a04c3d7323b043aeda9d3e30d5971937c1855769763678e" +[[package]] +name = "sized-chunks" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16d69225bde7a69b235da73377861095455d298f2b970996eec25ddbb42b3d1e" +dependencies = [ + "bitmaps", + "typenum", +] + [[package]] name = "slab" version = "0.4.12" @@ -2955,6 +3861,9 @@ name = "smallvec" version = "1.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" +dependencies = [ + "serde", +] [[package]] name = "smallvec" @@ -2964,12 +3873,21 @@ checksum = "ef784004ca8777809dcdad6ac37629f0a97caee4c685fcea805278d81dd8b857" [[package]] name = "socket2" -version = "0.6.2" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86f4aa3ad99f2088c990dfa82d367e19cb29268ed67c574d10d0a4bfe71f07e0" +checksum = "3a766e1110788c36f4fa1c2b71b387a7815aa65f88ce0229841826633d93723e" dependencies = [ "libc", - "windows-sys 0.60.2", + "windows-sys 0.61.2", +] + +[[package]] +name = "spin" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" +dependencies = [ + "lock_api", ] [[package]] @@ -3065,12 +3983,48 @@ dependencies = [ "syn", ] +[[package]] +name = "sysinfo" +version = "0.38.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92ab6a2f8bfe508deb3c6406578252e491d299cbbf3bc0529ecc3313aee4a52f" +dependencies = [ + "libc", + "memchr", + "ntapi", + "objc2-core-foundation", + "objc2-io-kit", + "windows", +] + +[[package]] +name = "system-interface" +version = "0.27.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc4592f674ce18521c2a81483873a49596655b179f71c5e05d10c1fe66c78745" +dependencies = [ + "bitflags", + "cap-fs-ext", + "cap-std", + "fd-lock", + "io-lifetimes", + "rustix 0.38.44", + "windows-sys 0.59.0", + "winx", +] + [[package]] name = "take_mut" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f764005d11ee5f36500a149ace24e00e3da98b0158b3e2d53a7495660d3f4d60" +[[package]] +name = "target-lexicon" +version = "0.13.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adb6935a6f5c20170eeceb1a3835a49e12e19d792f6dd344ccc76a985ca5a6ca" + [[package]] name = "tempfile" version = "3.26.0" @@ -3080,17 +4034,26 @@ dependencies = [ "fastrand", "getrandom 0.4.1", "once_cell", - "rustix", + "rustix 1.1.4", "windows-sys 0.61.2", ] +[[package]] +name = "termcolor" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" +dependencies = [ + "winapi-util", +] + [[package]] name = "terminal_size" version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "60b8cb979cb11c32ce1603f8137b22262a9d131aaa5c37b5678025f22b8becd0" dependencies = [ - "rustix", + "rustix 1.1.4", "windows-sys 0.60.2", ] @@ -3104,13 +4067,33 @@ dependencies = [ "unicode-width 0.2.2", ] +[[package]] +name = "thiserror" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" +dependencies = [ + "thiserror-impl 1.0.69", +] + [[package]] name = "thiserror" version = "2.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4288b5bcbc7920c07a1149a35cf9590a2aa808e0bc1eafaade0b80947865fbc4" dependencies = [ - "thiserror-impl", + "thiserror-impl 2.0.18", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" +dependencies = [ + "proc-macro2", + "quote", + "syn", ] [[package]] @@ -3142,7 +4125,9 @@ dependencies = [ "deranged", "itoa", "js-sys", + "libc", "num-conv", + "num_threads", "powerfmt", "serde_core", "time-core", @@ -3177,9 +4162,9 @@ dependencies = [ [[package]] name = "tokio" -version = "1.49.0" +version = "1.51.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72a2903cd7736441aac9df9d7688bd0ce48edccaadf181c3b90be801e81d3d86" +checksum = "f66bf9585cda4b724d3e78ab34b73fb2bbaba9011b9bfdf69dc836382ea13b8c" dependencies = [ "bytes", "libc", @@ -3193,9 +4178,9 @@ dependencies = [ [[package]] name = "tokio-macros" -version = "2.6.1" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c55a2eff8b69ce66c84f85e1da1c233edc36ceb85a2058d11b0d6a3c7e7569c" +checksum = "385a6cb71ab9ab790c5fe8d67f1645e6c450a7ce006a33de03daa956cf70a496" dependencies = [ "proc-macro2", "quote", @@ -3218,42 +4203,66 @@ dependencies = [ [[package]] name = "toml" -version = "1.0.3+spec-1.1.0" +version = "0.9.12+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf92845e79fc2e2def6a5d828f0801e29a2f8acc037becc5ab08595c7d5e9863" +dependencies = [ + "indexmap", + "serde_core", + "serde_spanned", + "toml_datetime 0.7.5+spec-1.1.0", + "toml_parser", + "toml_writer", + "winnow 0.7.14", +] + +[[package]] +name = "toml" +version = "1.1.2+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7614eaf19ad818347db24addfa201729cf2a9b6fdfd9eb0ab870fcacc606c0c" +checksum = "81f3d15e84cbcd896376e6730314d59fb5a87f31e4b038454184435cd57defee" dependencies = [ "indexmap", "serde_core", "serde_spanned", - "toml_datetime", + "toml_datetime 1.1.1+spec-1.1.0", "toml_parser", "toml_writer", - "winnow", + "winnow 1.0.1", +] + +[[package]] +name = "toml_datetime" +version = "0.7.5+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92e1cfed4a3038bc5a127e35a2d360f145e1f4b971b551a2ba5fd7aedf7e1347" +dependencies = [ + "serde_core", ] [[package]] name = "toml_datetime" -version = "1.0.0+spec-1.1.0" +version = "1.1.1+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32c2555c699578a4f59f0cc68e5116c8d7cabbd45e1409b989d4be085b53f13e" +checksum = "3165f65f62e28e0115a00b2ebdd37eb6f3b641855f9d636d3cd4103767159ad7" dependencies = [ "serde_core", ] [[package]] name = "toml_parser" -version = "1.0.9+spec-1.1.0" +version = "1.1.2+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "702d4415e08923e7e1ef96cd5727c0dfed80b4d2fa25db9647fe5eb6f7c5a4c4" +checksum = "a2abe9b86193656635d2411dc43050282ca48aa31c2451210f4202550afb7526" dependencies = [ - "winnow", + "winnow 1.0.1", ] [[package]] name = "toml_writer" -version = "1.0.6+spec-1.1.0" +version = "1.1.1+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab16f14aed21ee8bfd8ec22513f7287cd4a91aa92e44edfe2c17ddd004e92607" +checksum = "756daf9b1013ebe47a8776667b466417e2d4c5679d441c26230efd9ef78692db" [[package]] name = "tracing" @@ -3298,16 +4307,29 @@ dependencies = [ "tracing-core", ] +[[package]] +name = "tracing-serde-structured" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0832510e9838a4ff7e45e278602ab0533686f9507bc6189e024e488602f29820" +dependencies = [ + "hash32", + "heapless", + "postcard-schema", + "serde", + "tracing-core", +] + [[package]] name = "tracing-subscriber" -version = "0.3.19" +version = "0.3.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8189decb5ac0fa7bc8b96b7cb9b2701d60d48805aca84a238004d665fcc4008" +checksum = "cb7f578e5945fb242538965c2d0b04418d38ec25c79d160cd279bf0731c8d319" dependencies = [ "matchers", "nu-ansi-term", "once_cell", - "regex", + "regex-automata", "sharded-slab", "smallvec 1.15.1", "thread_local", @@ -3390,6 +4412,12 @@ version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" +[[package]] +name = "unsafe-libyaml" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "673aac59facbab8a9007c7f6108d11f63b603f7cabff99fabf650fea5c32b861" + [[package]] name = "untrusted" version = "0.9.0" @@ -3398,9 +4426,9 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "ureq" -version = "3.2.0" +version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdc97a28575b85cfedf2a7e7d3cc64b3e11bd8ac766666318003abbacc7a21fc" +checksum = "dea7109cdcd5864d4eeb1b58a1648dc9bf520360d7af16ec26d0a9354bafcfc0" dependencies = [ "base64", "cookie_store", @@ -3412,15 +4440,15 @@ dependencies = [ "serde", "serde_json", "ureq-proto", - "utf-8", + "utf8-zero", "webpki-roots", ] [[package]] name = "ureq-proto" -version = "0.5.3" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d81f9efa9df032be5934a46a068815a10a042b494b6a58cb0a1a97bb5467ed6f" +checksum = "e994ba84b0bd1b1b0cf92878b7ef898a5c1760108fe7b6010327e274917a808c" dependencies = [ "base64", "http", @@ -3441,10 +4469,10 @@ dependencies = [ ] [[package]] -name = "utf-8" -version = "0.7.6" +name = "utf8-zero" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" +checksum = "b8c0a043c9540bae7c578c88f91dda8bd82e59ae27c21baca69c8b191aaf5a6e" [[package]] name = "utf8_iter" @@ -3460,9 +4488,9 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "uuid" -version = "1.21.0" +version = "1.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b672338555252d43fd2240c714dc444b8c6fb0a5c5335e65a07bba7742735ddb" +checksum = "5ac8b6f42ead25368cf5b098aeb3dc8a1a2c05a3eee8a9a1a68c640edbfc79d9" dependencies = [ "getrandom 0.4.1", "js-sys", @@ -3592,6 +4620,27 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "wasm-compose" +version = "0.245.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5fd23d12cc95c451c1306db5bc63075fbebb612bb70c53b4237b1ce5bc178343" +dependencies = [ + "anyhow", + "heck", + "im-rc", + "indexmap", + "log", + "petgraph 0.6.5", + "serde", + "serde_derive", + "serde_yaml", + "smallvec 1.15.1", + "wasm-encoder 0.245.1", + "wasmparser 0.245.1", + "wat", +] + [[package]] name = "wasm-encoder" version = "0.244.0" @@ -3599,7 +4648,27 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "990065f2fe63003fe337b932cfb5e3b80e0b4d0f5ff650e6985b1048f62c8319" dependencies = [ "leb128fmt", - "wasmparser", + "wasmparser 0.244.0", +] + +[[package]] +name = "wasm-encoder" +version = "0.245.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9dca005e69bf015e45577e415b9af8c67e8ee3c0e38b5b0add5aa92581ed5c" +dependencies = [ + "leb128fmt", + "wasmparser 0.245.1", +] + +[[package]] +name = "wasm-encoder" +version = "0.246.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61fb705ce81adde29d2a8e99d87995e39a6e927358c91398f374474746070ef7" +dependencies = [ + "leb128fmt", + "wasmparser 0.246.2", ] [[package]] @@ -3610,8 +4679,8 @@ checksum = "bb0e353e6a2fbdc176932bbaab493762eb1255a7900fe0fea1a2f96c296cc909" dependencies = [ "anyhow", "indexmap", - "wasm-encoder", - "wasmparser", + "wasm-encoder 0.244.0", + "wasmparser 0.244.0", ] [[package]] @@ -3627,23 +4696,431 @@ dependencies = [ ] [[package]] -name = "webpki-roots" -version = "1.0.6" +name = "wasmparser" +version = "0.245.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22cfaf3c063993ff62e73cb4311efde4db1efb31ab78a3e5c457939ad5cc0bed" +checksum = "4f08c9adee0428b7bddf3890fc27e015ac4b761cc608c822667102b8bfd6995e" dependencies = [ - "rustls-pki-types", + "bitflags", + "hashbrown 0.16.1", + "indexmap", + "semver", + "serde", ] [[package]] -name = "winapi" -version = "0.3.9" +name = "wasmparser" +version = "0.246.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +checksum = "71cde4757396defafd25417cfb36aa3161027d06d865b0c24baaae229aac005d" dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] + "bitflags", + "hashbrown 0.16.1", + "indexmap", + "semver", + "serde", +] + +[[package]] +name = "wasmprinter" +version = "0.245.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f41517a3716fbb8ccf46daa9c1325f760fcbff5168e75c7392288e410b91ac8" +dependencies = [ + "anyhow", + "termcolor", + "wasmparser 0.245.1", +] + +[[package]] +name = "wasmtime" +version = "43.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce205cd643d661b5ba5ba4717e13730262e8cdbc8f2eacbc7b906d45c1a74026" +dependencies = [ + "addr2line 0.26.1", + "async-trait", + "bitflags", + "bumpalo", + "cc", + "cfg-if", + "encoding_rs", + "futures", + "fxprof-processed-profile", + "gimli 0.33.1", + "ittapi", + "libc", + "log", + "mach2", + "memfd", + "object 0.38.1", + "once_cell", + "postcard", + "pulley-interpreter", + "rayon", + "rustix 1.1.4", + "semver", + "serde", + "serde_derive", + "serde_json", + "smallvec 1.15.1", + "target-lexicon", + "tempfile", + "wasm-compose", + "wasm-encoder 0.245.1", + "wasmparser 0.245.1", + "wasmtime-environ", + "wasmtime-internal-cache", + "wasmtime-internal-component-macro", + "wasmtime-internal-component-util", + "wasmtime-internal-core", + "wasmtime-internal-cranelift", + "wasmtime-internal-fiber", + "wasmtime-internal-jit-debug", + "wasmtime-internal-jit-icache-coherence", + "wasmtime-internal-unwinder", + "wasmtime-internal-versioned-export-macros", + "wasmtime-internal-winch", + "wat", + "windows-sys 0.61.2", +] + +[[package]] +name = "wasmtime-environ" +version = "43.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b8b78abf3677d4a0a5db82e5015b4d085ff3a1b8b472cbb8c70d4b769f019ce" +dependencies = [ + "anyhow", + "cpp_demangle", + "cranelift-bforest", + "cranelift-bitset", + "cranelift-entity", + "gimli 0.33.1", + "hashbrown 0.16.1", + "indexmap", + "log", + "object 0.38.1", + "postcard", + "rustc-demangle", + "semver", + "serde", + "serde_derive", + "sha2 0.10.9", + "smallvec 1.15.1", + "target-lexicon", + "wasm-encoder 0.245.1", + "wasmparser 0.245.1", + "wasmprinter", + "wasmtime-internal-component-util", + "wasmtime-internal-core", +] + +[[package]] +name = "wasmtime-internal-cache" +version = "43.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e4fd4103ba413c0da2e636f73490c6c8e446d708cbde7573703941bc3d6a448" +dependencies = [ + "base64", + "directories-next", + "log", + "postcard", + "rustix 1.1.4", + "serde", + "serde_derive", + "sha2 0.10.9", + "toml 0.9.12+spec-1.1.0", + "wasmtime-environ", + "windows-sys 0.61.2", + "zstd", +] + +[[package]] +name = "wasmtime-internal-component-macro" +version = "43.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d3d6914f34be2f9d78d8ee9f422e834dfc204e71ccce697205fae95fed87892" +dependencies = [ + "anyhow", + "proc-macro2", + "quote", + "syn", + "wasmtime-internal-component-util", + "wasmtime-internal-wit-bindgen", + "wit-parser 0.245.1", +] + +[[package]] +name = "wasmtime-internal-component-util" +version = "43.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3751b0616b914fdd87fe1bf804694a078f321b000338e6476bc48a4d6e454f21" + +[[package]] +name = "wasmtime-internal-core" +version = "43.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22632b187e1b0716f1b9ac57ad29013bed33175fcb19e10bb6896126f82fac67" +dependencies = [ + "anyhow", + "hashbrown 0.16.1", + "libm", + "serde", +] + +[[package]] +name = "wasmtime-internal-cranelift" +version = "43.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b3ca07b3e0bb3429674b173b5800577719d600774dd81bff58f775c0aaa64ee" +dependencies = [ + "cfg-if", + "cranelift-codegen", + "cranelift-control", + "cranelift-entity", + "cranelift-frontend", + "cranelift-native", + "gimli 0.33.1", + "itertools", + "log", + "object 0.38.1", + "pulley-interpreter", + "smallvec 1.15.1", + "target-lexicon", + "thiserror 2.0.18", + "wasmparser 0.245.1", + "wasmtime-environ", + "wasmtime-internal-core", + "wasmtime-internal-unwinder", + "wasmtime-internal-versioned-export-macros", +] + +[[package]] +name = "wasmtime-internal-fiber" +version = "43.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20c8b2c9704eb1f33ead025ec16038277ccb63d0a14c31e99d5b765d7c36da55" +dependencies = [ + "cc", + "cfg-if", + "libc", + "rustix 1.1.4", + "wasmtime-environ", + "wasmtime-internal-versioned-export-macros", + "windows-sys 0.61.2", +] + +[[package]] +name = "wasmtime-internal-jit-debug" +version = "43.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d950310d07391d34369f62c48336ebb14eacbd4d6f772bb5f349c24e838e0664" +dependencies = [ + "cc", + "object 0.38.1", + "rustix 1.1.4", + "wasmtime-internal-versioned-export-macros", +] + +[[package]] +name = "wasmtime-internal-jit-icache-coherence" +version = "43.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3606662c156962d096be3127b8b8ae8ee2f8be3f896dad29259ff01ddb64abfd" +dependencies = [ + "cfg-if", + "libc", + "wasmtime-internal-core", + "windows-sys 0.61.2", +] + +[[package]] +name = "wasmtime-internal-unwinder" +version = "43.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75eef0747e52dc545b075f64fd0e0cc237ae738e641266b1970e07e2d744bc32" +dependencies = [ + "cfg-if", + "cranelift-codegen", + "log", + "object 0.38.1", + "wasmtime-environ", +] + +[[package]] +name = "wasmtime-internal-versioned-export-macros" +version = "43.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8b0a5dab02a8fb527f547855ecc0e05f9fdc3d5bd57b8b080349408f9a6cece" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "wasmtime-internal-winch" +version = "43.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8007342bd12ff400293a817973f7ecd6f1d9a8549a53369a9c1af357166f1f1e" +dependencies = [ + "cranelift-codegen", + "gimli 0.33.1", + "log", + "object 0.38.1", + "target-lexicon", + "wasmparser 0.245.1", + "wasmtime-environ", + "wasmtime-internal-cranelift", + "winch-codegen", +] + +[[package]] +name = "wasmtime-internal-wit-bindgen" +version = "43.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7900c3e3c1d6e475bc225d73b02d6d5484815f260022e6964dca9558e50dd01a" +dependencies = [ + "anyhow", + "bitflags", + "heck", + "indexmap", + "wit-parser 0.245.1", +] + +[[package]] +name = "wasmtime-wasi" +version = "43.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed3e3ddcfad69e9eb025bd19bff70dad45bafe1d6eacd134c0ffdfc4c161d045" +dependencies = [ + "async-trait", + "bitflags", + "bytes", + "cap-fs-ext", + "cap-net-ext", + "cap-rand", + "cap-std", + "cap-time-ext", + "fs-set-times", + "futures", + "io-extras", + "io-lifetimes", + "rustix 1.1.4", + "system-interface", + "thiserror 2.0.18", + "tokio", + "tracing", + "url", + "wasmtime", + "wasmtime-wasi-io", + "wiggle", + "windows-sys 0.61.2", +] + +[[package]] +name = "wasmtime-wasi-io" +version = "43.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ca5dd3b9f04a851c422d05f333366722742da46bff9369ae0191f32cf83565a" +dependencies = [ + "async-trait", + "bytes", + "futures", + "tracing", + "wasmtime", +] + +[[package]] +name = "wast" +version = "35.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ef140f1b49946586078353a453a1d28ba90adfc54dde75710bc1931de204d68" +dependencies = [ + "leb128", +] + +[[package]] +name = "wast" +version = "246.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe3fe8e3bf88ad96d031b4181ddbd64634b17cb0d06dfc3de589ef43591a9a62" +dependencies = [ + "bumpalo", + "leb128fmt", + "memchr", + "unicode-width 0.2.2", + "wasm-encoder 0.246.2", +] + +[[package]] +name = "wat" +version = "1.246.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4bd7fda1199b94fff395c2d19a153f05dbe7807630316fa9673367666fd2ad8c" +dependencies = [ + "wast 246.0.2", +] + +[[package]] +name = "webpki-roots" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22cfaf3c063993ff62e73cb4311efde4db1efb31ab78a3e5c457939ad5cc0bed" +dependencies = [ + "rustls-pki-types", +] + +[[package]] +name = "wiggle" +version = "43.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc1b1135efc8e5a008971897bea8d41ca56d8d501d4efb807842ae0a1c78f639" +dependencies = [ + "bitflags", + "thiserror 2.0.18", + "tracing", + "wasmtime", + "wasmtime-environ", + "wiggle-macro", +] + +[[package]] +name = "wiggle-generate" +version = "43.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7bc2b0d50ec8773b44fbfe1da6cb5cc44a92deaf8483233dcf0831e6db33172" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "syn", + "wasmtime-environ", + "witx", +] + +[[package]] +name = "wiggle-macro" +version = "43.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d6c7d44ea552e1fbfdcd7a2cd83f5c2d1e803d5b1a11e3462c06888b77f455f" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "wiggle-generate", +] + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] [[package]] name = "winapi-i686-pc-windows-gnu" @@ -3666,12 +5143,126 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +[[package]] +name = "winch-codegen" +version = "43.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb9f45f7172a2628c8317766e427babc0a400f9d10b1c0f0b0617c5ed5b79de6" +dependencies = [ + "cranelift-assembler-x64", + "cranelift-codegen", + "gimli 0.33.1", + "regalloc2", + "smallvec 1.15.1", + "target-lexicon", + "thiserror 2.0.18", + "wasmparser 0.245.1", + "wasmtime-environ", + "wasmtime-internal-core", + "wasmtime-internal-cranelift", +] + +[[package]] +name = "windows" +version = "0.62.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "527fadee13e0c05939a6a05d5bd6eec6cd2e3dbd648b9f8e447c6518133d8580" +dependencies = [ + "windows-collections", + "windows-core", + "windows-future", + "windows-numerics", +] + +[[package]] +name = "windows-collections" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23b2d95af1a8a14a3c7367e1ed4fc9c20e0a26e79551b1454d72583c97cc6610" +dependencies = [ + "windows-core", +] + +[[package]] +name = "windows-core" +version = "0.62.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb" +dependencies = [ + "windows-implement", + "windows-interface", + "windows-link", + "windows-result", + "windows-strings", +] + +[[package]] +name = "windows-future" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1d6f90251fe18a279739e78025bd6ddc52a7e22f921070ccdc67dde84c605cb" +dependencies = [ + "windows-core", + "windows-link", + "windows-threading", +] + +[[package]] +name = "windows-implement" +version = "0.60.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "windows-interface" +version = "0.59.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "windows-link" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" +[[package]] +name = "windows-numerics" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e2e40844ac143cdb44aead537bbf727de9b044e107a0f1220392177d15b0f26" +dependencies = [ + "windows-core", + "windows-link", +] + +[[package]] +name = "windows-result" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-strings" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091" +dependencies = [ + "windows-link", +] + [[package]] name = "windows-sys" version = "0.52.0" @@ -3741,6 +5332,15 @@ dependencies = [ "windows_x86_64_msvc 0.53.1", ] +[[package]] +name = "windows-threading" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3949bd5b99cafdf1c7ca86b43ca564028dfe27d66958f2470940f73d86d75b37" +dependencies = [ + "windows-link", +] + [[package]] name = "windows_aarch64_gnullvm" version = "0.52.6" @@ -3843,6 +5443,22 @@ version = "0.7.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a5364e9d77fcdeeaa6062ced926ee3381faa2ee02d3eb83a5c27a8825540829" +[[package]] +name = "winnow" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09dac053f1cd375980747450bfc7250c264eaae0583872e845c0c7cd578872b5" + +[[package]] +name = "winx" +version = "0.36.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f3fd376f71958b862e7afb20cfe5a22830e1963462f3a17f49d82a6c1d1f42d" +dependencies = [ + "bitflags", + "windows-sys 0.59.0", +] + [[package]] name = "wit-bindgen" version = "0.51.0" @@ -3860,7 +5476,7 @@ checksum = "ea61de684c3ea68cb082b7a88508a8b27fcc8b797d738bfc99a82facf1d752dc" dependencies = [ "anyhow", "heck", - "wit-parser", + "wit-parser 0.244.0", ] [[package]] @@ -3907,10 +5523,10 @@ dependencies = [ "serde", "serde_derive", "serde_json", - "wasm-encoder", + "wasm-encoder 0.244.0", "wasm-metadata", - "wasmparser", - "wit-parser", + "wasmparser 0.244.0", + "wit-parser 0.244.0", ] [[package]] @@ -3928,7 +5544,38 @@ dependencies = [ "serde_derive", "serde_json", "unicode-xid", - "wasmparser", + "wasmparser 0.244.0", +] + +[[package]] +name = "wit-parser" +version = "0.245.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "330698718e82983499419494dd1e3d7811a457a9bf9f69734e8c5f07a2547929" +dependencies = [ + "anyhow", + "hashbrown 0.16.1", + "id-arena", + "indexmap", + "log", + "semver", + "serde", + "serde_derive", + "serde_json", + "unicode-xid", + "wasmparser 0.245.1", +] + +[[package]] +name = "witx" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e366f27a5cabcddb2706a78296a40b8fcc451e1a6aba2fc1d94b4a01bdaaef4b" +dependencies = [ + "anyhow", + "log", + "thiserror 1.0.69", + "wast 35.0.2", ] [[package]] diff --git a/rust/Cargo.toml b/rust/Cargo.toml index 20d35ce..7704782 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -2,6 +2,8 @@ name = "patchbukkit" version = "0.1.0" edition = "2024" +authors = ["PumpkinMC Contributors"] +description = "Compatibility layer for running Bukkit, Spigot, and Paper plugins on Pumpkin" build = "build/main.rs" @@ -41,6 +43,7 @@ j4rs = { version = "0.24", artifact = "cdylib", lib = true } env_logger = "0.11.8" log = "0.4" prost-build = "0.14" +protoc-bin-vendored = "3" glob = "0.3" [profile.release] diff --git a/rust/build/main.rs b/rust/build/main.rs index 09f8db3..27ab21a 100644 --- a/rust/build/main.rs +++ b/rust/build/main.rs @@ -1,8 +1,9 @@ -use crate::{java::setup_java, protobufs::setup_protobufs}; +use crate::{java::setup_java, protobufs::setup_protobufs, pumpkin::setup_pumpkin_build_info}; use std::{error::Error, path::PathBuf}; pub mod java; pub mod protobufs; +pub mod pumpkin; fn main() -> Result<(), Box> { println!("cargo::rerun-if-changed=rust/src/build.rs"); @@ -11,6 +12,7 @@ fn main() -> Result<(), Box> { let base = PathBuf::from(std::env::var("CARGO_MANIFEST_DIR").unwrap()); + setup_pumpkin_build_info(&base); setup_protobufs(base.clone()); setup_java(base); Ok(()) diff --git a/rust/build/protobufs.rs b/rust/build/protobufs.rs index 40d752f..80b2ce9 100644 --- a/rust/build/protobufs.rs +++ b/rust/build/protobufs.rs @@ -164,6 +164,13 @@ fn to_snake_case(s: &str) -> String { } pub fn setup_protobufs(base: PathBuf) { + let protoc = protoc_bin_vendored::protoc_bin_path() + .expect("Failed to locate vendored protoc binary for PatchBukkit"); + // Avoid requiring a host-wide protoc installation for local and CI builds. + unsafe { + std::env::set_var("PROTOC", protoc); + } + let proto_path = base.parent().unwrap().join("proto"); let paths: Vec<_> = glob(&format!("{}/**/*.proto", proto_path.display())) .expect("Failed to read glob pattern") diff --git a/rust/build/pumpkin.rs b/rust/build/pumpkin.rs new file mode 100644 index 0000000..833853a --- /dev/null +++ b/rust/build/pumpkin.rs @@ -0,0 +1,64 @@ +use std::{fs, path::Path}; + +fn extract_git_revision(source: &str) -> Option { + source.rsplit('#').next().and_then(|revision| { + let trimmed = revision.trim(); + if trimmed.is_empty() { + None + } else { + Some(trimmed.to_string()) + } + }) +} + +pub fn setup_pumpkin_build_info(base: &Path) { + let lock_path = base.join("Cargo.lock"); + let lock_contents = + fs::read_to_string(&lock_path).expect("Failed to read Cargo.lock for Pumpkin build info"); + + let mut in_pumpkin_package = false; + let mut pumpkin_version: Option = None; + let mut pumpkin_revision: Option = None; + + for line in lock_contents.lines() { + let trimmed = line.trim(); + + if trimmed == "[[package]]" { + if in_pumpkin_package { + break; + } + in_pumpkin_package = false; + pumpkin_version = None; + pumpkin_revision = None; + continue; + } + + if trimmed == r#"name = "pumpkin""# { + in_pumpkin_package = true; + continue; + } + + if !in_pumpkin_package { + continue; + } + + if let Some(version) = trimmed.strip_prefix(r#"version = ""#) { + pumpkin_version = Some(version.trim_end_matches('"').to_string()); + continue; + } + + if let Some(source) = trimmed.strip_prefix(r#"source = ""#) { + let source = source.trim_end_matches('"'); + pumpkin_revision = extract_git_revision(source); + } + } + + let pumpkin_version = pumpkin_version.unwrap_or_else(|| "unknown".to_string()); + let pumpkin_revision = pumpkin_revision.unwrap_or_else(|| "unknown".to_string()); + let pumpkin_revision_short = pumpkin_revision.chars().take(7).collect::(); + + println!("cargo::rustc-env=PATCHBUKKIT_PUMPKIN_VERSION={pumpkin_version}"); + println!("cargo::rustc-env=PATCHBUKKIT_PUMPKIN_REVISION={pumpkin_revision}"); + println!("cargo::rustc-env=PATCHBUKKIT_PUMPKIN_REVISION_SHORT={pumpkin_revision_short}"); + println!("cargo::rerun-if-changed={}", lock_path.display()); +} diff --git a/rust/src/commands/mod.rs b/rust/src/commands/mod.rs index 0fac2a3..484dc62 100644 --- a/rust/src/commands/mod.rs +++ b/rust/src/commands/mod.rs @@ -53,13 +53,13 @@ impl ArgumentConsumer for AnyCommandNode { let first_word_opt = args.pop(); let mut msg = match first_word_opt { - Some(word) => word.to_string(), + Some(word) => word.value.to_string(), None => return Box::pin(async { None }), }; while let Some(word) = args.pop() { msg.push(' '); - msg.push_str(word); + msg.push_str(word.value); } Box::pin(async move { Some(Arg::Msg(msg)) }) diff --git a/rust/src/directories.rs b/rust/src/directories.rs index 4143cc0..23077cf 100644 --- a/rust/src/directories.rs +++ b/rust/src/directories.rs @@ -11,8 +11,12 @@ pub struct PatchBukkitDirectories { } pub fn setup_directories(server: &Context) -> Result { - let base = std::path::absolute(server.get_data_folder()) + let data_folder = std::path::absolute(server.get_data_folder()) .map_err(|_| "Failed to get absolute directory from relative")?; + let server_root = data_folder + .parent() + .ok_or("Failed to determine server root from PatchBukkit data folder")?; + let base = server_root.join("patchbukkit"); let plugins = base.join("patchbukkit-plugins"); let plugin_updates = plugins.join("update"); diff --git a/rust/src/java/plugin/command_manager.rs b/rust/src/java/plugin/command_manager.rs index 419e508..373071f 100644 --- a/rust/src/java/plugin/command_manager.rs +++ b/rust/src/java/plugin/command_manager.rs @@ -16,6 +16,8 @@ use crate::{ }, }; +const PATCHBUKKIT_PERMISSION_NAMESPACE: &str = "patchbukkit"; + pub struct CommandManager { command_map: Option, } @@ -185,21 +187,34 @@ impl CommandManager { cmd_data.description.clone().unwrap_or_default(), ); - let permission = format!("patchbukkit:{cmd_name}"); + let permission = build_permission_node(&plugin.name, &cmd_name); - if let Err(e) = context - .register_permission(Permission::new( - &permission, - &permission, - PermissionDefault::Allow, - )) - .await - { - tracing::warn!( - "Failed to register permission for command {}: {:?}", - cmd_name, - e - ); + let registry = { + let permission_manager = context.permission_manager.read().await; + permission_manager.registry.clone() + }; + + if let Err(e) = registry.write().await.register_permission(Permission::new( + &permission, + &format!( + "Allows running the Bukkit command `{cmd_name}` from `{}`", + plugin.name + ), + PermissionDefault::Allow, + )) { + if e.contains("already registered") { + tracing::debug!( + "Permission already registered for command {}: {}", + cmd_name, + e + ); + } else { + tracing::warn!( + "Failed to register permission for command {}: {:?}", + cmd_name, + e + ); + } } context.register_command(node, permission).await; @@ -302,3 +317,49 @@ impl CommandManager { } } } + +fn build_permission_node(plugin_name: &str, cmd_name: &str) -> String { + let plugin_segment = sanitize_permission_segment(plugin_name); + let command_segment = sanitize_permission_segment(cmd_name); + format!("{PATCHBUKKIT_PERMISSION_NAMESPACE}:command.{plugin_segment}.{command_segment}") +} + +fn sanitize_permission_segment(value: &str) -> String { + let sanitized: String = value + .chars() + .map(|ch| { + if ch.is_ascii_alphanumeric() || matches!(ch, '.' | '_' | '-') { + ch.to_ascii_lowercase() + } else { + '_' + } + }) + .collect(); + + if sanitized.is_empty() { + "unknown".to_string() + } else { + sanitized + } +} + +#[cfg(test)] +mod tests { + use super::build_permission_node; + + #[test] + fn permission_node_is_namespaced_and_stable() { + assert_eq!( + build_permission_node("SimpleSpawn", "spawn"), + "patchbukkit:command.simplespawn.spawn" + ); + } + + #[test] + fn permission_node_sanitizes_unfriendly_characters() { + assert_eq!( + build_permission_node("Fancy Plugin", "Spawn-All"), + "patchbukkit:command.fancy_plugin.spawn-all" + ); + } +} diff --git a/rust/src/java/resources.rs b/rust/src/java/resources.rs index 72bb46e..c87923f 100644 --- a/rust/src/java/resources.rs +++ b/rust/src/java/resources.rs @@ -5,134 +5,15 @@ use std::{ }; use anyhow::Result; -use j4rs::{JvmBuilder, MavenArtifact, MavenArtifactRepo, MavenSettings}; use rust_embed::Embed; #[derive(Embed)] #[folder = "resources/"] pub struct Resources; -pub const DEPENDENCIES: &[(&str, &str, &str)] = &[ - ("com.google.guava", "guava", "33.3.1-jre"), - ( - "net.md-5", - "bungeecord-chat", - "1.21-R0.2-deprecated+build.21", - ), - ("net.kyori", "adventure-text-logger-slf4j", "4.25.0"), - ("net.kyori", "adventure-text-minimessage", "4.25.0"), - ("net.kyori", "adventure-text-serializer-legacy", "4.25.0"), - ("net.kyori", "adventure-text-serializer-plain", "4.25.0"), - ("net.kyori", "adventure-text-serializer-json", "4.25.0"), - ("net.kyori", "adventure-api", "4.25.0"), - ("net.kyori", "adventure-key", "4.25.0"), - ("net.kyori", "adventure-text-serializer-commons", "4.25.0"), - ("net.kyori", "adventure-text-serializer-gson", "4.25.0"), - ("com.google.code.gson", "gson", "2.11.0"), - ("org.yaml", "snakeyaml", "2.2"), - ("org.joml", "joml", "1.10.8"), - ("it.unimi.dsi", "fastutil", "8.5.15"), - ("org.apache.logging.log4j", "log4j-api", "2.24.1"), - ( - "org.apache.maven.resolver", - "maven-resolver-connector-basic", - "1.9.18", - ), - ( - "org.apache.maven.resolver", - "maven-resolver-transport-http", - "1.9.18", - ), - ("org.apache.maven", "maven-resolver-provider", "3.9.6"), - ("org.apache.maven.resolver", "maven-resolver-impl", "1.9.18"), - ("org.slf4j", "jcl-over-slf4j", "1.7.36"), - ( - "org.apache.maven.resolver", - "maven-resolver-named-locks", - "1.9.18", - ), - ("org.slf4j", "slf4j-api", "2.0.16"), - ("com.mojang", "brigadier", "1.3.10"), - ("org.jspecify", "jspecify", "1.0.0"), - ("com.google.guava", "failureaccess", "1.0.2"), - ( - "com.google.guava", - "listenablefuture", - "9999.0-empty-to-avoid-conflict-with-guava", - ), - ("com.google.code.findbugs", "jsr305", "3.0.2"), - ("org.checkerframework", "checker-qual", "3.43.0"), - ("com.google.errorprone", "error_prone_annotations", "2.28.0"), - ("com.google.j2objc", "j2objc-annotations", "3.0.0"), - ("org.apache.maven", "maven-model-builder", "3.9.6"), - ("org.apache.maven", "maven-model", "3.9.6"), - ("org.apache.maven", "maven-repository-metadata", "3.9.6"), - ("org.apache.maven.resolver", "maven-resolver-spi", "1.9.18"), - ("org.apache.maven.resolver", "maven-resolver-util", "1.9.18"), - ("org.apache.maven.resolver", "maven-resolver-api", "1.9.18"), - ("org.apache.maven", "maven-artifact", "3.9.6"), - ("org.codehaus.plexus", "plexus-utils", "3.5.1"), - ("javax.inject", "javax.inject", "1"), - ("org.apache.httpcomponents", "httpclient", "4.5.14"), - ("org.apache.httpcomponents", "httpcore", "4.4.16"), - ("commons-codec", "commons-codec", "1.16.0"), - ("net.kyori", "examination-string", "1.3.0"), - ("net.kyori", "examination-api", "1.3.0"), - ("org.codehaus.plexus", "plexus-interpolation", "1.26"), - ("org.apache.maven", "maven-builder-support", "3.9.6"), - ("org.eclipse.sisu", "org.eclipse.sisu.inject", "0.9.0.M2"), - ("org.apache.commons", "commons-lang3", "3.12.0"), - ("net.kyori", "option", "1.1.0"), - // These are deps of patchbukkit itself - ("io.papermc.paper", "paper-api", "1.21.11-R0.1-SNAPSHOT"), - ("com.google.protobuf", "protobuf-java", "4.33.5"), - ("org.slf4j", "slf4j-jdk14", "2.0.16"), -]; - pub fn setup_j4rs(j4rs_folder: &Path) -> Result<()> { sync_embedded_resources(j4rs_folder)?; cleanup_stale_files(j4rs_folder); - resolve_maven_dependencies(j4rs_folder)?; - - Ok(()) -} - -fn resolve_maven_dependencies(j4rs_folder: &Path) -> Result<()> { - let jassets = j4rs_folder.join("jassets"); - - // Check if all expected jars already exist - let all_present = DEPENDENCIES - .iter() - .all(|&(_, artifact, version)| jassets.join(format!("{artifact}-{version}.jar")).exists()); - - if all_present { - tracing::debug!("All Maven dependencies already present, skipping JVM init"); - return Ok(()); - } - - tracing::info!("Some Maven dependencies missing, starting JVM to resolve..."); - - let jvm = JvmBuilder::new() - .with_maven_settings(MavenSettings::new(vec![MavenArtifactRepo::from( - "papermc::https://repo.papermc.io/repository/maven-public/", - )])) - .skip_setting_native_lib() - .with_base_path(j4rs_folder) - .build() - .map_err(|err| anyhow::anyhow!("JVM failed to init: {err:?}"))?; - - for &(group, artifact, version) in DEPENDENCIES { - let jar_path = jassets.join(format!("{artifact}-{version}.jar")); - if !jar_path.exists() { - tracing::info!("Downloading Maven dependency: {group}:{artifact}:{version}"); - jvm.deploy_artifact(&MavenArtifact::from(format!( - "{group}:{artifact}:{version}" - ))) - .map_err(|err| { - anyhow::anyhow!("Failed to deploy {group}:{artifact}:{version}: {err:?}") - })?; - } - } Ok(()) } @@ -142,29 +23,17 @@ fn cleanup_stale_files(j4rs_folder: &Path) { .map(|p| PathBuf::from(p.to_string())) .collect(); - let maven_jars: HashSet = DEPENDENCIES - .iter() - .map(|d| format!("{}-{}.jar", d.1, d.2)) - .collect(); - for entry in walkdir::WalkDir::new(j4rs_folder) .into_iter() .filter_map(|e| e.ok()) .filter(|e| e.file_type().is_file()) { let path = entry.path(); - if let Ok(rel_path) = path.strip_prefix(j4rs_folder) { - // Skip Maven-managed jars — handled by cleanup_stale_maven_jars - if let Some(file_name) = path.file_name().and_then(|f| f.to_str()) - && maven_jars.contains(file_name) - { - continue; - } - - if !embedded_paths.contains(rel_path) { - tracing::warn!("Removing stale embedded file: {}", rel_path.display()); - let _ = fs::remove_file(path); - } + if let Ok(rel_path) = path.strip_prefix(j4rs_folder) + && !embedded_paths.contains(rel_path) + { + tracing::warn!("Removing stale embedded file: {}", rel_path.display()); + let _ = fs::remove_file(path); } } } diff --git a/rust/src/lib.rs b/rust/src/lib.rs index 663e48a..fc2e52a 100644 --- a/rust/src/lib.rs +++ b/rust/src/lib.rs @@ -30,9 +30,17 @@ use crate::{ }, }; +const PATCHBUKKIT_PUMPKIN_VERSION: &str = env!("PATCHBUKKIT_PUMPKIN_VERSION"); +const PATCHBUKKIT_PUMPKIN_REVISION: &str = env!("PATCHBUKKIT_PUMPKIN_REVISION"); +const PATCHBUKKIT_PUMPKIN_REVISION_SHORT: &str = env!("PATCHBUKKIT_PUMPKIN_REVISION_SHORT"); + async fn on_load_inner(plugin: &PatchBukkitPlugin, server: Arc) -> Result<(), String> { server.init_log(); tracing::info!("Starting PatchBukkit"); + tracing::info!( + "Built against Pumpkin {PATCHBUKKIT_PUMPKIN_VERSION} ({PATCHBUKKIT_PUMPKIN_REVISION_SHORT})" + ); + tracing::debug!("Full Pumpkin dependency revision: {PATCHBUKKIT_PUMPKIN_REVISION}"); // Setup directories let dirs = setup_directories(&server)?; From 245f91a029c75f59609d0e41a9f1b27f4faa3a1b Mon Sep 17 00:00:00 2001 From: Felix Date: Sun, 12 Apr 2026 21:59:13 +0200 Subject: [PATCH 2/2] Trim PR scope for review feedback --- rust/build/main.rs | 4 +- rust/build/pumpkin.rs | 64 ------------------- rust/src/java/plugin/command_manager.rs | 81 ++++++++++++++++--------- rust/src/lib.rs | 8 --- 4 files changed, 52 insertions(+), 105 deletions(-) delete mode 100644 rust/build/pumpkin.rs diff --git a/rust/build/main.rs b/rust/build/main.rs index 27ab21a..09f8db3 100644 --- a/rust/build/main.rs +++ b/rust/build/main.rs @@ -1,9 +1,8 @@ -use crate::{java::setup_java, protobufs::setup_protobufs, pumpkin::setup_pumpkin_build_info}; +use crate::{java::setup_java, protobufs::setup_protobufs}; use std::{error::Error, path::PathBuf}; pub mod java; pub mod protobufs; -pub mod pumpkin; fn main() -> Result<(), Box> { println!("cargo::rerun-if-changed=rust/src/build.rs"); @@ -12,7 +11,6 @@ fn main() -> Result<(), Box> { let base = PathBuf::from(std::env::var("CARGO_MANIFEST_DIR").unwrap()); - setup_pumpkin_build_info(&base); setup_protobufs(base.clone()); setup_java(base); Ok(()) diff --git a/rust/build/pumpkin.rs b/rust/build/pumpkin.rs deleted file mode 100644 index 833853a..0000000 --- a/rust/build/pumpkin.rs +++ /dev/null @@ -1,64 +0,0 @@ -use std::{fs, path::Path}; - -fn extract_git_revision(source: &str) -> Option { - source.rsplit('#').next().and_then(|revision| { - let trimmed = revision.trim(); - if trimmed.is_empty() { - None - } else { - Some(trimmed.to_string()) - } - }) -} - -pub fn setup_pumpkin_build_info(base: &Path) { - let lock_path = base.join("Cargo.lock"); - let lock_contents = - fs::read_to_string(&lock_path).expect("Failed to read Cargo.lock for Pumpkin build info"); - - let mut in_pumpkin_package = false; - let mut pumpkin_version: Option = None; - let mut pumpkin_revision: Option = None; - - for line in lock_contents.lines() { - let trimmed = line.trim(); - - if trimmed == "[[package]]" { - if in_pumpkin_package { - break; - } - in_pumpkin_package = false; - pumpkin_version = None; - pumpkin_revision = None; - continue; - } - - if trimmed == r#"name = "pumpkin""# { - in_pumpkin_package = true; - continue; - } - - if !in_pumpkin_package { - continue; - } - - if let Some(version) = trimmed.strip_prefix(r#"version = ""#) { - pumpkin_version = Some(version.trim_end_matches('"').to_string()); - continue; - } - - if let Some(source) = trimmed.strip_prefix(r#"source = ""#) { - let source = source.trim_end_matches('"'); - pumpkin_revision = extract_git_revision(source); - } - } - - let pumpkin_version = pumpkin_version.unwrap_or_else(|| "unknown".to_string()); - let pumpkin_revision = pumpkin_revision.unwrap_or_else(|| "unknown".to_string()); - let pumpkin_revision_short = pumpkin_revision.chars().take(7).collect::(); - - println!("cargo::rustc-env=PATCHBUKKIT_PUMPKIN_VERSION={pumpkin_version}"); - println!("cargo::rustc-env=PATCHBUKKIT_PUMPKIN_REVISION={pumpkin_revision}"); - println!("cargo::rustc-env=PATCHBUKKIT_PUMPKIN_REVISION_SHORT={pumpkin_revision_short}"); - println!("cargo::rerun-if-changed={}", lock_path.display()); -} diff --git a/rust/src/java/plugin/command_manager.rs b/rust/src/java/plugin/command_manager.rs index 373071f..17e5d4e 100644 --- a/rust/src/java/plugin/command_manager.rs +++ b/rust/src/java/plugin/command_manager.rs @@ -4,7 +4,10 @@ use anyhow::Result; use j4rs::{Instance, InvocationArg, Jvm}; use pumpkin::{command::dispatcher::CommandError, plugin::Context}; use pumpkin_protocol::java::client::play::CommandSuggestion; -use pumpkin_util::permission::{Permission, PermissionDefault}; +use pumpkin_util::{ + PermissionLvl, + permission::{Permission, PermissionDefault}, +}; use tokio::sync::mpsc; use crate::{ @@ -187,7 +190,7 @@ impl CommandManager { cmd_data.description.clone().unwrap_or_default(), ); - let permission = build_permission_node(&plugin.name, &cmd_name); + let (permission, permission_default) = build_permission_node(&cmd_name, cmd_data); let registry = { let permission_manager = context.permission_manager.read().await; @@ -200,7 +203,7 @@ impl CommandManager { "Allows running the Bukkit command `{cmd_name}` from `{}`", plugin.name ), - PermissionDefault::Allow, + permission_default, )) { if e.contains("already registered") { tracing::debug!( @@ -318,48 +321,66 @@ impl CommandManager { } } -fn build_permission_node(plugin_name: &str, cmd_name: &str) -> String { - let plugin_segment = sanitize_permission_segment(plugin_name); - let command_segment = sanitize_permission_segment(cmd_name); - format!("{PATCHBUKKIT_PERMISSION_NAMESPACE}:command.{plugin_segment}.{command_segment}") -} - -fn sanitize_permission_segment(value: &str) -> String { - let sanitized: String = value - .chars() - .map(|ch| { - if ch.is_ascii_alphanumeric() || matches!(ch, '.' | '_' | '-') { - ch.to_ascii_lowercase() - } else { - '_' - } - }) - .collect(); - - if sanitized.is_empty() { - "unknown".to_string() +fn build_permission_node( + cmd_name: &str, + cmd_data: &config::spigot::Command, +) -> (String, PermissionDefault) { + if let Some(permission) = &cmd_data.permission { + ( + permission.clone(), + PermissionDefault::Op(PermissionLvl::Two), + ) } else { - sanitized + ( + format!("{PATCHBUKKIT_PERMISSION_NAMESPACE}:command.{cmd_name}"), + PermissionDefault::Allow, + ) } } #[cfg(test)] mod tests { + use pumpkin_util::{PermissionLvl, permission::PermissionDefault}; + + use crate::config::spigot::Command; + use super::build_permission_node; #[test] - fn permission_node_is_namespaced_and_stable() { + fn permission_node_uses_explicit_plugin_permission() { + let command = Command { + description: None, + usage: None, + aliases: None, + permission: Some("simplespawn.spawn".to_string()), + permission_message: None, + }; + assert_eq!( - build_permission_node("SimpleSpawn", "spawn"), - "patchbukkit:command.simplespawn.spawn" + build_permission_node("spawn", &command), + ( + "simplespawn.spawn".to_string(), + PermissionDefault::Op(PermissionLvl::Two) + ) ); } #[test] - fn permission_node_sanitizes_unfriendly_characters() { + fn permission_node_falls_back_to_patchbukkit_namespace() { + let command = Command { + description: None, + usage: None, + aliases: None, + permission: None, + permission_message: None, + }; + assert_eq!( - build_permission_node("Fancy Plugin", "Spawn-All"), - "patchbukkit:command.fancy_plugin.spawn-all" + build_permission_node("spawn", &command), + ( + "patchbukkit:command.spawn".to_string(), + PermissionDefault::Allow + ) ); } } diff --git a/rust/src/lib.rs b/rust/src/lib.rs index fc2e52a..663e48a 100644 --- a/rust/src/lib.rs +++ b/rust/src/lib.rs @@ -30,17 +30,9 @@ use crate::{ }, }; -const PATCHBUKKIT_PUMPKIN_VERSION: &str = env!("PATCHBUKKIT_PUMPKIN_VERSION"); -const PATCHBUKKIT_PUMPKIN_REVISION: &str = env!("PATCHBUKKIT_PUMPKIN_REVISION"); -const PATCHBUKKIT_PUMPKIN_REVISION_SHORT: &str = env!("PATCHBUKKIT_PUMPKIN_REVISION_SHORT"); - async fn on_load_inner(plugin: &PatchBukkitPlugin, server: Arc) -> Result<(), String> { server.init_log(); tracing::info!("Starting PatchBukkit"); - tracing::info!( - "Built against Pumpkin {PATCHBUKKIT_PUMPKIN_VERSION} ({PATCHBUKKIT_PUMPKIN_REVISION_SHORT})" - ); - tracing::debug!("Full Pumpkin dependency revision: {PATCHBUKKIT_PUMPKIN_REVISION}"); // Setup directories let dirs = setup_directories(&server)?;