mirror of
https://github.com/azalea-rs/simdnbt.git
synced 2025-08-02 15:36:03 +00:00
Compare commits
4 commits
be87181bd9
...
1505d233fd
Author | SHA1 | Date | |
---|---|---|---|
1505d233fd | |||
2fcede1cfe | |||
b399c48ffa | |||
80997f7f71 |
16 changed files with 184 additions and 131 deletions
206
Cargo.lock
generated
206
Cargo.lock
generated
|
@ -4,9 +4,9 @@ version = 4
|
|||
|
||||
[[package]]
|
||||
name = "adler2"
|
||||
version = "2.0.0"
|
||||
version = "2.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627"
|
||||
checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa"
|
||||
|
||||
[[package]]
|
||||
name = "aho-corasick"
|
||||
|
@ -25,9 +25,9 @@ checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299"
|
|||
|
||||
[[package]]
|
||||
name = "anstyle"
|
||||
version = "1.0.10"
|
||||
version = "1.0.11"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9"
|
||||
checksum = "862ed96ca487e809f1c8e5a8447f6ee2cf102f846893800b20cebdf541fc6bbd"
|
||||
|
||||
[[package]]
|
||||
name = "anyhow"
|
||||
|
@ -43,9 +43,9 @@ checksum = "dde20b3d026af13f561bdd0f15edf01fc734f0dafcedbaf42bba506a9517f223"
|
|||
|
||||
[[package]]
|
||||
name = "autocfg"
|
||||
version = "1.4.0"
|
||||
version = "1.5.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26"
|
||||
checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8"
|
||||
|
||||
[[package]]
|
||||
name = "azalea-buf"
|
||||
|
@ -66,7 +66,7 @@ source = "git+https://github.com/azalea-rs/azalea?rev=84e036ce3752ecf57904b0f5af
|
|||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.100",
|
||||
"syn 2.0.104",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -84,10 +84,16 @@ dependencies = [
|
|||
]
|
||||
|
||||
[[package]]
|
||||
name = "bumpalo"
|
||||
version = "3.17.0"
|
||||
name = "bitflags"
|
||||
version = "2.9.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1628fb46dfa0b37568d12e5edd512553eccf6a22a78e8bde00bb4aed84d5bdbf"
|
||||
checksum = "1b8e56985ec62d17e9c1001dc89c88ecd7dc08e47eba5ec7c29c7b5eeecde967"
|
||||
|
||||
[[package]]
|
||||
name = "bumpalo"
|
||||
version = "3.19.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "46c5e41b57b8bba42a04676d81cb89e9ee8e859a1a66f80a5a72e1cb76b34d43"
|
||||
|
||||
[[package]]
|
||||
name = "bytemuck"
|
||||
|
@ -124,9 +130,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "cc"
|
||||
version = "1.2.16"
|
||||
version = "1.2.31"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "be714c154be609ec7f5dad223a33bf1482fff90472de28f7362806e6d4832b8c"
|
||||
checksum = "c3a42d84bb6b69d3a8b3eaacf0d88f179e1929695e1ad012b6cf64d9caaa5fd2"
|
||||
dependencies = [
|
||||
"jobserver",
|
||||
"libc",
|
||||
|
@ -141,9 +147,9 @@ checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c"
|
|||
|
||||
[[package]]
|
||||
name = "cfg-if"
|
||||
version = "1.0.0"
|
||||
version = "1.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
|
||||
checksum = "9555578bc9e57714c812a1f84e4fc5b4d21fcb063490c624de019f7464c91268"
|
||||
|
||||
[[package]]
|
||||
name = "ciborium"
|
||||
|
@ -174,18 +180,18 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "clap"
|
||||
version = "4.5.32"
|
||||
version = "4.5.42"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6088f3ae8c3608d19260cd7445411865a485688711b78b5be70d78cd96136f83"
|
||||
checksum = "ed87a9d530bb41a67537289bafcac159cb3ee28460e0a4571123d2a778a6a882"
|
||||
dependencies = [
|
||||
"clap_builder",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "clap_builder"
|
||||
version = "4.5.32"
|
||||
version = "4.5.42"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "22a7ef7f676155edfb82daa97f99441f3ebf4a58d5e32f295a56259f1b6facc8"
|
||||
checksum = "64f4f3f3c77c94aff3c7e9aac9a2ca1974a5adf392a8bb751e827d6d127ab966"
|
||||
dependencies = [
|
||||
"anstyle",
|
||||
"clap_lex",
|
||||
|
@ -193,9 +199,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "clap_lex"
|
||||
version = "0.7.4"
|
||||
version = "0.7.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6"
|
||||
checksum = "b94f61472cee1439c0b966b47e3aca9ae07e45d070759512cd390ea2bebc6675"
|
||||
|
||||
[[package]]
|
||||
name = "compact_str"
|
||||
|
@ -213,9 +219,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "crab_nbt"
|
||||
version = "0.2.9"
|
||||
version = "0.2.11"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ce6bf9e479d74bed4463ad8f09f0fe471300423152a3a90f8b8e3a613af1de96"
|
||||
checksum = "66a3ceff0aac8c616138fcc265489fec30427fb9d84922095bc9e555966c308c"
|
||||
dependencies = [
|
||||
"bytes",
|
||||
"cesu8",
|
||||
|
@ -225,34 +231,31 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "crc32fast"
|
||||
version = "1.4.2"
|
||||
version = "1.5.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3"
|
||||
checksum = "9481c1c90cbf2ac953f07c8d4a58aa3945c425b7185c9154d67a65e4230da511"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "criterion"
|
||||
version = "0.5.1"
|
||||
version = "0.7.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f2b12d017a929603d80db1831cd3a24082f8137ce19c69e6447f54f5fc8d692f"
|
||||
checksum = "e1c047a62b0cc3e145fa84415a3191f628e980b194c2755aa12300a4e6cbd928"
|
||||
dependencies = [
|
||||
"anes",
|
||||
"cast",
|
||||
"ciborium",
|
||||
"clap",
|
||||
"criterion-plot",
|
||||
"is-terminal",
|
||||
"itertools",
|
||||
"num-traits",
|
||||
"once_cell",
|
||||
"oorandom",
|
||||
"plotters",
|
||||
"rayon",
|
||||
"regex",
|
||||
"serde",
|
||||
"serde_derive",
|
||||
"serde_json",
|
||||
"tinytemplate",
|
||||
"walkdir",
|
||||
|
@ -260,9 +263,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "criterion-plot"
|
||||
version = "0.5.0"
|
||||
version = "0.6.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6b50826342786a51a89e2da3a28f1c32b06e387201bc2d19791f622c673706b1"
|
||||
checksum = "9b1bcc0dc7dfae599d84ad0b1a55f80cde8af3725da8313b528da95ef783e338"
|
||||
dependencies = [
|
||||
"cast",
|
||||
"itertools",
|
||||
|
@ -295,9 +298,9 @@ checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28"
|
|||
|
||||
[[package]]
|
||||
name = "crunchy"
|
||||
version = "0.2.3"
|
||||
version = "0.2.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "43da5946c66ffcc7745f48db692ffbb10a83bfe0afd96235c5c2a4fb23994929"
|
||||
checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5"
|
||||
|
||||
[[package]]
|
||||
name = "derive_more"
|
||||
|
@ -316,7 +319,7 @@ checksum = "bda628edc44c4bb645fbe0f758797143e4e07926f7ebf4e9bdfbd3d2ce621df3"
|
|||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.100",
|
||||
"syn 2.0.104",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -334,7 +337,7 @@ dependencies = [
|
|||
"heck",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.100",
|
||||
"syn 2.0.104",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -351,14 +354,26 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "flate2"
|
||||
version = "1.1.0"
|
||||
version = "1.1.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "11faaf5a5236997af9848be0bef4db95824b1d534ebc64d0f0c6cf3e67bd38dc"
|
||||
checksum = "4a3d7db9596fecd151c5f638c0ee5d5bd487b6e0ea232e5dc96d5250f6f94b1d"
|
||||
dependencies = [
|
||||
"crc32fast",
|
||||
"miniz_oxide",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "getrandom"
|
||||
version = "0.3.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "26145e563e54f2cadc477553f1ec5ee650b00862f0a58bcd12cbdc5f0ea2d2f4"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"libc",
|
||||
"r-efi",
|
||||
"wasi",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "graphite_binary"
|
||||
version = "0.1.0"
|
||||
|
@ -386,9 +401,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "half"
|
||||
version = "2.5.0"
|
||||
version = "2.6.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7db2ff139bba50379da6aa0766b52fdcb62cb5b263009b09ed58ba604e14bbd1"
|
||||
checksum = "459196ed295495a68f7d7fe1d84f6c4b7ff0e21fe3017b2f283c6fac3ad803c9"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"crunchy",
|
||||
|
@ -411,28 +426,11 @@ dependencies = [
|
|||
"flate2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "hermit-abi"
|
||||
version = "0.5.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "fbd780fe5cc30f81464441920d82ac8740e2e46b29a6fad543ddd075229ce37e"
|
||||
|
||||
[[package]]
|
||||
name = "is-terminal"
|
||||
version = "0.4.16"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e04d7f318608d35d4b61ddd75cbdaee86b023ebe2bd5a66ee0915f0bf93095a9"
|
||||
dependencies = [
|
||||
"hermit-abi",
|
||||
"libc",
|
||||
"windows-sys",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "itertools"
|
||||
version = "0.10.5"
|
||||
version = "0.13.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473"
|
||||
checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186"
|
||||
dependencies = [
|
||||
"either",
|
||||
]
|
||||
|
@ -445,10 +443,11 @@ checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c"
|
|||
|
||||
[[package]]
|
||||
name = "jobserver"
|
||||
version = "0.1.32"
|
||||
version = "0.1.33"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0"
|
||||
checksum = "38f262f097c174adebe41eb73d66ae9c06b2844fb0da69969647bbddd9b0538a"
|
||||
dependencies = [
|
||||
"getrandom",
|
||||
"libc",
|
||||
]
|
||||
|
||||
|
@ -464,9 +463,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
version = "0.2.171"
|
||||
version = "0.2.174"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c19937216e9d3aa9956d9bb8dfc0b0c8beb6058fc4f7a4dc4d850edf86a237d6"
|
||||
checksum = "1171693293099992e19cddea4e8b849964e9846f4acee11b3948bcc337be8776"
|
||||
|
||||
[[package]]
|
||||
name = "libfuzzer-sys"
|
||||
|
@ -480,9 +479,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "libmimalloc-sys"
|
||||
version = "0.1.39"
|
||||
version = "0.1.43"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "23aa6811d3bd4deb8a84dde645f943476d13b248d818edcf8ce0b2f37f036b44"
|
||||
checksum = "bf88cd67e9de251c1781dbe2f641a1a3ad66eaae831b8a2c38fbdc5ddae16d4d"
|
||||
dependencies = [
|
||||
"cc",
|
||||
"libc",
|
||||
|
@ -490,30 +489,30 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "log"
|
||||
version = "0.4.26"
|
||||
version = "0.4.27"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "30bde2b3dc3671ae49d8e2e9f044c7c005836e7a023ee57cffa25ab82764bb9e"
|
||||
checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94"
|
||||
|
||||
[[package]]
|
||||
name = "memchr"
|
||||
version = "2.7.4"
|
||||
version = "2.7.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3"
|
||||
checksum = "32a282da65faaf38286cf3be983213fcf1d2e2a58700e808f83f4ea9a4804bc0"
|
||||
|
||||
[[package]]
|
||||
name = "mimalloc"
|
||||
version = "0.1.43"
|
||||
version = "0.1.47"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "68914350ae34959d83f732418d51e2427a794055d0b9529f48259ac07af65633"
|
||||
checksum = "b1791cbe101e95af5764f06f20f6760521f7158f69dbf9d6baf941ee1bf6bc40"
|
||||
dependencies = [
|
||||
"libmimalloc-sys",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "miniz_oxide"
|
||||
version = "0.8.5"
|
||||
version = "0.8.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8e3e04debbb59698c15bacbb6d93584a8c0ca9cc3213cb423d31f760d8843ce5"
|
||||
checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316"
|
||||
dependencies = [
|
||||
"adler2",
|
||||
]
|
||||
|
@ -529,9 +528,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "once_cell"
|
||||
version = "1.21.1"
|
||||
version = "1.21.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d75b0bedcc4fe52caa0e03d9f1151a323e4aa5e2d78ba3580400cd3c9e2bc4bc"
|
||||
checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d"
|
||||
|
||||
[[package]]
|
||||
name = "oorandom"
|
||||
|
@ -581,9 +580,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "proc-macro2"
|
||||
version = "1.0.94"
|
||||
version = "1.0.95"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a31971752e70b8b2686d7e46ec17fb38dad4051d94024c88df49b667caea9c84"
|
||||
checksum = "02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778"
|
||||
dependencies = [
|
||||
"unicode-ident",
|
||||
]
|
||||
|
@ -597,6 +596,12 @@ dependencies = [
|
|||
"proc-macro2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "r-efi"
|
||||
version = "5.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f"
|
||||
|
||||
[[package]]
|
||||
name = "rayon"
|
||||
version = "1.10.0"
|
||||
|
@ -657,9 +662,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "rustversion"
|
||||
version = "1.0.20"
|
||||
version = "1.0.21"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "eded382c5f5f786b989652c49544c4877d9f015cc22e145a5ea8ea66c2921cd2"
|
||||
checksum = "8a0d197bd2c9dc6e53b84da9556a69ba4cdfab8619eb41a8bd1cc2027a0f6b1d"
|
||||
|
||||
[[package]]
|
||||
name = "ryu"
|
||||
|
@ -708,14 +713,14 @@ checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00"
|
|||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.100",
|
||||
"syn 2.0.104",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "serde_json"
|
||||
version = "1.0.140"
|
||||
version = "1.0.142"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373"
|
||||
checksum = "030fedb782600dcbd6f02d479bf0d817ac3bb40d644745b769d6a96bc3afc5a7"
|
||||
dependencies = [
|
||||
"itoa",
|
||||
"memchr",
|
||||
|
@ -738,8 +743,7 @@ checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
|
|||
[[package]]
|
||||
name = "simd_cesu8"
|
||||
version = "1.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7c14f02c32cc4ef5068b0e15bee4513942f59165add7778a518b4d507b3b97ab"
|
||||
source = "git+https://github.com/EightFactorial/simd_cesu8#546354e0c62ffd08de95cfedc4a09ed7683adac4"
|
||||
dependencies = [
|
||||
"rustc_version",
|
||||
"simdutf8",
|
||||
|
@ -747,7 +751,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "simdnbt"
|
||||
version = "0.7.1"
|
||||
version = "0.7.2"
|
||||
dependencies = [
|
||||
"azalea-nbt",
|
||||
"byteorder",
|
||||
|
@ -772,7 +776,7 @@ version = "0.7.0"
|
|||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.100",
|
||||
"syn 2.0.104",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -808,9 +812,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "syn"
|
||||
version = "2.0.100"
|
||||
version = "2.0.104"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b09a44accad81e1ba1cd74a32461ba89dee89095ba17b32f5d03683b1b1fc2a0"
|
||||
checksum = "17b6f705963418cdb9927482fa304bc562ece2fdd4f616084c50b7023b435a40"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
|
@ -843,7 +847,7 @@ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1"
|
|||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.100",
|
||||
"syn 2.0.104",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -854,7 +858,7 @@ checksum = "7f7cf42b4507d8ea322120659672cf1b9dbb93f8f2d4ecfd6e51350ff5b17a1d"
|
|||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.100",
|
||||
"syn 2.0.104",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -886,7 +890,7 @@ checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d"
|
|||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.100",
|
||||
"syn 2.0.104",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -944,6 +948,15 @@ dependencies = [
|
|||
"winapi-util",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wasi"
|
||||
version = "0.14.2+wasi-0.2.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9683f9a5a998d873c0d21fcbe3c083009670149a8fab228644b8bd36b2c48cb3"
|
||||
dependencies = [
|
||||
"wit-bindgen-rt",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wasm-bindgen"
|
||||
version = "0.2.100"
|
||||
|
@ -966,7 +979,7 @@ dependencies = [
|
|||
"log",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.100",
|
||||
"syn 2.0.104",
|
||||
"wasm-bindgen-shared",
|
||||
]
|
||||
|
||||
|
@ -988,7 +1001,7 @@ checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de"
|
|||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.100",
|
||||
"syn 2.0.104",
|
||||
"wasm-bindgen-backend",
|
||||
"wasm-bindgen-shared",
|
||||
]
|
||||
|
@ -1093,3 +1106,12 @@ name = "windows_x86_64_msvc"
|
|||
version = "0.52.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
|
||||
|
||||
[[package]]
|
||||
name = "wit-bindgen-rt"
|
||||
version = "0.39.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6f42320e61fe2cfd34354ecb597f86f413484a798ba44a8ca1165c58d42da6c1"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
]
|
||||
|
|
|
@ -9,3 +9,6 @@ debug = false
|
|||
[profile.bench]
|
||||
lto = true
|
||||
debug = true
|
||||
|
||||
[patch.crates-io]
|
||||
simd_cesu8 = { git = "https://github.com/EightFactorial/simd_cesu8" }
|
||||
|
|
|
@ -12,8 +12,15 @@ libfuzzer-sys = "0.4"
|
|||
simdnbt = { path = "../simdnbt" }
|
||||
|
||||
[[bin]]
|
||||
name = "fuzz_target_1"
|
||||
path = "fuzz_targets/fuzz_target_1.rs"
|
||||
name = "borrow_read"
|
||||
path = "fuzz_targets/borrow_read.rs"
|
||||
test = false
|
||||
doc = false
|
||||
bench = false
|
||||
|
||||
[[bin]]
|
||||
name = "owned_write"
|
||||
path = "fuzz_targets/owned_write.rs"
|
||||
test = false
|
||||
doc = false
|
||||
bench = false
|
||||
|
|
11
fuzz/fuzz_targets/borrow_read.rs
Normal file
11
fuzz/fuzz_targets/borrow_read.rs
Normal file
|
@ -0,0 +1,11 @@
|
|||
#![no_main]
|
||||
|
||||
use std::io::Cursor;
|
||||
|
||||
use libfuzzer_sys::fuzz_target;
|
||||
|
||||
fuzz_target!(|data: &[u8]| {
|
||||
if let Ok(simdnbt::borrow::Nbt::Some(r)) = simdnbt::borrow::read(&mut Cursor::new(data)) {
|
||||
r.as_compound().to_owned();
|
||||
}
|
||||
});
|
|
@ -6,6 +6,6 @@ fuzz_target!(|data: &[u8]| {
|
|||
if let Ok(simdnbt::borrow::Nbt::Some(r)) =
|
||||
simdnbt::borrow::read(&mut std::io::Cursor::new(data))
|
||||
{
|
||||
r.as_compound().to_owned();
|
||||
simdnbt::owned::BaseNbt::write_unnamed(&r.as_compound().to_owned().into(), &mut Vec::new());
|
||||
}
|
||||
});
|
|
@ -9,9 +9,9 @@ repository = "https://github.com/azalea-rs/simdnbt"
|
|||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
proc-macro2 = "1.0.94"
|
||||
proc-macro2 = "1.0.95"
|
||||
quote = "1.0.40"
|
||||
syn = "2.0.100"
|
||||
syn = "2.0.104"
|
||||
|
||||
[lib]
|
||||
proc-macro = true
|
||||
|
|
|
@ -10,14 +10,14 @@ repository = "https://github.com/azalea-rs/simdnbt"
|
|||
|
||||
[dependencies]
|
||||
byteorder = "1.5.0"
|
||||
flate2 = "^1.1.0"
|
||||
simd_cesu8 = "1.0.1"
|
||||
flate2 = "^1.1.2"
|
||||
simd_cesu8 = { version = "1.0.1", git = "https://github.com/EightFactorial/simd_cesu8" }
|
||||
simdnbt-derive = { version = "0.7.0", path = "../simdnbt-derive", optional = true }
|
||||
thiserror = "2.0.12"
|
||||
|
||||
[dev-dependencies]
|
||||
criterion = { version = "0.5.1", features = ["html_reports"] }
|
||||
mimalloc = "0.1.43"
|
||||
criterion = { version = "0.7.0", features = ["html_reports"] }
|
||||
mimalloc = "0.1.47"
|
||||
|
||||
graphite_binary = "0.1.0"
|
||||
valence_nbt = { version = "0.8.0", features = ["binary"] }
|
||||
|
@ -25,13 +25,14 @@ fastnbt = "2.5.0"
|
|||
azalea-nbt = { git = "https://github.com/azalea-rs/azalea", rev = "84e036ce3752ecf57904b0f5aff1f33d43e95a32" }
|
||||
hematite-nbt = { version = "0.5.2", default-features = false }
|
||||
shen-nbt5 = "0.4.6"
|
||||
crab_nbt = "0.2.9"
|
||||
crab_nbt = "0.2.11"
|
||||
ussr-nbt = "0.2.1"
|
||||
|
||||
[features]
|
||||
default = ["derive"]
|
||||
derive = ["dep:simdnbt-derive"]
|
||||
|
||||
|
||||
[profile.release]
|
||||
lto = true
|
||||
debug = false
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
use std::{
|
||||
fs::File,
|
||||
hint::black_box,
|
||||
io::{Cursor, Read},
|
||||
};
|
||||
|
||||
use criterion::{black_box, criterion_group, criterion_main, Criterion, Throughput};
|
||||
use criterion::{criterion_group, criterion_main, Criterion, Throughput};
|
||||
use flate2::read::GzDecoder;
|
||||
|
||||
fn bench_read_file(filename: &str, c: &mut Criterion) {
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
use std::{
|
||||
collections::HashMap,
|
||||
fs::File,
|
||||
hint::black_box,
|
||||
io::{Cursor, Read},
|
||||
};
|
||||
|
||||
use criterion::{black_box, criterion_group, criterion_main, Criterion, Throughput};
|
||||
use criterion::{criterion_group, criterion_main, Criterion, Throughput};
|
||||
use flate2::read::GzDecoder;
|
||||
|
||||
pub fn bench_read_file(filename: &str, c: &mut Criterion) {
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
use std::{
|
||||
fs::File,
|
||||
hint::black_box,
|
||||
io::{Cursor, Read},
|
||||
};
|
||||
|
||||
use criterion::{black_box, criterion_group, criterion_main, Criterion, Throughput};
|
||||
use criterion::{criterion_group, criterion_main, Criterion, Throughput};
|
||||
use flate2::read::GzDecoder;
|
||||
|
||||
fn bench_file(filename: &str, c: &mut Criterion) {
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
use std::{
|
||||
fs::File,
|
||||
hint::black_box,
|
||||
io::{Cursor, Read},
|
||||
};
|
||||
|
||||
use criterion::{black_box, criterion_group, criterion_main, Criterion, Throughput};
|
||||
use criterion::{criterion_group, criterion_main, Criterion, Throughput};
|
||||
use flate2::read::GzDecoder;
|
||||
|
||||
fn bench_file(filename: &str, c: &mut Criterion) {
|
||||
|
|
|
@ -404,7 +404,7 @@ impl<'a, 'tape> NbtList<'a, 'tape> {
|
|||
},
|
||||
})
|
||||
}
|
||||
pub fn int_arrays(&self) -> Option<&[RawList<i32>]> {
|
||||
pub fn int_arrays(&self) -> Option<&[RawList<'_, i32>]> {
|
||||
let el = self.element();
|
||||
if el.kind() != TapeTagKind::IntArrayList {
|
||||
return None;
|
||||
|
@ -424,7 +424,7 @@ impl<'a, 'tape> NbtList<'a, 'tape> {
|
|||
};
|
||||
Some(slice)
|
||||
}
|
||||
pub fn long_arrays(&self) -> Option<&[RawList<i64>]> {
|
||||
pub fn long_arrays(&self) -> Option<&[RawList<'_, i64>]> {
|
||||
let el = self.element();
|
||||
if el.kind() != TapeTagKind::LongArrayList {
|
||||
return None;
|
||||
|
@ -566,7 +566,7 @@ impl<'a, 'tape> NbtListList<'a, 'tape> {
|
|||
self.iter.clone().last()
|
||||
}
|
||||
|
||||
pub fn is_empty(self) -> bool {
|
||||
pub fn is_empty(&self) -> bool {
|
||||
self.approx_len() == 0
|
||||
}
|
||||
}
|
||||
|
@ -622,7 +622,7 @@ impl<'a: 'tape, 'tape> NbtListListIter<'a, 'tape> {
|
|||
self.approx_length
|
||||
}
|
||||
|
||||
pub fn is_empty(self) -> bool {
|
||||
pub fn is_empty(&self) -> bool {
|
||||
self.approx_len() == 0
|
||||
}
|
||||
}
|
||||
|
@ -698,7 +698,7 @@ impl<'a, 'tape> NbtCompoundList<'a, 'tape> {
|
|||
self.iter.clone().last()
|
||||
}
|
||||
|
||||
pub fn is_empty(self) -> bool {
|
||||
pub fn is_empty(&self) -> bool {
|
||||
self.approx_len() == 0
|
||||
}
|
||||
}
|
||||
|
@ -753,7 +753,7 @@ impl<'a: 'tape, 'tape> NbtCompoundListIter<'a, 'tape> {
|
|||
self.approx_length
|
||||
}
|
||||
|
||||
pub fn is_empty(self) -> bool {
|
||||
pub fn is_empty(&self) -> bool {
|
||||
self.approx_len() == 0
|
||||
}
|
||||
}
|
||||
|
|
|
@ -133,14 +133,9 @@ impl<T, A: Allocator> FastVec<T, A> {
|
|||
self.ptr.cast().as_ptr()
|
||||
}
|
||||
|
||||
pub fn to_vec(self) -> Vec<T> {
|
||||
let vec = unsafe {
|
||||
Vec::from_raw_parts(
|
||||
self.ptr.cast().as_ptr() as *mut T,
|
||||
self.len(),
|
||||
self.capacity(),
|
||||
)
|
||||
};
|
||||
pub fn into_vec(self) -> Vec<T> {
|
||||
let vec =
|
||||
unsafe { Vec::from_raw_parts(self.ptr.cast().as_ptr(), self.len(), self.capacity()) };
|
||||
// the allocation was moved so don't drop it
|
||||
mem::forget(self);
|
||||
vec
|
||||
|
@ -193,7 +188,7 @@ impl<T, A: Allocator> FastVec<T, A> {
|
|||
cur: ptr.add(len),
|
||||
end,
|
||||
ptr: ptr.cast(),
|
||||
alloc: alloc,
|
||||
alloc,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -256,7 +251,7 @@ impl<T> From<Vec<T>> for FastVec<T> {
|
|||
}
|
||||
impl<T> From<FastVec<T>> for Vec<T> {
|
||||
fn from(fastvec: FastVec<T>) -> Self {
|
||||
fastvec.to_vec()
|
||||
fastvec.into_vec()
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -276,10 +271,13 @@ impl<'orig, T> FastVecFromVec<'orig, T> {
|
|||
}
|
||||
}
|
||||
impl<T> Drop for FastVecFromVec<'_, T> {
|
||||
/// Move the FastVec contents back into the original Vec.
|
||||
fn drop(&mut self) {
|
||||
// we intentionally don't drop the fastvec since the allocation is moved into
|
||||
// the vec
|
||||
*self.original = unsafe { ManuallyDrop::take(&mut self.fastvec).to_vec() };
|
||||
// we intentionally don't drop anything here
|
||||
unsafe {
|
||||
let new_vec = ManuallyDrop::take(&mut self.fastvec).into_vec();
|
||||
(self.original as *mut Vec<T>).write(new_vec);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#![doc = include_str!("../README.md")]
|
||||
#![feature(portable_simd)]
|
||||
#![feature(array_chunks)]
|
||||
#![allow(internal_features)]
|
||||
#![feature(core_intrinsics)]
|
||||
#![feature(allocator_api)]
|
||||
|
|
|
@ -24,8 +24,7 @@ pub struct Mutf8String {
|
|||
#[inline]
|
||||
fn is_plain_ascii(slice: &[u8]) -> bool {
|
||||
let mut is_plain_ascii = true;
|
||||
let chunks_32_exact = slice.array_chunks::<32>();
|
||||
let mut remainder = chunks_32_exact.remainder();
|
||||
let (chunks_32_exact, mut remainder) = slice.as_chunks::<32>();
|
||||
if remainder.len() > 16 {
|
||||
let chunk;
|
||||
(chunk, remainder) = remainder.split_first_chunk::<16>().unwrap();
|
||||
|
@ -82,7 +81,7 @@ impl Mutf8Str {
|
|||
// we can't implement FromStr on Cow<Mutf8Str>
|
||||
#[allow(clippy::should_implement_trait)]
|
||||
#[inline]
|
||||
pub fn from_str(s: &str) -> Cow<Mutf8Str> {
|
||||
pub fn from_str(s: &str) -> Cow<'_, Mutf8Str> {
|
||||
match mutf8::encode(s) {
|
||||
Cow::Borrowed(slice) => Cow::Borrowed(Mutf8Str::from_slice(slice)),
|
||||
Cow::Owned(vec) => Cow::Owned(Mutf8String { vec }),
|
||||
|
@ -92,7 +91,7 @@ impl Mutf8Str {
|
|||
/// Try to convert this MUTF-8 string into a UTF-8 string. If the data isn't
|
||||
/// valid MUTF-8, it'll return an empty string without erroring.
|
||||
#[inline]
|
||||
pub fn to_str(&self) -> Cow<str> {
|
||||
pub fn to_str(&self) -> Cow<'_, str> {
|
||||
// fast check to skip if none of the bytes have the top bit set.
|
||||
// note that this allows some valid utf8 but invalid mutf8 through as
|
||||
// null bytes aren't allowed in mutf8.
|
||||
|
@ -108,7 +107,7 @@ impl Mutf8Str {
|
|||
}
|
||||
|
||||
#[inline]
|
||||
pub fn to_string_lossy(&self) -> Cow<str> {
|
||||
pub fn to_string_lossy(&self) -> Cow<'_, str> {
|
||||
mutf8::decode_lossy(&self.slice)
|
||||
}
|
||||
|
||||
|
|
|
@ -810,4 +810,13 @@ mod tests {
|
|||
|
||||
assert_ne!(nbt, modified_nbt);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn write_compound() {
|
||||
let nbt = BaseNbt {
|
||||
name: "".into(),
|
||||
tag: NbtCompound { values: vec![] },
|
||||
};
|
||||
BaseNbt::write_unnamed(&nbt, &mut Vec::new());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue