diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 76420f56..18a1e44d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -52,7 +52,7 @@ jobs: strategy: matrix: os: [ubuntu-latest] - rust: ["1.86", stable, nightly] + rust: ["1.87", stable, nightly] lock: ["Cargo.lock", "Cargo.lock.min"] runs-on: ${{ matrix.os }} needs: lock @@ -174,7 +174,7 @@ jobs: strategy: matrix: os: [ubuntu-latest] - rust: ["1.86", stable] + rust: ["1.87", stable] lock: ["Cargo.lock", "Cargo.lock.min"] runs-on: ${{ matrix.os }} needs: lock diff --git a/Cargo.toml b/Cargo.toml index 896448b2..59fd0c1f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -40,42 +40,43 @@ edition = "2024" authors = ["Juniper Tyree "] repository = "https://github.com/juntyr/numcodecs-rs" license = "MPL-2.0" -rust-version = "1.86" +rust-version = "1.87" [workspace.dependencies] # workspace-internal numcodecs crates -numcodecs = { version = "0.2.1", path = "crates/numcodecs", default-features = false } -numcodecs-python = { version = "0.6", path = "crates/numcodecs-python", default-features = false } -numcodecs-wasm-builder = { version = "0.1", path = "crates/numcodecs-wasm-builder", default-features = false } -numcodecs-wasm-logging = { version = "0.1", path = "crates/numcodecs-wasm-logging", default-features = false } -numcodecs-wasm-guest = { version = "0.2", path = "crates/numcodecs-wasm-guest", default-features = false } -numcodecs-wasm-host = { version = "0.1", path = "crates/numcodecs-wasm-host", default-features = false } -numcodecs-wasm-host-reproducible = { version = "0.1", path = "crates/numcodecs-wasm-host-reproducible", default-features = false } +numcodecs = { version = "0.3", path = "crates/numcodecs", default-features = false } +numcodecs-python = { version = "0.7", path = "crates/numcodecs-python", default-features = false } +numcodecs-wasm-builder = { version = "0.2", path = "crates/numcodecs-wasm-builder", default-features = false } +numcodecs-wasm-guest = { version = "0.3", path = "crates/numcodecs-wasm-guest", default-features = false } +numcodecs-wasm-host = { version = "0.2", path = "crates/numcodecs-wasm-host", default-features = false } +numcodecs-wasm-host-reproducible = { version = "0.2.1", path = "crates/numcodecs-wasm-host-reproducible", default-features = false } +numcodecs-wasm-logging = { version = "0.2", path = "crates/numcodecs-wasm-logging", default-features = false } -numcodecs-wasm = { version = "0.1", path = "py/numcodecs-wasm", default-features = false } +numcodecs-wasm = { version = "0.2.1", path = "py/numcodecs-wasm", default-features = false } # workspace-internal codecs crates -numcodecs-asinh = { version = "0.3", path = "codecs/asinh", default-features = false } -numcodecs-bit-round = { version = "0.3", path = "codecs/bit-round", default-features = false } -numcodecs-fixed-offset-scale = { version = "0.3", path = "codecs/fixed-offset-scale", default-features = false } -numcodecs-fourier-network = { version = "0.2", path = "codecs/fourier-network", default-features = false } -numcodecs-identity = { version = "0.3", path = "codecs/identity", default-features = false } -numcodecs-jpeg2000 = { version = "0.2", path = "codecs/jpeg2000", default-features = false } -numcodecs-linear-quantize = { version = "0.4", path = "codecs/linear-quantize", default-features = false } -numcodecs-log = { version = "0.4", path = "codecs/log", default-features = false } -numcodecs-pco = { version = "0.2", path = "codecs/pco", default-features = false } -numcodecs-random-projection = { version = "0.3", path = "codecs/random-projection", default-features = false } -numcodecs-reinterpret = { version = "0.3", path = "codecs/reinterpret", default-features = false } -numcodecs-round = { version = "0.3", path = "codecs/round", default-features = false } -numcodecs-stochastic-rounding = { version = "0.1", path = "codecs/stochastic-rounding", default-features = false } -numcodecs-swizzle-reshape = { version = "0.3", path = "codecs/swizzle-reshape", default-features = false } -numcodecs-sz3 = { version = "0.6", path = "codecs/sz3", default-features = false } -numcodecs-tthresh = { version = "0.2", path = "codecs/tthresh", default-features = false } -numcodecs-uniform-noise = { version = "0.3", path = "codecs/uniform-noise", default-features = false } -numcodecs-zfp = { version = "0.5", path = "codecs/zfp", default-features = false } -numcodecs-zfp-classic = { version = "0.3", path = "codecs/zfp-classic", default-features = false } -numcodecs-zlib = { version = "0.3", path = "codecs/zlib", default-features = false } -numcodecs-zstd = { version = "0.3", path = "codecs/zstd", default-features = false } +numcodecs-asinh = { version = "0.4", path = "codecs/asinh", default-features = false } +numcodecs-bit-round = { version = "0.4", path = "codecs/bit-round", default-features = false } +numcodecs-fixed-offset-scale = { version = "0.4", path = "codecs/fixed-offset-scale", default-features = false } +numcodecs-fourier-network = { version = "0.3", path = "codecs/fourier-network", default-features = false } +numcodecs-identity = { version = "0.4", path = "codecs/identity", default-features = false } +numcodecs-jpeg2000 = { version = "0.3", path = "codecs/jpeg2000", default-features = false } +numcodecs-linear-quantize = { version = "0.5", path = "codecs/linear-quantize", default-features = false } +numcodecs-log = { version = "0.5", path = "codecs/log", default-features = false } +numcodecs-pco = { version = "0.3", path = "codecs/pco", default-features = false } +numcodecs-random-projection = { version = "0.4", path = "codecs/random-projection", default-features = false } +numcodecs-reinterpret = { version = "0.4", path = "codecs/reinterpret", default-features = false } +numcodecs-round = { version = "0.5", path = "codecs/round", default-features = false } +numcodecs-sperr = { version = "0.2", path = "codecs/sperr", default-features = false } +numcodecs-stochastic-rounding = { version = "0.2", path = "codecs/stochastic-rounding", default-features = false } +numcodecs-swizzle-reshape = { version = "0.4", path = "codecs/swizzle-reshape", default-features = false } +numcodecs-sz3 = { version = "0.7", path = "codecs/sz3", default-features = false } +numcodecs-tthresh = { version = "0.3", path = "codecs/tthresh", default-features = false } +numcodecs-uniform-noise = { version = "0.4", path = "codecs/uniform-noise", default-features = false } +numcodecs-zfp = { version = "0.6", path = "codecs/zfp", default-features = false } +numcodecs-zfp-classic = { version = "0.4", path = "codecs/zfp-classic", default-features = false } +numcodecs-zlib = { version = "0.4", path = "codecs/zlib", default-features = false } +numcodecs-zstd = { version = "0.4", path = "codecs/zstd", default-features = false } # crates.io third-party dependencies anyhow = { version = "1.0.93", default-features = false } @@ -90,17 +91,17 @@ simple_logger = { version = "5.0", default-features = false } miniz_oxide = { version = "0.8.5", default-features = false } ndarray = { version = "0.16.1", default-features = false } # keep in sync with numpy ndarray-rand = { version = "0.15", default-features = false } -numpy = { version = "0.25", default-features = false } +numpy = { version = "0.26", default-features = false } num-traits = { version = "0.2.19", default-features = false } openjpeg-sys = { version = "1.0", default-features = false } pco = { version = "0.4.5", default-features = false } polonius-the-crab = { version = "0.4", default-features = false } postcard = { version = "1.0.8", default-features = false } -pyodide-webassembly-runtime-layer = { version = "0.8", default-features = false } -pyo3 = { version = "0.25", default-features = false } -pyo3-error = { version = "0.5", default-features = false } -pyo3-log = { version = "0.12.4", default-features = false } -pythonize = { version = "0.25", default-features = false } +pyodide-webassembly-runtime-layer = { version = "0.10", default-features = false } +pyo3 = { version = "0.26", default-features = false } +pyo3-error = { version = "0.6", default-features = false } +pyo3-log = { version = "0.13.0", default-features = false } +pythonize = { version = "0.26", default-features = false } rand = { version = "0.9.1", default-features = false } schemars = { version = "1.0.3", default-features = false } scratch = { version = "1.0", default-features = false } @@ -109,31 +110,31 @@ serde = { version = "1.0.218", default-features = false } serde-transcode = { version = "1.1", default-features = false } serde_json = { version = "1.0.140", default-features = false } serde_repr = { version = "0.1.3", default-features = false } -sperr = { version = "0.1", default-features = false } +sperr = { version = "0.2", default-features = false } sz3 = { version = "0.3", default-features = false } thiserror = { version = "2.0.12", default-features = false } tthresh = { version = "0.1", default-features = false } twofloat = { version = "0.8", default-features = false } vecmap-rs = { version = "0.2", default-features = false } -wac-graph = { version = "0.7", default-features = false } -wasi-sandboxed-component-provider = { version = "=0.2.3", default-features = false } +wac-graph = { version = "0.8", default-features = false } +wasi-sandboxed-component-provider = { version = "=0.2.6", default-features = false } wasi-logger = { version = "0.1", default-features = false } -wasi-preview1-component-adapter-provider = { version = "33.0", default-features = false } -wasmparser = { version = "0.235", default-features = false } -wasmtime = { version = "33.0", default-features = false } -wasmtime_runtime_layer = { version = "33.0", default-features = false } -wasm-encoder = { version = "0.235", default-features = false } -wasm_runtime_layer = { version = "0.5", default-features = false } -wit-bindgen = { version = "0.43", default-features = false } -wit-component = { version = "0.235", default-features = false } -wit-parser = { version = "0.235", default-features = false } +wasi-preview1-component-adapter-provider = { version = "37.0", default-features = false } +wasmparser = { version = "0.240", default-features = false } +wasmtime = { version = "37.0", default-features = false } +wasmtime_runtime_layer = { version = "37.0", default-features = false } +wasm-encoder = { version = "0.240", default-features = false } +wasm_runtime_layer = { version = "0.6", default-features = false } +wit-bindgen = { version = "0.46", default-features = false } +wit-component = { version = "0.240", default-features = false } +wit-parser = { version = "0.240", default-features = false } wyhash = { version = "0.6", default-features = false } zfp-sys = { version = "0.4.2", default-features = false } zstd = { version = "0.13", default-features = false } zstd-sys = { version = "2.0.12", default-features = false } # git third-party dependencies with non-upstream fixes -wasm_component_layer = { git = "https://github.com/juntyr/wasm_component_layer.git", rev = "8e82d9d", version = "0.1", default-features = false } +wasm_component_layer = { git = "https://github.com/juntyr/wasm_component_layer.git", rev = "ad80189", version = "0.1", default-features = false } [workspace.lints.rust] unsafe_code = "deny" diff --git a/README.md b/README.md index f27c0e36..e5d4934b 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ [CI Status]: https://img.shields.io/github/actions/workflow/status/juntyr/numcodecs-rs/ci.yml?branch=main [workflow]: https://github.com/juntyr/numcodecs-rs/actions/workflows/ci.yml?query=branch%3Amain -[MSRV]: https://img.shields.io/badge/MSRV-1.86.0-blue +[MSRV]: https://img.shields.io/badge/MSRV-1.87.0-blue [repo]: https://github.com/juntyr/numcodecs-rs [Latest Version]: https://img.shields.io/crates/v/numcodecs diff --git a/codecs/asinh/Cargo.toml b/codecs/asinh/Cargo.toml index 16ce2765..d56e573c 100644 --- a/codecs/asinh/Cargo.toml +++ b/codecs/asinh/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "numcodecs-asinh" -version = "0.3.0" +version = "0.4.0" edition = { workspace = true } authors = { workspace = true } repository = { workspace = true } diff --git a/codecs/asinh/README.md b/codecs/asinh/README.md index 9b84341b..6db74d00 100644 --- a/codecs/asinh/README.md +++ b/codecs/asinh/README.md @@ -3,7 +3,7 @@ [CI Status]: https://img.shields.io/github/actions/workflow/status/juntyr/numcodecs-rs/ci.yml?branch=main [workflow]: https://github.com/juntyr/numcodecs-rs/actions/workflows/ci.yml?query=branch%3Amain -[MSRV]: https://img.shields.io/badge/MSRV-1.86.0-blue +[MSRV]: https://img.shields.io/badge/MSRV-1.87.0-blue [repo]: https://github.com/juntyr/numcodecs-rs [Latest Version]: https://img.shields.io/crates/v/numcodecs-asinh diff --git a/codecs/asinh/src/lib.rs b/codecs/asinh/src/lib.rs index 062c03a3..9c1baf76 100644 --- a/codecs/asinh/src/lib.rs +++ b/codecs/asinh/src/lib.rs @@ -3,7 +3,7 @@ //! [CI Status]: https://img.shields.io/github/actions/workflow/status/juntyr/numcodecs-rs/ci.yml?branch=main //! [workflow]: https://github.com/juntyr/numcodecs-rs/actions/workflows/ci.yml?query=branch%3Amain //! -//! [MSRV]: https://img.shields.io/badge/MSRV-1.86.0-blue +//! [MSRV]: https://img.shields.io/badge/MSRV-1.87.0-blue //! [repo]: https://github.com/juntyr/numcodecs-rs //! //! [Latest Version]: https://img.shields.io/crates/v/numcodecs-asinh diff --git a/codecs/bit-round/Cargo.toml b/codecs/bit-round/Cargo.toml index 6a046775..1e222864 100644 --- a/codecs/bit-round/Cargo.toml +++ b/codecs/bit-round/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "numcodecs-bit-round" -version = "0.3.0" +version = "0.4.0" edition = { workspace = true } authors = { workspace = true } repository = { workspace = true } diff --git a/codecs/bit-round/README.md b/codecs/bit-round/README.md index 90b5e940..b07b2be3 100644 --- a/codecs/bit-round/README.md +++ b/codecs/bit-round/README.md @@ -3,7 +3,7 @@ [CI Status]: https://img.shields.io/github/actions/workflow/status/juntyr/numcodecs-rs/ci.yml?branch=main [workflow]: https://github.com/juntyr/numcodecs-rs/actions/workflows/ci.yml?query=branch%3Amain -[MSRV]: https://img.shields.io/badge/MSRV-1.86.0-blue +[MSRV]: https://img.shields.io/badge/MSRV-1.87.0-blue [repo]: https://github.com/juntyr/numcodecs-rs [Latest Version]: https://img.shields.io/crates/v/numcodecs-bit-round diff --git a/codecs/bit-round/src/lib.rs b/codecs/bit-round/src/lib.rs index 99b9df2b..5b9fa236 100644 --- a/codecs/bit-round/src/lib.rs +++ b/codecs/bit-round/src/lib.rs @@ -3,7 +3,7 @@ //! [CI Status]: https://img.shields.io/github/actions/workflow/status/juntyr/numcodecs-rs/ci.yml?branch=main //! [workflow]: https://github.com/juntyr/numcodecs-rs/actions/workflows/ci.yml?query=branch%3Amain //! -//! [MSRV]: https://img.shields.io/badge/MSRV-1.86.0-blue +//! [MSRV]: https://img.shields.io/badge/MSRV-1.87.0-blue //! [repo]: https://github.com/juntyr/numcodecs-rs //! //! [Latest Version]: https://img.shields.io/crates/v/numcodecs-bit-round diff --git a/codecs/fixed-offset-scale/Cargo.toml b/codecs/fixed-offset-scale/Cargo.toml index a23f3a92..54c180e0 100644 --- a/codecs/fixed-offset-scale/Cargo.toml +++ b/codecs/fixed-offset-scale/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "numcodecs-fixed-offset-scale" -version = "0.3.0" +version = "0.4.0" edition = { workspace = true } authors = { workspace = true } repository = { workspace = true } diff --git a/codecs/fixed-offset-scale/README.md b/codecs/fixed-offset-scale/README.md index 4dbb3964..8ab537fc 100644 --- a/codecs/fixed-offset-scale/README.md +++ b/codecs/fixed-offset-scale/README.md @@ -3,7 +3,7 @@ [CI Status]: https://img.shields.io/github/actions/workflow/status/juntyr/numcodecs-rs/ci.yml?branch=main [workflow]: https://github.com/juntyr/numcodecs-rs/actions/workflows/ci.yml?query=branch%3Amain -[MSRV]: https://img.shields.io/badge/MSRV-1.86.0-blue +[MSRV]: https://img.shields.io/badge/MSRV-1.87.0-blue [repo]: https://github.com/juntyr/numcodecs-rs [Latest Version]: https://img.shields.io/crates/v/numcodecs-fixed-offset-scale diff --git a/codecs/fixed-offset-scale/src/lib.rs b/codecs/fixed-offset-scale/src/lib.rs index 6d0d369b..920c0f4e 100644 --- a/codecs/fixed-offset-scale/src/lib.rs +++ b/codecs/fixed-offset-scale/src/lib.rs @@ -3,7 +3,7 @@ //! [CI Status]: https://img.shields.io/github/actions/workflow/status/juntyr/numcodecs-rs/ci.yml?branch=main //! [workflow]: https://github.com/juntyr/numcodecs-rs/actions/workflows/ci.yml?query=branch%3Amain //! -//! [MSRV]: https://img.shields.io/badge/MSRV-1.86.0-blue +//! [MSRV]: https://img.shields.io/badge/MSRV-1.87.0-blue //! [repo]: https://github.com/juntyr/numcodecs-rs //! //! [Latest Version]: https://img.shields.io/crates/v/numcodecs-fixed-offset-scale diff --git a/codecs/fourier-network/Cargo.toml b/codecs/fourier-network/Cargo.toml index 39b4ce1d..18960feb 100644 --- a/codecs/fourier-network/Cargo.toml +++ b/codecs/fourier-network/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "numcodecs-fourier-network" -version = "0.2.0" +version = "0.3.0" edition = { workspace = true } authors = { workspace = true } repository = { workspace = true } @@ -18,6 +18,8 @@ keywords = ["fourier", "network", "numcodecs", "compression", "encoding"] burn = { workspace = true, features = ["std", "autodiff", "ndarray"] } itertools = { workspace = true, features = ["use_alloc"] } log = { workspace = true } +# FIXME: bytemuck 1.24 fails to compile on 1.87 +bytemuck = { version = "=1.23.2", default-features = false } ndarray = { workspace = true, features = ["std"] } numcodecs = { workspace = true } num-traits = { workspace = true, features = ["std"] } diff --git a/codecs/fourier-network/README.md b/codecs/fourier-network/README.md index eb4821b4..ff45edd5 100644 --- a/codecs/fourier-network/README.md +++ b/codecs/fourier-network/README.md @@ -3,7 +3,7 @@ [CI Status]: https://img.shields.io/github/actions/workflow/status/juntyr/numcodecs-rs/ci.yml?branch=main [workflow]: https://github.com/juntyr/numcodecs-rs/actions/workflows/ci.yml?query=branch%3Amain -[MSRV]: https://img.shields.io/badge/MSRV-1.86.0-blue +[MSRV]: https://img.shields.io/badge/MSRV-1.87.0-blue [repo]: https://github.com/juntyr/numcodecs-rs [Latest Version]: https://img.shields.io/crates/v/numcodecs-fourier-network diff --git a/codecs/fourier-network/src/lib.rs b/codecs/fourier-network/src/lib.rs index c99f0219..dee0a7b7 100644 --- a/codecs/fourier-network/src/lib.rs +++ b/codecs/fourier-network/src/lib.rs @@ -3,7 +3,7 @@ //! [CI Status]: https://img.shields.io/github/actions/workflow/status/juntyr/numcodecs-rs/ci.yml?branch=main //! [workflow]: https://github.com/juntyr/numcodecs-rs/actions/workflows/ci.yml?query=branch%3Amain //! -//! [MSRV]: https://img.shields.io/badge/MSRV-1.86.0-blue +//! [MSRV]: https://img.shields.io/badge/MSRV-1.87.0-blue //! [repo]: https://github.com/juntyr/numcodecs-rs //! //! [Latest Version]: https://img.shields.io/crates/v/numcodecs-fourier-network @@ -46,6 +46,9 @@ use schemars::{JsonSchema, Schema, SchemaGenerator, json_schema}; use serde::{Deserialize, Deserializer, Serialize, Serializer}; use thiserror::Error; +// FIXME: bytemuck 1.24 fails to compile on 1.87 +use ::bytemuck as _; + #[cfg(test)] use ::serde_json as _; diff --git a/codecs/fourier-network/tests/config.rs b/codecs/fourier-network/tests/config.rs index 9a5e5d7c..84efa10b 100644 --- a/codecs/fourier-network/tests/config.rs +++ b/codecs/fourier-network/tests/config.rs @@ -6,8 +6,8 @@ use serde::Deserialize; use serde_json::json; use ::{ - burn as _, itertools as _, log as _, ndarray as _, num_traits as _, schemars as _, - simple_logger as _, thiserror as _, + burn as _, bytemuck as _, itertools as _, log as _, ndarray as _, num_traits as _, + schemars as _, simple_logger as _, thiserror as _, }; #[test] diff --git a/codecs/fourier-network/tests/schema.rs b/codecs/fourier-network/tests/schema.rs index 30485ca3..c918aae3 100644 --- a/codecs/fourier-network/tests/schema.rs +++ b/codecs/fourier-network/tests/schema.rs @@ -4,8 +4,8 @@ use numcodecs::{DynCodecType, StaticCodecType}; use numcodecs_fourier_network::FourierNetworkCodec; use ::{ - burn as _, itertools as _, log as _, ndarray as _, num_traits as _, schemars as _, serde as _, - serde_json as _, simple_logger as _, thiserror as _, + burn as _, bytemuck as _, itertools as _, log as _, ndarray as _, num_traits as _, + schemars as _, serde as _, serde_json as _, simple_logger as _, thiserror as _, }; #[test] diff --git a/codecs/identity/Cargo.toml b/codecs/identity/Cargo.toml index a6d3ebce..66e9d398 100644 --- a/codecs/identity/Cargo.toml +++ b/codecs/identity/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "numcodecs-identity" -version = "0.3.0" +version = "0.4.0" edition = { workspace = true } authors = { workspace = true } repository = { workspace = true } diff --git a/codecs/identity/README.md b/codecs/identity/README.md index 1a0403bd..e7c0e3a8 100644 --- a/codecs/identity/README.md +++ b/codecs/identity/README.md @@ -3,7 +3,7 @@ [CI Status]: https://img.shields.io/github/actions/workflow/status/juntyr/numcodecs-rs/ci.yml?branch=main [workflow]: https://github.com/juntyr/numcodecs-rs/actions/workflows/ci.yml?query=branch%3Amain -[MSRV]: https://img.shields.io/badge/MSRV-1.86.0-blue +[MSRV]: https://img.shields.io/badge/MSRV-1.87.0-blue [repo]: https://github.com/juntyr/numcodecs-rs [Latest Version]: https://img.shields.io/crates/v/numcodecs-identity diff --git a/codecs/identity/src/lib.rs b/codecs/identity/src/lib.rs index 4d4f7bd7..92aa2d64 100644 --- a/codecs/identity/src/lib.rs +++ b/codecs/identity/src/lib.rs @@ -3,7 +3,7 @@ //! [CI Status]: https://img.shields.io/github/actions/workflow/status/juntyr/numcodecs-rs/ci.yml?branch=main //! [workflow]: https://github.com/juntyr/numcodecs-rs/actions/workflows/ci.yml?query=branch%3Amain //! -//! [MSRV]: https://img.shields.io/badge/MSRV-1.86.0-blue +//! [MSRV]: https://img.shields.io/badge/MSRV-1.87.0-blue //! [repo]: https://github.com/juntyr/numcodecs-rs //! //! [Latest Version]: https://img.shields.io/crates/v/numcodecs-identity diff --git a/codecs/jpeg2000/Cargo.toml b/codecs/jpeg2000/Cargo.toml index 5bb70fd9..334e8b8c 100644 --- a/codecs/jpeg2000/Cargo.toml +++ b/codecs/jpeg2000/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "numcodecs-jpeg2000" -version = "0.2.0" +version = "0.3.0" edition = { workspace = true } authors = { workspace = true } repository = { workspace = true } diff --git a/codecs/jpeg2000/README.md b/codecs/jpeg2000/README.md index 6acb7a0d..8bb11ff8 100644 --- a/codecs/jpeg2000/README.md +++ b/codecs/jpeg2000/README.md @@ -3,7 +3,7 @@ [CI Status]: https://img.shields.io/github/actions/workflow/status/juntyr/numcodecs-rs/ci.yml?branch=main [workflow]: https://github.com/juntyr/numcodecs-rs/actions/workflows/ci.yml?query=branch%3Amain -[MSRV]: https://img.shields.io/badge/MSRV-1.86.0-blue +[MSRV]: https://img.shields.io/badge/MSRV-1.87.0-blue [repo]: https://github.com/juntyr/numcodecs-rs [Latest Version]: https://img.shields.io/crates/v/numcodecs-jpeg2000 diff --git a/codecs/jpeg2000/src/lib.rs b/codecs/jpeg2000/src/lib.rs index 0f0754e4..8c021e1c 100644 --- a/codecs/jpeg2000/src/lib.rs +++ b/codecs/jpeg2000/src/lib.rs @@ -3,7 +3,7 @@ //! [CI Status]: https://img.shields.io/github/actions/workflow/status/juntyr/numcodecs-rs/ci.yml?branch=main //! [workflow]: https://github.com/juntyr/numcodecs-rs/actions/workflows/ci.yml?query=branch%3Amain //! -//! [MSRV]: https://img.shields.io/badge/MSRV-1.86.0-blue +//! [MSRV]: https://img.shields.io/badge/MSRV-1.87.0-blue //! [repo]: https://github.com/juntyr/numcodecs-rs //! //! [Latest Version]: https://img.shields.io/crates/v/numcodecs-jpeg2000 diff --git a/codecs/linear-quantize/Cargo.toml b/codecs/linear-quantize/Cargo.toml index 7d5ee861..e50e6272 100644 --- a/codecs/linear-quantize/Cargo.toml +++ b/codecs/linear-quantize/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "numcodecs-linear-quantize" -version = "0.4.0" +version = "0.5.0" edition = { workspace = true } authors = { workspace = true } repository = { workspace = true } diff --git a/codecs/linear-quantize/README.md b/codecs/linear-quantize/README.md index 4e37a1f6..c93b302c 100644 --- a/codecs/linear-quantize/README.md +++ b/codecs/linear-quantize/README.md @@ -3,7 +3,7 @@ [CI Status]: https://img.shields.io/github/actions/workflow/status/juntyr/numcodecs-rs/ci.yml?branch=main [workflow]: https://github.com/juntyr/numcodecs-rs/actions/workflows/ci.yml?query=branch%3Amain -[MSRV]: https://img.shields.io/badge/MSRV-1.86.0-blue +[MSRV]: https://img.shields.io/badge/MSRV-1.87.0-blue [repo]: https://github.com/juntyr/numcodecs-rs [Latest Version]: https://img.shields.io/crates/v/numcodecs-linear-quantize diff --git a/codecs/linear-quantize/src/lib.rs b/codecs/linear-quantize/src/lib.rs index 263d59ba..fb527808 100644 --- a/codecs/linear-quantize/src/lib.rs +++ b/codecs/linear-quantize/src/lib.rs @@ -3,7 +3,7 @@ //! [CI Status]: https://img.shields.io/github/actions/workflow/status/juntyr/numcodecs-rs/ci.yml?branch=main //! [workflow]: https://github.com/juntyr/numcodecs-rs/actions/workflows/ci.yml?query=branch%3Amain //! -//! [MSRV]: https://img.shields.io/badge/MSRV-1.86.0-blue +//! [MSRV]: https://img.shields.io/badge/MSRV-1.87.0-blue //! [repo]: https://github.com/juntyr/numcodecs-rs //! //! [Latest Version]: https://img.shields.io/crates/v/numcodecs-linear-quantize diff --git a/codecs/log/Cargo.toml b/codecs/log/Cargo.toml index b341c8da..f9a7d979 100644 --- a/codecs/log/Cargo.toml +++ b/codecs/log/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "numcodecs-log" -version = "0.4.0" +version = "0.5.0" edition = { workspace = true } authors = { workspace = true } repository = { workspace = true } diff --git a/codecs/log/README.md b/codecs/log/README.md index ceca7334..8725ba54 100644 --- a/codecs/log/README.md +++ b/codecs/log/README.md @@ -3,7 +3,7 @@ [CI Status]: https://img.shields.io/github/actions/workflow/status/juntyr/numcodecs-rs/ci.yml?branch=main [workflow]: https://github.com/juntyr/numcodecs-rs/actions/workflows/ci.yml?query=branch%3Amain -[MSRV]: https://img.shields.io/badge/MSRV-1.86.0-blue +[MSRV]: https://img.shields.io/badge/MSRV-1.87.0-blue [repo]: https://github.com/juntyr/numcodecs-rs [Latest Version]: https://img.shields.io/crates/v/numcodecs-log diff --git a/codecs/log/src/lib.rs b/codecs/log/src/lib.rs index d2b57862..46460dae 100644 --- a/codecs/log/src/lib.rs +++ b/codecs/log/src/lib.rs @@ -3,7 +3,7 @@ //! [CI Status]: https://img.shields.io/github/actions/workflow/status/juntyr/numcodecs-rs/ci.yml?branch=main //! [workflow]: https://github.com/juntyr/numcodecs-rs/actions/workflows/ci.yml?query=branch%3Amain //! -//! [MSRV]: https://img.shields.io/badge/MSRV-1.86.0-blue +//! [MSRV]: https://img.shields.io/badge/MSRV-1.87.0-blue //! [repo]: https://github.com/juntyr/numcodecs-rs //! //! [Latest Version]: https://img.shields.io/crates/v/numcodecs-log diff --git a/codecs/pco/Cargo.toml b/codecs/pco/Cargo.toml index eb6da195..cfb36b43 100644 --- a/codecs/pco/Cargo.toml +++ b/codecs/pco/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "numcodecs-pco" -version = "0.2.1" +version = "0.3.0" edition = { workspace = true } authors = { workspace = true } repository = { workspace = true } diff --git a/codecs/pco/README.md b/codecs/pco/README.md index 3deeb112..faf730df 100644 --- a/codecs/pco/README.md +++ b/codecs/pco/README.md @@ -3,7 +3,7 @@ [CI Status]: https://img.shields.io/github/actions/workflow/status/juntyr/numcodecs-rs/ci.yml?branch=main [workflow]: https://github.com/juntyr/numcodecs-rs/actions/workflows/ci.yml?query=branch%3Amain -[MSRV]: https://img.shields.io/badge/MSRV-1.86.0-blue +[MSRV]: https://img.shields.io/badge/MSRV-1.87.0-blue [repo]: https://github.com/juntyr/numcodecs-rs [Latest Version]: https://img.shields.io/crates/v/numcodecs-pco diff --git a/codecs/pco/src/lib.rs b/codecs/pco/src/lib.rs index 475babb7..0a89de3c 100644 --- a/codecs/pco/src/lib.rs +++ b/codecs/pco/src/lib.rs @@ -3,7 +3,7 @@ //! [CI Status]: https://img.shields.io/github/actions/workflow/status/juntyr/numcodecs-rs/ci.yml?branch=main //! [workflow]: https://github.com/juntyr/numcodecs-rs/actions/workflows/ci.yml?query=branch%3Amain //! -//! [MSRV]: https://img.shields.io/badge/MSRV-1.86.0-blue +//! [MSRV]: https://img.shields.io/badge/MSRV-1.87.0-blue //! [repo]: https://github.com/juntyr/numcodecs-rs //! //! [Latest Version]: https://img.shields.io/crates/v/numcodecs-pco diff --git a/codecs/random-projection/Cargo.toml b/codecs/random-projection/Cargo.toml index b3cd0581..976b24cb 100644 --- a/codecs/random-projection/Cargo.toml +++ b/codecs/random-projection/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "numcodecs-random-projection" -version = "0.3.0" +version = "0.4.0" edition = { workspace = true } authors = { workspace = true } repository = { workspace = true } diff --git a/codecs/random-projection/README.md b/codecs/random-projection/README.md index 8b6b8e73..1bad2c39 100644 --- a/codecs/random-projection/README.md +++ b/codecs/random-projection/README.md @@ -3,7 +3,7 @@ [CI Status]: https://img.shields.io/github/actions/workflow/status/juntyr/numcodecs-rs/ci.yml?branch=main [workflow]: https://github.com/juntyr/numcodecs-rs/actions/workflows/ci.yml?query=branch%3Amain -[MSRV]: https://img.shields.io/badge/MSRV-1.86.0-blue +[MSRV]: https://img.shields.io/badge/MSRV-1.87.0-blue [repo]: https://github.com/juntyr/numcodecs-rs [Latest Version]: https://img.shields.io/crates/v/numcodecs-random-projection diff --git a/codecs/random-projection/src/lib.rs b/codecs/random-projection/src/lib.rs index 5b7e797b..f30c81b5 100644 --- a/codecs/random-projection/src/lib.rs +++ b/codecs/random-projection/src/lib.rs @@ -3,7 +3,7 @@ //! [CI Status]: https://img.shields.io/github/actions/workflow/status/juntyr/numcodecs-rs/ci.yml?branch=main //! [workflow]: https://github.com/juntyr/numcodecs-rs/actions/workflows/ci.yml?query=branch%3Amain //! -//! [MSRV]: https://img.shields.io/badge/MSRV-1.86.0-blue +//! [MSRV]: https://img.shields.io/badge/MSRV-1.87.0-blue //! [repo]: https://github.com/juntyr/numcodecs-rs //! //! [Latest Version]: https://img.shields.io/crates/v/numcodecs-random-projection diff --git a/codecs/reinterpret/Cargo.toml b/codecs/reinterpret/Cargo.toml index 2cd37140..2e9b1242 100644 --- a/codecs/reinterpret/Cargo.toml +++ b/codecs/reinterpret/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "numcodecs-reinterpret" -version = "0.3.0" +version = "0.4.0" edition = { workspace = true } authors = { workspace = true } repository = { workspace = true } diff --git a/codecs/reinterpret/README.md b/codecs/reinterpret/README.md index ff357925..a5329096 100644 --- a/codecs/reinterpret/README.md +++ b/codecs/reinterpret/README.md @@ -3,7 +3,7 @@ [CI Status]: https://img.shields.io/github/actions/workflow/status/juntyr/numcodecs-rs/ci.yml?branch=main [workflow]: https://github.com/juntyr/numcodecs-rs/actions/workflows/ci.yml?query=branch%3Amain -[MSRV]: https://img.shields.io/badge/MSRV-1.86.0-blue +[MSRV]: https://img.shields.io/badge/MSRV-1.87.0-blue [repo]: https://github.com/juntyr/numcodecs-rs [Latest Version]: https://img.shields.io/crates/v/numcodecs-reinterpret diff --git a/codecs/reinterpret/src/lib.rs b/codecs/reinterpret/src/lib.rs index 8b5731f7..638415d5 100644 --- a/codecs/reinterpret/src/lib.rs +++ b/codecs/reinterpret/src/lib.rs @@ -3,7 +3,7 @@ //! [CI Status]: https://img.shields.io/github/actions/workflow/status/juntyr/numcodecs-rs/ci.yml?branch=main //! [workflow]: https://github.com/juntyr/numcodecs-rs/actions/workflows/ci.yml?query=branch%3Amain //! -//! [MSRV]: https://img.shields.io/badge/MSRV-1.86.0-blue +//! [MSRV]: https://img.shields.io/badge/MSRV-1.87.0-blue //! [repo]: https://github.com/juntyr/numcodecs-rs //! //! [Latest Version]: https://img.shields.io/crates/v/numcodecs-reinterpret diff --git a/codecs/round/Cargo.toml b/codecs/round/Cargo.toml index 1aadad0d..d7c5447e 100644 --- a/codecs/round/Cargo.toml +++ b/codecs/round/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "numcodecs-round" -version = "0.4.0" +version = "0.5.0" edition = { workspace = true } authors = { workspace = true } repository = { workspace = true } diff --git a/codecs/round/README.md b/codecs/round/README.md index c2c61c04..662671c3 100644 --- a/codecs/round/README.md +++ b/codecs/round/README.md @@ -3,7 +3,7 @@ [CI Status]: https://img.shields.io/github/actions/workflow/status/juntyr/numcodecs-rs/ci.yml?branch=main [workflow]: https://github.com/juntyr/numcodecs-rs/actions/workflows/ci.yml?query=branch%3Amain -[MSRV]: https://img.shields.io/badge/MSRV-1.86.0-blue +[MSRV]: https://img.shields.io/badge/MSRV-1.87.0-blue [repo]: https://github.com/juntyr/numcodecs-rs [Latest Version]: https://img.shields.io/crates/v/numcodecs-round diff --git a/codecs/round/src/lib.rs b/codecs/round/src/lib.rs index 0d4ca09b..549611d3 100644 --- a/codecs/round/src/lib.rs +++ b/codecs/round/src/lib.rs @@ -3,7 +3,7 @@ //! [CI Status]: https://img.shields.io/github/actions/workflow/status/juntyr/numcodecs-rs/ci.yml?branch=main //! [workflow]: https://github.com/juntyr/numcodecs-rs/actions/workflows/ci.yml?query=branch%3Amain //! -//! [MSRV]: https://img.shields.io/badge/MSRV-1.86.0-blue +//! [MSRV]: https://img.shields.io/badge/MSRV-1.87.0-blue //! [repo]: https://github.com/juntyr/numcodecs-rs //! //! [Latest Version]: https://img.shields.io/crates/v/numcodecs-round diff --git a/codecs/sperr/Cargo.toml b/codecs/sperr/Cargo.toml index c5f1fa3b..668d9c98 100644 --- a/codecs/sperr/Cargo.toml +++ b/codecs/sperr/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "numcodecs-sperr" -version = "0.1.0" +version = "0.2.0" edition = { workspace = true } authors = { workspace = true } repository = { workspace = true } diff --git a/codecs/sperr/README.md b/codecs/sperr/README.md index d34dea06..4fbeb454 100644 --- a/codecs/sperr/README.md +++ b/codecs/sperr/README.md @@ -3,7 +3,7 @@ [CI Status]: https://img.shields.io/github/actions/workflow/status/juntyr/numcodecs-rs/ci.yml?branch=main [workflow]: https://github.com/juntyr/numcodecs-rs/actions/workflows/ci.yml?query=branch%3Amain -[MSRV]: https://img.shields.io/badge/MSRV-1.86.0-blue +[MSRV]: https://img.shields.io/badge/MSRV-1.87.0-blue [repo]: https://github.com/juntyr/numcodecs-rs [Latest Version]: https://img.shields.io/crates/v/numcodecs-sperr diff --git a/codecs/sperr/src/lib.rs b/codecs/sperr/src/lib.rs index ece9ce0a..68a885de 100644 --- a/codecs/sperr/src/lib.rs +++ b/codecs/sperr/src/lib.rs @@ -3,7 +3,7 @@ //! [CI Status]: https://img.shields.io/github/actions/workflow/status/juntyr/numcodecs-rs/ci.yml?branch=main //! [workflow]: https://github.com/juntyr/numcodecs-rs/actions/workflows/ci.yml?query=branch%3Amain //! -//! [MSRV]: https://img.shields.io/badge/MSRV-1.86.0-blue +//! [MSRV]: https://img.shields.io/badge/MSRV-1.87.0-blue //! [repo]: https://github.com/juntyr/numcodecs-rs //! //! [Latest Version]: https://img.shields.io/crates/v/numcodecs-sperr @@ -35,7 +35,7 @@ use schemars::{JsonSchema, Schema, SchemaGenerator, json_schema}; use serde::{Deserialize, Deserializer, Serialize, Serializer}; use thiserror::Error; -type SperrCodecVersion = StaticCodecVersion<0, 1, 0>; +type SperrCodecVersion = StaticCodecVersion<0, 2, 0>; #[derive(Clone, Serialize, Deserialize, JsonSchema)] // serde cannot deny unknown fields because of the flatten @@ -78,6 +78,12 @@ pub enum SperrCompressionMode { /// positive point-wise (absolute) error pwe: Positive, }, + /// Fixed quantisation step + #[serde(rename = "q")] + QuantisationStep { + /// positive quantisation step + q: Positive, + }, } impl Codec for SperrCodec { @@ -293,6 +299,9 @@ pub fn compress, D: Dimension>( SperrCompressionMode::PointwiseError { pwe } => { sperr::CompressionMode::PointwiseError { pwe: pwe.0 } } + SperrCompressionMode::QuantisationStep { q } => { + sperr::CompressionMode::QuantisationStep { q: q.0 } + } }, (256, 256, 256), ) @@ -548,6 +557,7 @@ mod tests { psnr: Positive(42.0), }, SperrCompressionMode::PointwiseError { pwe: Positive(0.1) }, + SperrCompressionMode::QuantisationStep { q: Positive(1.5) }, ] { let encoded = compress(Array::::zeros((64, 64, 64)), &mode).unwrap(); let decoded = decompress(&encoded).unwrap(); diff --git a/codecs/sperr/tests/config.rs b/codecs/sperr/tests/config.rs index c11e4778..a6934b0a 100644 --- a/codecs/sperr/tests/config.rs +++ b/codecs/sperr/tests/config.rs @@ -63,3 +63,19 @@ fn pwe_config() { SperrCompressionMode::PointwiseError { pwe } if pwe.get() == 0.1 )); } + +#[test] +fn q_config() { + let codec = SperrCodec::from_config( + Deserialize::deserialize(json!({ + "mode": "q", + "q": 1.5, + })) + .unwrap(), + ); + + assert!(matches!( + codec.mode, + SperrCompressionMode::QuantisationStep { q } if q.get() == 1.5 + )); +} diff --git a/codecs/sperr/tests/schema.json b/codecs/sperr/tests/schema.json index d849d6e2..6b2efaed 100644 --- a/codecs/sperr/tests/schema.json +++ b/codecs/sperr/tests/schema.json @@ -58,6 +58,25 @@ "pwe" ], "description": "Fixed point-wise (absolute) error" + }, + { + "type": "object", + "properties": { + "q": { + "type": "number", + "exclusiveMinimum": 0.0, + "description": "positive quantisation step" + }, + "mode": { + "type": "string", + "const": "q" + } + }, + "required": [ + "mode", + "q" + ], + "description": "Fixed quantisation step" } ], "description": "Codec providing compression using SPERR.\n\nArrays that are higher-dimensional than 3D are encoded by compressing each\n3D slice with SPERR independently. Specifically, the array's shape is\ninterpreted as `[.., depth, height, width]`. If you want to compress 3D\nslices along three different axes, you can swizzle the array axes\nbeforehand.", @@ -66,7 +85,7 @@ "type": "string", "pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$", "description": "The codec's encoding format version. Do not provide this parameter explicitly.", - "default": "0.1.0" + "default": "0.2.0" } }, "title": "SperrCodec", diff --git a/codecs/stochastic-rounding/Cargo.toml b/codecs/stochastic-rounding/Cargo.toml index ec48c061..250d3601 100644 --- a/codecs/stochastic-rounding/Cargo.toml +++ b/codecs/stochastic-rounding/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "numcodecs-stochastic-rounding" -version = "0.1.1" +version = "0.2.0" edition = { workspace = true } authors = { workspace = true } repository = { workspace = true } diff --git a/codecs/stochastic-rounding/README.md b/codecs/stochastic-rounding/README.md index ec2de234..747fb4b0 100644 --- a/codecs/stochastic-rounding/README.md +++ b/codecs/stochastic-rounding/README.md @@ -3,7 +3,7 @@ [CI Status]: https://img.shields.io/github/actions/workflow/status/juntyr/numcodecs-rs/ci.yml?branch=main [workflow]: https://github.com/juntyr/numcodecs-rs/actions/workflows/ci.yml?query=branch%3Amain -[MSRV]: https://img.shields.io/badge/MSRV-1.86.0-blue +[MSRV]: https://img.shields.io/badge/MSRV-1.87.0-blue [repo]: https://github.com/juntyr/numcodecs-rs [Latest Version]: https://img.shields.io/crates/v/numcodecs-stochastic-rounding diff --git a/codecs/stochastic-rounding/src/lib.rs b/codecs/stochastic-rounding/src/lib.rs index d30997e5..497f3234 100644 --- a/codecs/stochastic-rounding/src/lib.rs +++ b/codecs/stochastic-rounding/src/lib.rs @@ -3,7 +3,7 @@ //! [CI Status]: https://img.shields.io/github/actions/workflow/status/juntyr/numcodecs-rs/ci.yml?branch=main //! [workflow]: https://github.com/juntyr/numcodecs-rs/actions/workflows/ci.yml?query=branch%3Amain //! -//! [MSRV]: https://img.shields.io/badge/MSRV-1.86.0-blue +//! [MSRV]: https://img.shields.io/badge/MSRV-1.87.0-blue //! [repo]: https://github.com/juntyr/numcodecs-rs //! //! [Latest Version]: https://img.shields.io/crates/v/numcodecs-stochastic-rounding diff --git a/codecs/swizzle-reshape/Cargo.toml b/codecs/swizzle-reshape/Cargo.toml index 96777280..469671be 100644 --- a/codecs/swizzle-reshape/Cargo.toml +++ b/codecs/swizzle-reshape/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "numcodecs-swizzle-reshape" -version = "0.3.0" +version = "0.4.0" edition = { workspace = true } authors = { workspace = true } repository = { workspace = true } diff --git a/codecs/swizzle-reshape/README.md b/codecs/swizzle-reshape/README.md index 5a665992..b276e8df 100644 --- a/codecs/swizzle-reshape/README.md +++ b/codecs/swizzle-reshape/README.md @@ -3,7 +3,7 @@ [CI Status]: https://img.shields.io/github/actions/workflow/status/juntyr/numcodecs-rs/ci.yml?branch=main [workflow]: https://github.com/juntyr/numcodecs-rs/actions/workflows/ci.yml?query=branch%3Amain -[MSRV]: https://img.shields.io/badge/MSRV-1.86.0-blue +[MSRV]: https://img.shields.io/badge/MSRV-1.87.0-blue [repo]: https://github.com/juntyr/numcodecs-rs [Latest Version]: https://img.shields.io/crates/v/numcodecs-swizzle-reshape diff --git a/codecs/swizzle-reshape/src/lib.rs b/codecs/swizzle-reshape/src/lib.rs index 7b04f8fd..f3bc3fa2 100644 --- a/codecs/swizzle-reshape/src/lib.rs +++ b/codecs/swizzle-reshape/src/lib.rs @@ -3,7 +3,7 @@ //! [CI Status]: https://img.shields.io/github/actions/workflow/status/juntyr/numcodecs-rs/ci.yml?branch=main //! [workflow]: https://github.com/juntyr/numcodecs-rs/actions/workflows/ci.yml?query=branch%3Amain //! -//! [MSRV]: https://img.shields.io/badge/MSRV-1.86.0-blue +//! [MSRV]: https://img.shields.io/badge/MSRV-1.87.0-blue //! [repo]: https://github.com/juntyr/numcodecs-rs //! //! [Latest Version]: https://img.shields.io/crates/v/numcodecs-swizzle-reshape diff --git a/codecs/sz3/Cargo.toml b/codecs/sz3/Cargo.toml index b8391af7..9c25252f 100644 --- a/codecs/sz3/Cargo.toml +++ b/codecs/sz3/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "numcodecs-sz3" -version = "0.6.0" +version = "0.7.0" edition = { workspace = true } authors = { workspace = true } repository = { workspace = true } diff --git a/codecs/sz3/README.md b/codecs/sz3/README.md index 3dc8723a..7773e5f9 100644 --- a/codecs/sz3/README.md +++ b/codecs/sz3/README.md @@ -3,7 +3,7 @@ [CI Status]: https://img.shields.io/github/actions/workflow/status/juntyr/numcodecs-rs/ci.yml?branch=main [workflow]: https://github.com/juntyr/numcodecs-rs/actions/workflows/ci.yml?query=branch%3Amain -[MSRV]: https://img.shields.io/badge/MSRV-1.86.0-blue +[MSRV]: https://img.shields.io/badge/MSRV-1.87.0-blue [repo]: https://github.com/juntyr/numcodecs-rs [Latest Version]: https://img.shields.io/crates/v/numcodecs-sz3 diff --git a/codecs/sz3/src/lib.rs b/codecs/sz3/src/lib.rs index 35a416c5..31be7c75 100644 --- a/codecs/sz3/src/lib.rs +++ b/codecs/sz3/src/lib.rs @@ -3,7 +3,7 @@ //! [CI Status]: https://img.shields.io/github/actions/workflow/status/juntyr/numcodecs-rs/ci.yml?branch=main //! [workflow]: https://github.com/juntyr/numcodecs-rs/actions/workflows/ci.yml?query=branch%3Amain //! -//! [MSRV]: https://img.shields.io/badge/MSRV-1.86.0-blue +//! [MSRV]: https://img.shields.io/badge/MSRV-1.87.0-blue //! [repo]: https://github.com/juntyr/numcodecs-rs //! //! [Latest Version]: https://img.shields.io/crates/v/numcodecs-sz3 diff --git a/codecs/tthresh/Cargo.toml b/codecs/tthresh/Cargo.toml index de6efeba..c35577d6 100644 --- a/codecs/tthresh/Cargo.toml +++ b/codecs/tthresh/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "numcodecs-tthresh" -version = "0.2.0" +version = "0.3.0" edition = { workspace = true } authors = { workspace = true } repository = { workspace = true } diff --git a/codecs/tthresh/README.md b/codecs/tthresh/README.md index 4517979a..0c6e8d05 100644 --- a/codecs/tthresh/README.md +++ b/codecs/tthresh/README.md @@ -3,7 +3,7 @@ [CI Status]: https://img.shields.io/github/actions/workflow/status/juntyr/numcodecs-rs/ci.yml?branch=main [workflow]: https://github.com/juntyr/numcodecs-rs/actions/workflows/ci.yml?query=branch%3Amain -[MSRV]: https://img.shields.io/badge/MSRV-1.86.0-blue +[MSRV]: https://img.shields.io/badge/MSRV-1.87.0-blue [repo]: https://github.com/juntyr/numcodecs-rs [Latest Version]: https://img.shields.io/crates/v/numcodecs-tthresh diff --git a/codecs/tthresh/src/lib.rs b/codecs/tthresh/src/lib.rs index 63d0ca6e..72e8d782 100644 --- a/codecs/tthresh/src/lib.rs +++ b/codecs/tthresh/src/lib.rs @@ -3,7 +3,7 @@ //! [CI Status]: https://img.shields.io/github/actions/workflow/status/juntyr/numcodecs-rs/ci.yml?branch=main //! [workflow]: https://github.com/juntyr/numcodecs-rs/actions/workflows/ci.yml?query=branch%3Amain //! -//! [MSRV]: https://img.shields.io/badge/MSRV-1.86.0-blue +//! [MSRV]: https://img.shields.io/badge/MSRV-1.87.0-blue //! [repo]: https://github.com/juntyr/numcodecs-rs //! //! [Latest Version]: https://img.shields.io/crates/v/numcodecs-tthresh diff --git a/codecs/uniform-noise/Cargo.toml b/codecs/uniform-noise/Cargo.toml index d76dc1c2..3b99e9cb 100644 --- a/codecs/uniform-noise/Cargo.toml +++ b/codecs/uniform-noise/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "numcodecs-uniform-noise" -version = "0.3.0" +version = "0.4.0" edition = { workspace = true } authors = { workspace = true } repository = { workspace = true } diff --git a/codecs/uniform-noise/README.md b/codecs/uniform-noise/README.md index 677ddbc1..24392d5d 100644 --- a/codecs/uniform-noise/README.md +++ b/codecs/uniform-noise/README.md @@ -3,7 +3,7 @@ [CI Status]: https://img.shields.io/github/actions/workflow/status/juntyr/numcodecs-rs/ci.yml?branch=main [workflow]: https://github.com/juntyr/numcodecs-rs/actions/workflows/ci.yml?query=branch%3Amain -[MSRV]: https://img.shields.io/badge/MSRV-1.86.0-blue +[MSRV]: https://img.shields.io/badge/MSRV-1.87.0-blue [repo]: https://github.com/juntyr/numcodecs-rs [Latest Version]: https://img.shields.io/crates/v/numcodecs-uniform-noise diff --git a/codecs/uniform-noise/src/lib.rs b/codecs/uniform-noise/src/lib.rs index cdf11a90..ac1e8436 100644 --- a/codecs/uniform-noise/src/lib.rs +++ b/codecs/uniform-noise/src/lib.rs @@ -3,7 +3,7 @@ //! [CI Status]: https://img.shields.io/github/actions/workflow/status/juntyr/numcodecs-rs/ci.yml?branch=main //! [workflow]: https://github.com/juntyr/numcodecs-rs/actions/workflows/ci.yml?query=branch%3Amain //! -//! [MSRV]: https://img.shields.io/badge/MSRV-1.86.0-blue +//! [MSRV]: https://img.shields.io/badge/MSRV-1.87.0-blue //! [repo]: https://github.com/juntyr/numcodecs-rs //! //! [Latest Version]: https://img.shields.io/crates/v/numcodecs-uniform-noise diff --git a/codecs/zfp-classic/Cargo.toml b/codecs/zfp-classic/Cargo.toml index 66779432..834eff1f 100644 --- a/codecs/zfp-classic/Cargo.toml +++ b/codecs/zfp-classic/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "numcodecs-zfp-classic" -version = "0.3.3" +version = "0.4.0" edition = { workspace = true } authors = { workspace = true } repository = { workspace = true } diff --git a/codecs/zfp-classic/README.md b/codecs/zfp-classic/README.md index fa373684..9f032069 100644 --- a/codecs/zfp-classic/README.md +++ b/codecs/zfp-classic/README.md @@ -3,7 +3,7 @@ [CI Status]: https://img.shields.io/github/actions/workflow/status/juntyr/numcodecs-rs/ci.yml?branch=main [workflow]: https://github.com/juntyr/numcodecs-rs/actions/workflows/ci.yml?query=branch%3Amain -[MSRV]: https://img.shields.io/badge/MSRV-1.86.0-blue +[MSRV]: https://img.shields.io/badge/MSRV-1.87.0-blue [repo]: https://github.com/juntyr/numcodecs-rs [Latest Version]: https://img.shields.io/crates/v/numcodecs-zfp-classic diff --git a/codecs/zfp-classic/src/lib.rs b/codecs/zfp-classic/src/lib.rs index a030eff9..1b4c9e05 100644 --- a/codecs/zfp-classic/src/lib.rs +++ b/codecs/zfp-classic/src/lib.rs @@ -3,7 +3,7 @@ //! [CI Status]: https://img.shields.io/github/actions/workflow/status/juntyr/numcodecs-rs/ci.yml?branch=main //! [workflow]: https://github.com/juntyr/numcodecs-rs/actions/workflows/ci.yml?query=branch%3Amain //! -//! [MSRV]: https://img.shields.io/badge/MSRV-1.86.0-blue +//! [MSRV]: https://img.shields.io/badge/MSRV-1.87.0-blue //! [repo]: https://github.com/juntyr/numcodecs-rs //! //! [Latest Version]: https://img.shields.io/crates/v/numcodecs-zfp-classic @@ -30,7 +30,7 @@ use std::{borrow::Cow, fmt}; -use ndarray::{Array, Array1, ArrayView, Dimension}; +use ndarray::{Array, Array1, ArrayView, Dimension, Zip}; use numcodecs::{ AnyArray, AnyArrayAssignError, AnyArrayDType, AnyArrayView, AnyArrayViewMut, AnyCowArray, Codec, StaticCodec, StaticCodecConfig, StaticCodecVersion, @@ -44,7 +44,7 @@ use ::serde_json as _; mod ffi; -type ZfpClassicCodecVersion = StaticCodecVersion<0, 1, 0>; +type ZfpClassicCodecVersion = StaticCodecVersion<0, 2, 0>; #[derive(Clone, Serialize, Deserialize, JsonSchema)] // serde cannot deny unknown fields because of the flatten @@ -54,6 +54,9 @@ pub struct ZfpClassicCodec { /// ZFP compression mode #[serde(flatten)] pub mode: ZfpCompressionMode, + /// ZFP non-finite values mode + #[serde(default)] + pub non_finite: ZfpNonFiniteValuesMode, /// The codec's encoding format version. Do not provide this parameter explicitly. #[serde(default, rename = "_version")] pub version: ZfpClassicCodecVersion, @@ -111,6 +114,20 @@ pub enum ZfpCompressionMode { Reversible, } +#[derive(Copy, Clone, Debug, Default, Serialize, Deserialize, JsonSchema)] +/// ZFP non-finite values mode +pub enum ZfpNonFiniteValuesMode { + /// Deny compressing non-finite values, i.e. return an error. + #[default] + #[serde(rename = "deny")] + Deny, + /// Unsafely allow compressing non-finite values, even though undefined + /// behaviour may be triggered, see + /// . + #[serde(rename = "allow-unsafe")] + AllowUnsafe, +} + impl Codec for ZfpClassicCodec { type Error = ZfpClassicCodecError; @@ -126,16 +143,16 @@ impl Codec for ZfpClassicCodec { match data { AnyCowArray::I32(data) => Ok(AnyArray::U8( - Array1::from(compress(data.view(), &self.mode)?).into_dyn(), + Array1::from(compress(data.view(), &self.mode, self.non_finite)?).into_dyn(), )), AnyCowArray::I64(data) => Ok(AnyArray::U8( - Array1::from(compress(data.view(), &self.mode)?).into_dyn(), + Array1::from(compress(data.view(), &self.mode, self.non_finite)?).into_dyn(), )), AnyCowArray::F32(data) => Ok(AnyArray::U8( - Array1::from(compress(data.view(), &self.mode)?).into_dyn(), + Array1::from(compress(data.view(), &self.mode, self.non_finite)?).into_dyn(), )), AnyCowArray::F64(data) => Ok(AnyArray::U8( - Array1::from(compress(data.view(), &self.mode)?).into_dyn(), + Array1::from(compress(data.view(), &self.mode, self.non_finite)?).into_dyn(), )), encoded => Err(ZfpClassicCodecError::UnsupportedDtype(encoded.dtype())), } @@ -214,6 +231,12 @@ pub enum ZfpClassicCodecError { /// The unexpected compression mode mode: ZfpCompressionMode, }, + /// [`ZfpCodec`] does not support non-finite (infinite or NaN) floating + /// point data in non-reversible lossy compression + #[error( + "Zfp does not support non-finite (infinite or NaN) floating point data in non-reversible lossy compression" + )] + NonFiniteData, /// [`ZfpClassicCodec`] failed to encode the header #[error("ZfpClassic failed to encode the header")] HeaderEncodeFailed, @@ -275,6 +298,9 @@ pub struct ZfpHeaderError(postcard::Error); /// # Errors /// /// Errors with +/// - [`ZfpCodecError::NonFiniteData`] if any data element is non-finite +/// (infinite or NaN) and a non-reversible lossy compression `mode` is used +/// and the `non_finite` mode is not [`ZfpNonFiniteValuesMode::AllowUnsafe`] /// - [`ZfpClassicCodecError::ExcessiveDimensionality`] if data is more than /// 4-dimensional /// - [`ZfpClassicCodecError::InvalidExpertMode`] if the `mode` has invalid @@ -288,7 +314,15 @@ pub struct ZfpHeaderError(postcard::Error); pub fn compress( data: ArrayView, mode: &ZfpCompressionMode, + non_finite: ZfpNonFiniteValuesMode, ) -> Result, ZfpClassicCodecError> { + if !matches!(mode, ZfpCompressionMode::Reversible) + && !matches!(non_finite, ZfpNonFiniteValuesMode::AllowUnsafe) + && !Zip::from(&data).all(|x| x.is_finite()) + { + return Err(ZfpClassicCodecError::NonFiniteData); + } + let mut encoded = postcard::to_extend( &CompressionHeader { dtype: ::D_TYPE, @@ -504,6 +538,7 @@ mod tests { .unwrap() .view(), &ZfpCompressionMode::FixedPrecision { precision: 7 }, + ZfpNonFiniteValuesMode::Deny, ) .unwrap(); let decoded = decompress(&encoded).unwrap(); @@ -524,6 +559,7 @@ mod tests { let encoded = compress( data.view(), &ZfpCompressionMode::FixedAccuracy { tolerance: 0.1 }, + ZfpNonFiniteValuesMode::Deny, ) .unwrap(); let decoded = decompress(&encoded).unwrap(); @@ -543,6 +579,7 @@ mod tests { let encoded = compress( ArrayView1::from(data), &ZfpCompressionMode::FixedAccuracy { tolerance: 0.1 }, + ZfpNonFiniteValuesMode::Deny, ) .unwrap(); let decoded = decompress(&encoded).unwrap(); diff --git a/codecs/zfp-classic/tests/config.rs b/codecs/zfp-classic/tests/config.rs index 6ea99ec9..e21ddc33 100644 --- a/codecs/zfp-classic/tests/config.rs +++ b/codecs/zfp-classic/tests/config.rs @@ -3,7 +3,7 @@ use ::{ndarray as _, postcard as _, schemars as _, thiserror as _, zfp_sys as _}; use numcodecs::StaticCodec; -use numcodecs_zfp_classic::{ZfpClassicCodec, ZfpCompressionMode}; +use numcodecs_zfp_classic::{ZfpClassicCodec, ZfpCompressionMode, ZfpNonFiniteValuesMode}; use serde::Deserialize; use serde_json::json; @@ -96,3 +96,41 @@ fn reversible_config() { assert!(matches!(codec.mode, ZfpCompressionMode::Reversible)); } + +#[test] +fn deny_non_finite_config() { + let codec = ZfpClassicCodec::from_config( + Deserialize::deserialize(json!({ + "mode": "reversible", + })) + .unwrap(), + ); + + assert!(matches!(codec.non_finite, ZfpNonFiniteValuesMode::Deny)); + + let codec = ZfpClassicCodec::from_config( + Deserialize::deserialize(json!({ + "mode": "reversible", + "non_finite": "deny", + })) + .unwrap(), + ); + + assert!(matches!(codec.non_finite, ZfpNonFiniteValuesMode::Deny)); +} + +#[test] +fn allow_unsafe_non_finite_config() { + let codec = ZfpClassicCodec::from_config( + Deserialize::deserialize(json!({ + "mode": "reversible", + "non_finite": "allow-unsafe", + })) + .unwrap(), + ); + + assert!(matches!( + codec.non_finite, + ZfpNonFiniteValuesMode::AllowUnsafe + )); +} diff --git a/codecs/zfp-classic/tests/schema.json b/codecs/zfp-classic/tests/schema.json index 710e8594..a5b0dbbc 100644 --- a/codecs/zfp-classic/tests/schema.json +++ b/codecs/zfp-classic/tests/schema.json @@ -116,11 +116,27 @@ ], "description": "Codec providing compression using ZFP (classic)", "properties": { + "non_finite": { + "oneOf": [ + { + "type": "string", + "const": "deny", + "description": "Deny compressing non-finite values, i.e. return an error." + }, + { + "type": "string", + "const": "allow-unsafe", + "description": "Unsafely allow compressing non-finite values, even though undefined\nbehaviour may be triggered, see\n." + } + ], + "description": "ZFP non-finite values mode", + "default": "deny" + }, "_version": { "type": "string", "pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$", "description": "The codec's encoding format version. Do not provide this parameter explicitly.", - "default": "0.1.0" + "default": "0.2.0" } }, "title": "ZfpClassicCodec", diff --git a/codecs/zfp/Cargo.toml b/codecs/zfp/Cargo.toml index b42ba99d..4c458626 100644 --- a/codecs/zfp/Cargo.toml +++ b/codecs/zfp/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "numcodecs-zfp" -version = "0.5.3" +version = "0.6.0" edition = { workspace = true } authors = { workspace = true } repository = { workspace = true } diff --git a/codecs/zfp/README.md b/codecs/zfp/README.md index 83f3660f..3537c137 100644 --- a/codecs/zfp/README.md +++ b/codecs/zfp/README.md @@ -3,7 +3,7 @@ [CI Status]: https://img.shields.io/github/actions/workflow/status/juntyr/numcodecs-rs/ci.yml?branch=main [workflow]: https://github.com/juntyr/numcodecs-rs/actions/workflows/ci.yml?query=branch%3Amain -[MSRV]: https://img.shields.io/badge/MSRV-1.86.0-blue +[MSRV]: https://img.shields.io/badge/MSRV-1.87.0-blue [repo]: https://github.com/juntyr/numcodecs-rs [Latest Version]: https://img.shields.io/crates/v/numcodecs-zfp diff --git a/codecs/zfp/src/lib.rs b/codecs/zfp/src/lib.rs index b2dde326..8e91a179 100644 --- a/codecs/zfp/src/lib.rs +++ b/codecs/zfp/src/lib.rs @@ -3,7 +3,7 @@ //! [CI Status]: https://img.shields.io/github/actions/workflow/status/juntyr/numcodecs-rs/ci.yml?branch=main //! [workflow]: https://github.com/juntyr/numcodecs-rs/actions/workflows/ci.yml?query=branch%3Amain //! -//! [MSRV]: https://img.shields.io/badge/MSRV-1.86.0-blue +//! [MSRV]: https://img.shields.io/badge/MSRV-1.87.0-blue //! [repo]: https://github.com/juntyr/numcodecs-rs //! //! [Latest Version]: https://img.shields.io/crates/v/numcodecs-zfp @@ -49,7 +49,7 @@ use ::serde_json as _; mod ffi; -type ZfpCodecVersion = StaticCodecVersion<0, 1, 0>; +type ZfpCodecVersion = StaticCodecVersion<0, 2, 0>; #[derive(Clone, Serialize, Deserialize, JsonSchema)] // serde cannot deny unknown fields because of the flatten @@ -59,6 +59,9 @@ pub struct ZfpCodec { /// ZFP compression mode #[serde(flatten)] pub mode: ZfpCompressionMode, + /// ZFP non-finite values mode + #[serde(default)] + pub non_finite: ZfpNonFiniteValuesMode, /// The codec's encoding format version. Do not provide this parameter explicitly. #[serde(default, rename = "_version")] pub version: ZfpCodecVersion, @@ -116,6 +119,20 @@ pub enum ZfpCompressionMode { Reversible, } +#[derive(Copy, Clone, Debug, Default, Serialize, Deserialize, JsonSchema)] +/// ZFP non-finite values mode +pub enum ZfpNonFiniteValuesMode { + /// Deny compressing non-finite values, i.e. return an error. + #[default] + #[serde(rename = "deny")] + Deny, + /// Unsafely allow compressing non-finite values, even though undefined + /// behaviour may be triggered, see + /// . + #[serde(rename = "allow-unsafe")] + AllowUnsafe, +} + impl Codec for ZfpCodec { type Error = ZfpCodecError; @@ -131,16 +148,16 @@ impl Codec for ZfpCodec { match data { AnyCowArray::I32(data) => Ok(AnyArray::U8( - Array1::from(compress(data.view(), &self.mode)?).into_dyn(), + Array1::from(compress(data.view(), &self.mode, self.non_finite)?).into_dyn(), )), AnyCowArray::I64(data) => Ok(AnyArray::U8( - Array1::from(compress(data.view(), &self.mode)?).into_dyn(), + Array1::from(compress(data.view(), &self.mode, self.non_finite)?).into_dyn(), )), AnyCowArray::F32(data) => Ok(AnyArray::U8( - Array1::from(compress(data.view(), &self.mode)?).into_dyn(), + Array1::from(compress(data.view(), &self.mode, self.non_finite)?).into_dyn(), )), AnyCowArray::F64(data) => Ok(AnyArray::U8( - Array1::from(compress(data.view(), &self.mode)?).into_dyn(), + Array1::from(compress(data.view(), &self.mode, self.non_finite)?).into_dyn(), )), encoded => Err(ZfpCodecError::UnsupportedDtype(encoded.dtype())), } @@ -287,6 +304,7 @@ pub struct ZfpHeaderError(postcard::Error); /// Errors with /// - [`ZfpCodecError::NonFiniteData`] if any data element is non-finite /// (infinite or NaN) and a non-reversible lossy compression `mode` is used +/// and the `non_finite` mode is not [`ZfpNonFiniteValuesMode::AllowUnsafe`] /// - [`ZfpCodecError::ExcessiveDimensionality`] if data is more than /// 4-dimensional /// - [`ZfpCodecError::InvalidExpertMode`] if the `mode` has invalid expert mode @@ -298,8 +316,12 @@ pub struct ZfpHeaderError(postcard::Error); pub fn compress( data: ArrayView, mode: &ZfpCompressionMode, + non_finite: ZfpNonFiniteValuesMode, ) -> Result, ZfpCodecError> { - if !matches!(mode, ZfpCompressionMode::Reversible) && !Zip::from(&data).all(|x| x.is_finite()) { + if !matches!(mode, ZfpCompressionMode::Reversible) + && !matches!(non_finite, ZfpNonFiniteValuesMode::AllowUnsafe) + && !Zip::from(&data).all(|x| x.is_finite()) + { return Err(ZfpCodecError::NonFiniteData); } @@ -511,6 +533,7 @@ mod tests { .unwrap() .view(), &ZfpCompressionMode::FixedPrecision { precision: 7 }, + ZfpNonFiniteValuesMode::Deny, ) .unwrap(); let decoded = decompress(&encoded).unwrap(); @@ -531,6 +554,7 @@ mod tests { let encoded = compress( data.view(), &ZfpCompressionMode::FixedAccuracy { tolerance: 0.1 }, + ZfpNonFiniteValuesMode::Deny, ) .unwrap(); let decoded = decompress(&encoded).unwrap(); @@ -550,6 +574,7 @@ mod tests { let encoded = compress( ArrayView1::from(data), &ZfpCompressionMode::FixedAccuracy { tolerance: 0.1 }, + ZfpNonFiniteValuesMode::Deny, ) .unwrap(); let decoded = decompress(&encoded).unwrap(); diff --git a/codecs/zfp/tests/config.rs b/codecs/zfp/tests/config.rs index bc4a75f3..dee661f0 100644 --- a/codecs/zfp/tests/config.rs +++ b/codecs/zfp/tests/config.rs @@ -3,7 +3,7 @@ use ::{ndarray as _, postcard as _, schemars as _, thiserror as _, zfp_sys as _}; use numcodecs::StaticCodec; -use numcodecs_zfp::{ZfpCodec, ZfpCompressionMode}; +use numcodecs_zfp::{ZfpCodec, ZfpCompressionMode, ZfpNonFiniteValuesMode}; use serde::Deserialize; use serde_json::json; @@ -96,3 +96,41 @@ fn reversible_config() { assert!(matches!(codec.mode, ZfpCompressionMode::Reversible)); } + +#[test] +fn deny_non_finite_config() { + let codec = ZfpCodec::from_config( + Deserialize::deserialize(json!({ + "mode": "reversible", + })) + .unwrap(), + ); + + assert!(matches!(codec.non_finite, ZfpNonFiniteValuesMode::Deny)); + + let codec = ZfpCodec::from_config( + Deserialize::deserialize(json!({ + "mode": "reversible", + "non_finite": "deny", + })) + .unwrap(), + ); + + assert!(matches!(codec.non_finite, ZfpNonFiniteValuesMode::Deny)); +} + +#[test] +fn allow_unsafe_non_finite_config() { + let codec = ZfpCodec::from_config( + Deserialize::deserialize(json!({ + "mode": "reversible", + "non_finite": "allow-unsafe", + })) + .unwrap(), + ); + + assert!(matches!( + codec.non_finite, + ZfpNonFiniteValuesMode::AllowUnsafe + )); +} diff --git a/codecs/zfp/tests/schema.json b/codecs/zfp/tests/schema.json index da4b2f9b..58e99d23 100644 --- a/codecs/zfp/tests/schema.json +++ b/codecs/zfp/tests/schema.json @@ -116,11 +116,27 @@ ], "description": "Codec providing compression using ZFP", "properties": { + "non_finite": { + "oneOf": [ + { + "type": "string", + "const": "deny", + "description": "Deny compressing non-finite values, i.e. return an error." + }, + { + "type": "string", + "const": "allow-unsafe", + "description": "Unsafely allow compressing non-finite values, even though undefined\nbehaviour may be triggered, see\n." + } + ], + "description": "ZFP non-finite values mode", + "default": "deny" + }, "_version": { "type": "string", "pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$", "description": "The codec's encoding format version. Do not provide this parameter explicitly.", - "default": "0.1.0" + "default": "0.2.0" } }, "title": "ZfpCodec", diff --git a/codecs/zlib/Cargo.toml b/codecs/zlib/Cargo.toml index 2a6970a1..ac4afeeb 100644 --- a/codecs/zlib/Cargo.toml +++ b/codecs/zlib/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "numcodecs-zlib" -version = "0.3.0" +version = "0.4.0" edition = { workspace = true } authors = { workspace = true } repository = { workspace = true } diff --git a/codecs/zlib/README.md b/codecs/zlib/README.md index f881c4d2..37ce9b5a 100644 --- a/codecs/zlib/README.md +++ b/codecs/zlib/README.md @@ -3,7 +3,7 @@ [CI Status]: https://img.shields.io/github/actions/workflow/status/juntyr/numcodecs-rs/ci.yml?branch=main [workflow]: https://github.com/juntyr/numcodecs-rs/actions/workflows/ci.yml?query=branch%3Amain -[MSRV]: https://img.shields.io/badge/MSRV-1.86.0-blue +[MSRV]: https://img.shields.io/badge/MSRV-1.87.0-blue [repo]: https://github.com/juntyr/numcodecs-rs [Latest Version]: https://img.shields.io/crates/v/numcodecs-zlib diff --git a/codecs/zlib/src/lib.rs b/codecs/zlib/src/lib.rs index 4b8e17c4..7715ff95 100644 --- a/codecs/zlib/src/lib.rs +++ b/codecs/zlib/src/lib.rs @@ -3,7 +3,7 @@ //! [CI Status]: https://img.shields.io/github/actions/workflow/status/juntyr/numcodecs-rs/ci.yml?branch=main //! [workflow]: https://github.com/juntyr/numcodecs-rs/actions/workflows/ci.yml?query=branch%3Amain //! -//! [MSRV]: https://img.shields.io/badge/MSRV-1.86.0-blue +//! [MSRV]: https://img.shields.io/badge/MSRV-1.87.0-blue //! [repo]: https://github.com/juntyr/numcodecs-rs //! //! [Latest Version]: https://img.shields.io/crates/v/numcodecs-zlib diff --git a/codecs/zstd/Cargo.toml b/codecs/zstd/Cargo.toml index a3446a08..5aef2c0d 100644 --- a/codecs/zstd/Cargo.toml +++ b/codecs/zstd/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "numcodecs-zstd" -version = "0.3.0" +version = "0.4.0" edition = { workspace = true } authors = { workspace = true } repository = { workspace = true } diff --git a/codecs/zstd/README.md b/codecs/zstd/README.md index 9568383c..d3da36c9 100644 --- a/codecs/zstd/README.md +++ b/codecs/zstd/README.md @@ -3,7 +3,7 @@ [CI Status]: https://img.shields.io/github/actions/workflow/status/juntyr/numcodecs-rs/ci.yml?branch=main [workflow]: https://github.com/juntyr/numcodecs-rs/actions/workflows/ci.yml?query=branch%3Amain -[MSRV]: https://img.shields.io/badge/MSRV-1.86.0-blue +[MSRV]: https://img.shields.io/badge/MSRV-1.87.0-blue [repo]: https://github.com/juntyr/numcodecs-rs [Latest Version]: https://img.shields.io/crates/v/numcodecs-zstd diff --git a/codecs/zstd/src/lib.rs b/codecs/zstd/src/lib.rs index 872344b0..fcd3cde5 100644 --- a/codecs/zstd/src/lib.rs +++ b/codecs/zstd/src/lib.rs @@ -3,7 +3,7 @@ //! [CI Status]: https://img.shields.io/github/actions/workflow/status/juntyr/numcodecs-rs/ci.yml?branch=main //! [workflow]: https://github.com/juntyr/numcodecs-rs/actions/workflows/ci.yml?query=branch%3Amain //! -//! [MSRV]: https://img.shields.io/badge/MSRV-1.86.0-blue +//! [MSRV]: https://img.shields.io/badge/MSRV-1.87.0-blue //! [repo]: https://github.com/juntyr/numcodecs-rs //! //! [Latest Version]: https://img.shields.io/crates/v/numcodecs-zstd diff --git a/crates/numcodecs-python/Cargo.toml b/crates/numcodecs-python/Cargo.toml index 13d6eae8..d65f28e7 100644 --- a/crates/numcodecs-python/Cargo.toml +++ b/crates/numcodecs-python/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "numcodecs-python" -version = "0.6.0" +version = "0.7.0" edition = { workspace = true } authors = { workspace = true } repository = { workspace = true } diff --git a/crates/numcodecs-python/README.md b/crates/numcodecs-python/README.md index 5e49042f..6dd4b22f 100644 --- a/crates/numcodecs-python/README.md +++ b/crates/numcodecs-python/README.md @@ -3,7 +3,7 @@ [CI Status]: https://img.shields.io/github/actions/workflow/status/juntyr/numcodecs-rs/ci.yml?branch=main [workflow]: https://github.com/juntyr/numcodecs-rs/actions/workflows/ci.yml?query=branch%3Amain -[MSRV]: https://img.shields.io/badge/MSRV-1.86.0-blue +[MSRV]: https://img.shields.io/badge/MSRV-1.87.0-blue [repo]: https://github.com/juntyr/numcodecs-rs [Latest Version]: https://img.shields.io/crates/v/numcodecs-python diff --git a/crates/numcodecs-python/src/adapter.rs b/crates/numcodecs-python/src/adapter.rs index fe019d9f..eeaef636 100644 --- a/crates/numcodecs-python/src/adapter.rs +++ b/crates/numcodecs-python/src/adapter.rs @@ -47,7 +47,7 @@ impl PyCodecAdapter { pub fn from_registry_with_config<'de, D: Deserializer<'de>>( config: D, ) -> Result { - Python::with_gil(|py| { + Python::attach(|py| { let config = transcode(config, Pythonizer::new(py))?; let config: Bound = config.extract()?; @@ -136,7 +136,7 @@ impl PyCodecAdapter { // The `with` closure contains arbitrary Rust code and may block, // which we cannot allow while holding the GIL - Some(py.allow_threads(|| with(codec))) + Some(py.detach(|| with(codec))) } } @@ -144,7 +144,7 @@ impl Codec for PyCodecAdapter { type Error = PyErr; fn encode(&self, data: AnyCowArray) -> Result { - Python::with_gil(|py| { + Python::attach(|py| { self.with_any_array_view_as_ndarray(py, &data.view(), |data| { let encoded = self.codec.bind(py).encode(data.as_borrowed())?; @@ -154,7 +154,7 @@ impl Codec for PyCodecAdapter { } fn decode(&self, encoded: AnyCowArray) -> Result { - Python::with_gil(|py| { + Python::attach(|py| { self.with_any_array_view_as_ndarray(py, &encoded.view(), |encoded| { let decoded = self.codec.bind(py).decode(encoded.as_borrowed(), None)?; @@ -168,7 +168,7 @@ impl Codec for PyCodecAdapter { encoded: AnyArrayView, mut decoded: AnyArrayViewMut, ) -> Result<(), Self::Error> { - Python::with_gil(|py| { + Python::attach(|py| { let decoded_out = self.with_any_array_view_as_ndarray(py, &encoded, |encoded| { self.with_any_array_view_mut_as_ndarray(py, &mut decoded, |decoded_in| { let decoded_out = self @@ -396,7 +396,7 @@ impl PyCodecAdapter { impl Clone for PyCodecAdapter { fn clone(&self) -> Self { #[expect(clippy::expect_used)] // clone is *not* fallible - Python::with_gil(|py| { + Python::attach(|py| { self.try_clone(py) .expect("cloning a PyCodec should not fail") }) @@ -407,7 +407,7 @@ impl DynCodec for PyCodecAdapter { type Type = PyCodecClassAdapter; fn ty(&self) -> Self::Type { - Python::with_gil(|py| PyCodecClassAdapter { + Python::attach(|py| PyCodecClassAdapter { class: self.class.clone_ref(py), codec_id: self.codec_id.clone(), codec_config_schema: self.codec_config_schema.clone(), @@ -415,7 +415,7 @@ impl DynCodec for PyCodecAdapter { } fn get_config(&self, serializer: S) -> Result { - Python::with_gil(|py| { + Python::attach(|py| { let config = self .codec .bind(py) @@ -492,7 +492,7 @@ impl PyCodecClassAdapter { // The `with` closure contains arbitrary Rust code and may block, // which we cannot allow while holding the GIL - Some(py.allow_threads(|| with(ty))) + Some(py.detach(|| with(ty))) } } @@ -511,7 +511,7 @@ impl DynCodecType for PyCodecClassAdapter { &self, config: D, ) -> Result { - Python::with_gil(|py| { + Python::attach(|py| { let config = transcode(config, Pythonizer::new(py)).map_err(serde::de::Error::custom)?; let config: Bound = config.extract().map_err(serde::de::Error::custom)?; diff --git a/crates/numcodecs-python/src/codec.rs b/crates/numcodecs-python/src/codec.rs index 5647ada2..e2bc11bf 100644 --- a/crates/numcodecs-python/src/codec.rs +++ b/crates/numcodecs-python/src/codec.rs @@ -3,7 +3,7 @@ use pyo3::{ ffi::PyTypeObject, intern, prelude::*, - sync::GILOnceCell, + sync::PyOnceLock, types::{DerefToPyAny, IntoPyDict, PyDict, PyType}, }; @@ -126,7 +126,7 @@ unsafe impl PyTypeInfo for PyCodec { #[inline] fn type_object_raw(py: Python) -> *mut PyTypeObject { - static CODEC_TYPE: GILOnceCell> = GILOnceCell::new(); + static CODEC_TYPE: PyOnceLock> = PyOnceLock::new(); let ty = CODEC_TYPE.import(py, "numcodecs.abc", "Codec"); diff --git a/crates/numcodecs-python/src/export.rs b/crates/numcodecs-python/src/export.rs index 7bd4c9ca..65cb8f0e 100644 --- a/crates/numcodecs-python/src/export.rs +++ b/crates/numcodecs-python/src/export.rs @@ -110,8 +110,8 @@ pub(crate) struct RustCodecType { impl Drop for RustCodecType { fn drop(&mut self) { - Python::with_gil(|py| { - py.allow_threads(|| { + Python::attach(|py| { + py.detach(|| { #[allow(unsafe_code)] unsafe { ManuallyDrop::drop(&mut self.ty); @@ -146,12 +146,12 @@ trait AnyCodec: 'static + Send + Sync + Ungil { impl AnyCodec for T { fn encode(&self, py: Python, data: AnyCowArray) -> Result { - py.allow_threads(|| ::encode(self, data)) + py.detach(|| ::encode(self, data)) .map_err(|err| PyErrChain::pyerr_from_err(py, err)) } fn decode(&self, py: Python, encoded: AnyCowArray) -> Result { - py.allow_threads(|| ::decode(self, encoded)) + py.detach(|| ::decode(self, encoded)) .map_err(|err| PyErrChain::pyerr_from_err(py, err)) } @@ -161,13 +161,13 @@ impl AnyCodec for T { encoded: AnyArrayView, decoded: AnyArrayViewMut, ) -> Result<(), PyErr> { - py.allow_threads(|| ::decode_into(self, encoded, decoded)) + py.detach(|| ::decode_into(self, encoded, decoded)) .map_err(|err| PyErrChain::pyerr_from_err(py, err)) } fn get_config<'py>(&self, py: Python<'py>) -> Result, PyErr> { let config: serde_json::Value = py - .allow_threads(|| ::get_config(self, serde_json::value::Serializer)) + .detach(|| ::get_config(self, serde_json::value::Serializer)) .map_err(|err| PyErrChain::pyerr_from_err(py, err))?; pythonize::pythonize(py, &config)?.extract() } @@ -203,7 +203,7 @@ impl AnyCodecType for T { ) .map_err(|err| PyErrChain::pyerr_from_err(py, err))?; - py.allow_threads(|| -> Result { + py.detach(|| -> Result { let codec = ::codec_from_config(self, config)?; Ok(RustCodec { @@ -233,8 +233,8 @@ pub(crate) struct RustCodec { impl Drop for RustCodec { fn drop(&mut self) { - Python::with_gil(|py| { - py.allow_threads(|| { + Python::attach(|py| { + py.detach(|| { #[allow(unsafe_code)] unsafe { ManuallyDrop::drop(&mut self.codec); diff --git a/crates/numcodecs-python/src/lib.rs b/crates/numcodecs-python/src/lib.rs index 07e2e487..9817aedd 100644 --- a/crates/numcodecs-python/src/lib.rs +++ b/crates/numcodecs-python/src/lib.rs @@ -3,7 +3,7 @@ //! [CI Status]: https://img.shields.io/github/actions/workflow/status/juntyr/numcodecs-rs/ci.yml?branch=main //! [workflow]: https://github.com/juntyr/numcodecs-rs/actions/workflows/ci.yml?query=branch%3Amain //! -//! [MSRV]: https://img.shields.io/badge/MSRV-1.86.0-blue +//! [MSRV]: https://img.shields.io/badge/MSRV-1.87.0-blue //! [repo]: https://github.com/juntyr/numcodecs-rs //! //! [Latest Version]: https://img.shields.io/crates/v/numcodecs-python diff --git a/crates/numcodecs-python/src/registry.rs b/crates/numcodecs-python/src/registry.rs index a250e810..e3f121ad 100644 --- a/crates/numcodecs-python/src/registry.rs +++ b/crates/numcodecs-python/src/registry.rs @@ -1,4 +1,4 @@ -use pyo3::{prelude::*, sync::GILOnceCell, types::PyDict}; +use pyo3::{prelude::*, sync::PyOnceLock, types::PyDict}; #[expect(unused_imports)] // FIXME: use expect, only used in docs use crate::PyCodecClassMethods; @@ -20,7 +20,7 @@ impl PyCodecRegistry { /// Errors if no codec with a matching `id` has been registered, or if /// constructing the codec fails. pub fn get_codec<'py>(config: Borrowed<'_, 'py, PyDict>) -> Result, PyErr> { - static GET_CODEC: GILOnceCell> = GILOnceCell::new(); + static GET_CODEC: PyOnceLock> = PyOnceLock::new(); let py = config.py(); @@ -45,7 +45,7 @@ impl PyCodecRegistry { class: Borrowed, codec_id: Option<&str>, ) -> Result<(), PyErr> { - static REGISTER_CODEC: GILOnceCell> = GILOnceCell::new(); + static REGISTER_CODEC: PyOnceLock> = PyOnceLock::new(); let py = class.py(); diff --git a/crates/numcodecs-python/src/schema.rs b/crates/numcodecs-python/src/schema.rs index 7456ddfa..238e6859 100644 --- a/crates/numcodecs-python/src/schema.rs +++ b/crates/numcodecs-python/src/schema.rs @@ -3,7 +3,7 @@ use std::{ collections::{HashMap, hash_map::Entry}, }; -use pyo3::{intern, prelude::*, sync::GILOnceCell}; +use pyo3::{intern, prelude::*, sync::PyOnceLock}; use pythonize::{PythonizeError, depythonize}; use schemars::Schema; use serde_json::{Map, Value}; @@ -14,7 +14,7 @@ use crate::{PyCodecClass, export::RustCodec}; macro_rules! once { ($py:ident, $module:literal $(, $path:literal)*) => {{ fn once(py: Python<'_>) -> Result<&Bound<'_, PyAny>, PyErr> { - static ONCE: GILOnceCell> = GILOnceCell::new(); + static ONCE: PyOnceLock> = PyOnceLock::new(); Ok(ONCE.get_or_try_init(py, || -> Result, PyErr> { Ok(py .import(intern!(py, $module))? diff --git a/crates/numcodecs-python/src/utils.rs b/crates/numcodecs-python/src/utils.rs index f4943931..88b01070 100644 --- a/crates/numcodecs-python/src/utils.rs +++ b/crates/numcodecs-python/src/utils.rs @@ -1,11 +1,11 @@ use numpy::PyUntypedArray; -use pyo3::{prelude::*, sync::GILOnceCell}; +use pyo3::{prelude::*, sync::PyOnceLock}; pub fn numpy_asarray<'py>( py: Python<'py>, a: Borrowed<'_, 'py, PyAny>, ) -> Result, PyErr> { - static AS_ARRAY: GILOnceCell> = GILOnceCell::new(); + static AS_ARRAY: PyOnceLock> = PyOnceLock::new(); let as_array = AS_ARRAY.import(py, "numpy", "asarray")?; diff --git a/crates/numcodecs-python/tests/crc32.rs b/crates/numcodecs-python/tests/crc32.rs index ca6d5402..e6078c37 100644 --- a/crates/numcodecs-python/tests/crc32.rs +++ b/crates/numcodecs-python/tests/crc32.rs @@ -13,7 +13,7 @@ use serde_json::json; #[test] fn python_api() -> Result<(), PyErr> { - Python::with_gil(|py| { + Python::attach(|py| { let config = PyDict::new(py); config.set_item("id", "crc32")?; @@ -74,7 +74,7 @@ fn rust_api() -> Result<(), PyErr> { let codec = PyCodecAdapter::from_registry_with_config(json!({ "id": "crc32", })) - .map_err(|err| Python::with_gil(|py| PyErrChain::pyerr_from_err(py, err)))?; + .map_err(|err| Python::attach(|py| PyErrChain::pyerr_from_err(py, err)))?; assert_eq!(codec.ty().codec_id(), "crc32"); // clone the codec @@ -85,12 +85,12 @@ fn rust_api() -> Result<(), PyErr> { let codec = codec .ty() .codec_from_config(json!({})) - .map_err(|err| Python::with_gil(|py| PyErrChain::pyerr_from_err(py, err)))?; + .map_err(|err| Python::attach(|py| PyErrChain::pyerr_from_err(py, err)))?; // check the codec's config let config = codec .get_config(serde_json::value::Serializer) - .map_err(|err| Python::with_gil(|py| PyErrChain::pyerr_from_err(py, err)))?; + .map_err(|err| Python::attach(|py| PyErrChain::pyerr_from_err(py, err)))?; assert_eq!( config, json!({ diff --git a/crates/numcodecs-python/tests/export.rs b/crates/numcodecs-python/tests/export.rs index f3f5d7d4..7759e7fa 100644 --- a/crates/numcodecs-python/tests/export.rs +++ b/crates/numcodecs-python/tests/export.rs @@ -18,7 +18,7 @@ use serde::{Deserialize, Serialize}; #[test] fn export() -> Result<(), PyErr> { - Python::with_gil(|py| { + Python::attach(|py| { let module = PyModule::new(py, "codecs")?; export_codec_class( py, @@ -71,7 +71,7 @@ fn export() -> Result<(), PyErr> { #[test] fn schema() -> Result<(), PyErr> { - Python::with_gil(|py| { + Python::attach(|py| { let module = PyModule::new(py, "codecs")?; let class = export_codec_class( py, @@ -108,7 +108,7 @@ This codec does *not* take any parameters." #[test] fn downcast() -> Result<(), PyErr> { - Python::with_gil(|py| { + Python::attach(|py| { let module = PyModule::new(py, "codecs")?; let class = export_codec_class( py, diff --git a/crates/numcodecs-python/tests/schema.rs b/crates/numcodecs-python/tests/schema.rs index 8ac46e57..5bc4a749 100644 --- a/crates/numcodecs-python/tests/schema.rs +++ b/crates/numcodecs-python/tests/schema.rs @@ -10,7 +10,7 @@ use pyo3::{intern, prelude::*}; #[test] fn collect_schemas() -> Result<(), PyErr> { - Python::with_gil(|py| { + Python::attach(|py| { let registry = py .import(intern!(py, "numcodecs"))? .getattr(intern!(py, "registry"))? diff --git a/crates/numcodecs-wasm-builder/Cargo.toml b/crates/numcodecs-wasm-builder/Cargo.toml index 09b0b828..60286fb1 100644 --- a/crates/numcodecs-wasm-builder/Cargo.toml +++ b/crates/numcodecs-wasm-builder/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "numcodecs-wasm-builder" -version = "0.1.0+wasi0.2.3" +version = "0.2.0+wasi0.2.6" edition = { workspace = true } authors = { workspace = true } repository = { workspace = true } diff --git a/crates/numcodecs-wasm-builder/README.md b/crates/numcodecs-wasm-builder/README.md index edbdc01f..7b625b2f 100644 --- a/crates/numcodecs-wasm-builder/README.md +++ b/crates/numcodecs-wasm-builder/README.md @@ -3,7 +3,7 @@ [CI Status]: https://img.shields.io/github/actions/workflow/status/juntyr/numcodecs-rs/ci.yml?branch=main [workflow]: https://github.com/juntyr/numcodecs-rs/actions/workflows/ci.yml?query=branch%3Amain -[MSRV]: https://img.shields.io/badge/MSRV-1.86.0-blue +[MSRV]: https://img.shields.io/badge/MSRV-1.87.0-blue [repo]: https://github.com/juntyr/numcodecs-rs [Latest Version]: https://img.shields.io/crates/v/numcodecs-wasm-builder diff --git a/crates/numcodecs-wasm-builder/buildenv/flake.lock b/crates/numcodecs-wasm-builder/buildenv/flake.lock index 1aa4e93a..e32be7db 100644 --- a/crates/numcodecs-wasm-builder/buildenv/flake.lock +++ b/crates/numcodecs-wasm-builder/buildenv/flake.lock @@ -2,12 +2,12 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1745279238, - "narHash": "sha256-AQ7M9wTa/Pa/kK5pcGTgX/DGqMHyzsyINfN7ktsI7Fo=", - "rev": "9684b53175fc6c09581e94cc85f05ab77464c7e3", - "revCount": 717196, + "lastModified": 1758346548, + "narHash": "sha256-afXE7AJ7MY6wY1pg/Y6UPHNYPy5GtUKeBkrZZ/gC71E=", + "rev": "b2a3852bd078e68dd2b3dfa8c00c67af1f0a7d20", + "revCount": 810175, "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.2411.717196%2Brev-9684b53175fc6c09581e94cc85f05ab77464c7e3/019660c5-eae1-7a61-9902-4417eac98039/source.tar.gz" + "url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.2505.810175%2Brev-b2a3852bd078e68dd2b3dfa8c00c67af1f0a7d20/01996a9c-be96-7a98-a978-e5a9ecbd877f/source.tar.gz" }, "original": { "type": "tarball", @@ -41,12 +41,12 @@ "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1745462120, - "narHash": "sha256-TbVjPOl+Cg5vZ7TIn1KpQ8SOfHKD6OEgu84b6YSCfKE=", - "rev": "79d3acd1a7e67fb9315fa5c5556eb6adf93dc2da", - "revCount": 1764, + "lastModified": 1758508617, + "narHash": "sha256-kx2uELmVnAbiekj/YFfWR26OXqXedImkhe2ocnbumTA=", + "rev": "d2bac276ac7e669a1f09c48614538a37e3eb6d0f", + "revCount": 1924, "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/oxalica/rust-overlay/0.1.1764%2Brev-79d3acd1a7e67fb9315fa5c5556eb6adf93dc2da/019665a8-8391-7ba2-a658-c66378143c38/source.tar.gz" + "url": "https://api.flakehub.com/f/pinned/oxalica/rust-overlay/0.1.1924%2Brev-d2bac276ac7e669a1f09c48614538a37e3eb6d0f/01996f4a-36eb-7480-9a05-c8caee46ccc0/source.tar.gz" }, "original": { "type": "tarball", diff --git a/crates/numcodecs-wasm-builder/buildenv/flake.nix b/crates/numcodecs-wasm-builder/buildenv/flake.nix index 8f4d5346..9a4d877c 100644 --- a/crates/numcodecs-wasm-builder/buildenv/flake.nix +++ b/crates/numcodecs-wasm-builder/buildenv/flake.nix @@ -8,7 +8,7 @@ let allSystems = [ "x86_64-linux" "aarch64-darwin" "x86_64-darwin" ]; # keep in sync with rust-toolchain and wasi-sysroot - llvmVersion = "19"; + llvmVersion = "20"; forEachSystem = f: nixpkgs.lib.genAttrs allSystems (system: @@ -24,12 +24,12 @@ let wasi-sysroot = pkgs.stdenv.mkDerivation { pname = "wasi-sysroot"; - version = "25.0"; + version = "27.0"; src = pkgs.fetchurl { url = - "https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-25/wasi-sysroot-25.0.tar.gz"; + "https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-27/wasi-sysroot-27.0.tar.gz"; sha256 = - "d09c62c18efcddffe4b2fdd8c5830109cc8e36130cdbc9acdc0bd1b204c942bb"; + "7110ac48f5d0b1f6ab67d57aecf52450540dddd790cafdc45f0fdfb429bdab84"; }; phases = "installPhase"; diff --git a/crates/numcodecs-wasm-builder/buildenv/rust-toolchain b/crates/numcodecs-wasm-builder/buildenv/rust-toolchain index 9c6f39b9..9c12d941 100644 --- a/crates/numcodecs-wasm-builder/buildenv/rust-toolchain +++ b/crates/numcodecs-wasm-builder/buildenv/rust-toolchain @@ -1,5 +1,5 @@ [toolchain] -channel = "1.86" # MSRV +channel = "1.87" # MSRV components = [ "cargo", "rustfmt", "clippy", "rust-src" ] targets = [ "wasm32-wasip1" ] profile = "minimal" diff --git a/crates/numcodecs-wasm-builder/src/main.rs b/crates/numcodecs-wasm-builder/src/main.rs index 6e563d7c..01fbb00e 100644 --- a/crates/numcodecs-wasm-builder/src/main.rs +++ b/crates/numcodecs-wasm-builder/src/main.rs @@ -95,8 +95,8 @@ edition = "2024" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -numcodecs-wasm-logging = {{ version = "0.1", default-features = false }} -numcodecs-wasm-guest = {{ version = "0.2", default-features = false }} +numcodecs-wasm-logging = {{ version = "0.2", default-features = false }} +numcodecs-wasm-guest = {{ version = "0.3", default-features = false }} numcodecs-my-codec = {{ package = "{crate_}", version = "{version}", default-features = false }} "# ), diff --git a/crates/numcodecs-wasm-guest/Cargo.toml b/crates/numcodecs-wasm-guest/Cargo.toml index c428e9a9..31df535e 100644 --- a/crates/numcodecs-wasm-guest/Cargo.toml +++ b/crates/numcodecs-wasm-guest/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "numcodecs-wasm-guest" -version = "0.2.0" +version = "0.3.0" edition = { workspace = true } authors = { workspace = true } repository = { workspace = true } diff --git a/crates/numcodecs-wasm-guest/README.md b/crates/numcodecs-wasm-guest/README.md index 7bbe168d..0bea44f3 100644 --- a/crates/numcodecs-wasm-guest/README.md +++ b/crates/numcodecs-wasm-guest/README.md @@ -3,7 +3,7 @@ [CI Status]: https://img.shields.io/github/actions/workflow/status/juntyr/numcodecs-rs/ci.yml?branch=main [workflow]: https://github.com/juntyr/numcodecs-rs/actions/workflows/ci.yml?query=branch%3Amain -[MSRV]: https://img.shields.io/badge/MSRV-1.86.0-blue +[MSRV]: https://img.shields.io/badge/MSRV-1.87.0-blue [repo]: https://github.com/juntyr/numcodecs-rs [Latest Version]: https://img.shields.io/crates/v/numcodecs-wasm-guest diff --git a/crates/numcodecs-wasm-guest/src/lib.rs b/crates/numcodecs-wasm-guest/src/lib.rs index 02392627..fdfdc009 100644 --- a/crates/numcodecs-wasm-guest/src/lib.rs +++ b/crates/numcodecs-wasm-guest/src/lib.rs @@ -3,7 +3,7 @@ //! [CI Status]: https://img.shields.io/github/actions/workflow/status/juntyr/numcodecs-rs/ci.yml?branch=main //! [workflow]: https://github.com/juntyr/numcodecs-rs/actions/workflows/ci.yml?query=branch%3Amain //! -//! [MSRV]: https://img.shields.io/badge/MSRV-1.86.0-blue +//! [MSRV]: https://img.shields.io/badge/MSRV-1.87.0-blue //! [repo]: https://github.com/juntyr/numcodecs-rs //! //! [Latest Version]: https://img.shields.io/crates/v/numcodecs-wasm-guest diff --git a/crates/numcodecs-wasm-host-reproducible/Cargo.toml b/crates/numcodecs-wasm-host-reproducible/Cargo.toml index 0c454105..6548553f 100644 --- a/crates/numcodecs-wasm-host-reproducible/Cargo.toml +++ b/crates/numcodecs-wasm-host-reproducible/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "numcodecs-wasm-host-reproducible" -version = "0.1.0+wasi0.2.3" +version = "0.2.1+wasi0.2.6" edition = { workspace = true } authors = { workspace = true } repository = { workspace = true } diff --git a/crates/numcodecs-wasm-host-reproducible/README.md b/crates/numcodecs-wasm-host-reproducible/README.md index df9daeb2..e3225751 100644 --- a/crates/numcodecs-wasm-host-reproducible/README.md +++ b/crates/numcodecs-wasm-host-reproducible/README.md @@ -3,7 +3,7 @@ [CI Status]: https://img.shields.io/github/actions/workflow/status/juntyr/numcodecs-rs/ci.yml?branch=main [workflow]: https://github.com/juntyr/numcodecs-rs/actions/workflows/ci.yml?query=branch%3Amain -[MSRV]: https://img.shields.io/badge/MSRV-1.86.0-blue +[MSRV]: https://img.shields.io/badge/MSRV-1.87.0-blue [repo]: https://github.com/juntyr/numcodecs-rs [Latest Version]: https://img.shields.io/crates/v/numcodecs-wasm-host-reproducible diff --git a/crates/numcodecs-wasm-host-reproducible/src/engine.rs b/crates/numcodecs-wasm-host-reproducible/src/engine.rs index 30628951..5035c3b3 100644 --- a/crates/numcodecs-wasm-host-reproducible/src/engine.rs +++ b/crates/numcodecs-wasm-host-reproducible/src/engine.rs @@ -23,9 +23,9 @@ impl WasmEngine for ReproducibleEngine { type Instance = ReproducibleInstance; type Memory = ReproducibleMemory; type Module = ReproducibleModule; - type Store = ReproducibleStore; - type StoreContext<'a, T: 'a> = ReproducibleStoreContext<'a, T, E>; - type StoreContextMut<'a, T: 'a> = ReproducibleStoreContextMut<'a, T, E>; + type Store = ReproducibleStore; + type StoreContext<'a, T: 'static> = ReproducibleStoreContext<'a, T, E>; + type StoreContextMut<'a, T: 'static> = ReproducibleStoreContextMut<'a, T, E>; type Table = ReproducibleTable; } @@ -62,7 +62,7 @@ impl WasmExternRef> for ReproducibleExternR )) } - fn downcast<'a, 's: 'a, T: 'static, S: 'a>( + fn downcast<'a, 's: 'a, T: 'static, S: 'static>( &'a self, store: ReproducibleStoreContext<'s, S, E>, ) -> anyhow::Result<&'a T> { @@ -75,7 +75,7 @@ impl WasmExternRef> for ReproducibleExternR pub struct ReproducibleFunc(E::Func); impl WasmFunc> for ReproducibleFunc { - fn new( + fn new( mut ctx: impl AsContextMut, UserState = T>, ty: FuncType, func: impl 'static @@ -366,6 +366,9 @@ pub const DETERMINISTIC_WASM_MODULE_FEATURES: wasmparser::WasmFeaturesInflated = cm_async_builtins: false, // NO-CORE: components must have been translated into core WASM // modules by now + cm_threading: false, + // NO-CORE: components must have been translated into core WASM + // modules by now cm_error_context: false, // NO-CORE: components must have been translated into core WASM // modules by now @@ -428,9 +431,9 @@ struct StoreData { #[derive(Clone)] #[repr(transparent)] -pub struct ReproducibleStore(E::Store>); +pub struct ReproducibleStore(E::Store>); -impl WasmStore> for ReproducibleStore { +impl WasmStore> for ReproducibleStore { fn new(engine: &ReproducibleEngine, data: T) -> Self { Self(> as WasmStore< StoreData, @@ -461,7 +464,7 @@ impl WasmStore> for ReproducibleStore } } -impl AsContext> for ReproducibleStore { +impl AsContext> for ReproducibleStore { type UserState = T; fn as_context(&self) -> ReproducibleStoreContext<'_, Self::UserState, E> { @@ -469,16 +472,18 @@ impl AsContext> for ReproducibleStore AsContextMut> for ReproducibleStore { +impl AsContextMut> for ReproducibleStore { fn as_context_mut(&mut self) -> ReproducibleStoreContextMut<'_, Self::UserState, E> { ReproducibleStoreContextMut(AsContextMut::as_context_mut(&mut self.0)) } } #[repr(transparent)] -pub struct ReproducibleStoreContext<'a, T: 'a, E: WasmEngine>(E::StoreContext<'a, StoreData>); +pub struct ReproducibleStoreContext<'a, T: 'static, E: WasmEngine>( + E::StoreContext<'a, StoreData>, +); -impl<'a, T: 'a, E: WasmEngine> WasmStoreContext<'a, T, ReproducibleEngine> +impl<'a, T: 'static, E: WasmEngine> WasmStoreContext<'a, T, ReproducibleEngine> for ReproducibleStoreContext<'a, T, E> { fn engine(&self) -> &ReproducibleEngine { @@ -490,8 +495,8 @@ impl<'a, T: 'a, E: WasmEngine> WasmStoreContext<'a, T, ReproducibleEngine> } } -impl<'a, T: 'a, E: WasmEngine> AsContext> - for ReproducibleStoreContext<'a, T, E> +impl AsContext> + for ReproducibleStoreContext<'_, T, E> { type UserState = T; @@ -500,18 +505,18 @@ impl<'a, T: 'a, E: WasmEngine> AsContext> } } -impl<'a, T: 'a, E: WasmEngine> ReproducibleStoreContext<'a, T, E> { +impl ReproducibleStoreContext<'_, T, E> { fn as_inner_context(&self) -> E::StoreContext<'_, StoreData> { self.0.as_context() } } #[repr(transparent)] -pub struct ReproducibleStoreContextMut<'a, T: 'a, E: WasmEngine>( +pub struct ReproducibleStoreContextMut<'a, T: 'static, E: WasmEngine>( E::StoreContextMut<'a, StoreData>, ); -impl<'a, T: 'a, E: WasmEngine> WasmStoreContext<'a, T, ReproducibleEngine> +impl<'a, T: 'static, E: WasmEngine> WasmStoreContext<'a, T, ReproducibleEngine> for ReproducibleStoreContextMut<'a, T, E> { fn engine(&self) -> &ReproducibleEngine { @@ -523,7 +528,7 @@ impl<'a, T: 'a, E: WasmEngine> WasmStoreContext<'a, T, ReproducibleEngine> } } -impl<'a, T: 'a, E: WasmEngine> WasmStoreContextMut<'a, T, ReproducibleEngine> +impl<'a, T: 'static, E: WasmEngine> WasmStoreContextMut<'a, T, ReproducibleEngine> for ReproducibleStoreContextMut<'a, T, E> { fn data_mut(&mut self) -> &mut T { @@ -531,8 +536,8 @@ impl<'a, T: 'a, E: WasmEngine> WasmStoreContextMut<'a, T, ReproducibleEngine> } } -impl<'a, T: 'a, E: WasmEngine> AsContext> - for ReproducibleStoreContextMut<'a, T, E> +impl AsContext> + for ReproducibleStoreContextMut<'_, T, E> { type UserState = T; @@ -541,15 +546,15 @@ impl<'a, T: 'a, E: WasmEngine> AsContext> } } -impl<'a, T: 'a, E: WasmEngine> AsContextMut> - for ReproducibleStoreContextMut<'a, T, E> +impl AsContextMut> + for ReproducibleStoreContextMut<'_, T, E> { fn as_context_mut(&mut self) -> ReproducibleStoreContextMut<'_, Self::UserState, E> { ReproducibleStoreContextMut(AsContextMut::as_context_mut(&mut self.0)) } } -impl<'a, T: 'a, E: WasmEngine> ReproducibleStoreContextMut<'a, T, E> { +impl ReproducibleStoreContextMut<'_, T, E> { fn as_inner_context_mut(&mut self) -> E::StoreContextMut<'_, StoreData> { self.0.as_context_mut() } diff --git a/crates/numcodecs-wasm-host-reproducible/src/lib.rs b/crates/numcodecs-wasm-host-reproducible/src/lib.rs index ff910a79..2bc29a20 100644 --- a/crates/numcodecs-wasm-host-reproducible/src/lib.rs +++ b/crates/numcodecs-wasm-host-reproducible/src/lib.rs @@ -3,7 +3,7 @@ //! [CI Status]: https://img.shields.io/github/actions/workflow/status/juntyr/numcodecs-rs/ci.yml?branch=main //! [workflow]: https://github.com/juntyr/numcodecs-rs/actions/workflows/ci.yml?query=branch%3Amain //! -//! [MSRV]: https://img.shields.io/badge/MSRV-1.86.0-blue +//! [MSRV]: https://img.shields.io/badge/MSRV-1.87.0-blue //! [repo]: https://github.com/juntyr/numcodecs-rs //! //! [Latest Version]: https://img.shields.io/crates/v/numcodecs-wasm-host-reproducible diff --git a/crates/numcodecs-wasm-host-reproducible/src/stdio.rs b/crates/numcodecs-wasm-host-reproducible/src/stdio.rs index 9854466d..0c79255f 100644 --- a/crates/numcodecs-wasm-host-reproducible/src/stdio.rs +++ b/crates/numcodecs-wasm-host-reproducible/src/stdio.rs @@ -120,7 +120,7 @@ impl WasiSandboxedStdioInterface { stdio: InterfaceIdentifier::new( PackageIdentifier::new( PackageName::new("wasi-sandboxed", "io"), - Some(semver::Version::new(0, 2, 3)), + Some(semver::Version::new(0, 2, 6)), ), "stdio", ), diff --git a/crates/numcodecs-wasm-host-reproducible/src/transform/instcnt.rs b/crates/numcodecs-wasm-host-reproducible/src/transform/instcnt.rs index 9e744d4c..18058b48 100644 --- a/crates/numcodecs-wasm-host-reproducible/src/transform/instcnt.rs +++ b/crates/numcodecs-wasm-host-reproducible/src/transform/instcnt.rs @@ -25,7 +25,7 @@ impl InstructionCounterInjecter { }; reencoder .parse_core_module(&mut module, parser, wasm) - .map_err(|err| anyhow::format_err!("{}", err))?; + .map_err(|err| anyhow::format_err!("{err}"))?; if let Some(instruction_counter_func_index) = reencoder.instruction_counter_func_index { anyhow::ensure!( diff --git a/crates/numcodecs-wasm-host-reproducible/src/transform/mod.rs b/crates/numcodecs-wasm-host-reproducible/src/transform/mod.rs index 45cdce17..bcf0a663 100644 --- a/crates/numcodecs-wasm-host-reproducible/src/transform/mod.rs +++ b/crates/numcodecs-wasm-host-reproducible/src/transform/mod.rs @@ -229,12 +229,10 @@ struct PackageWithPorts { fn register_wasi_component_packages( wac: &mut wac_graph::CompositionGraph, ) -> Result, Error> { - // TODO: switch to merged component with wasi_sandboxed_component_provider >= v0.2.4 - // const WASI_COMPONENTS: &[(&str, &[u8])] = &[( - // "wasi-sandboxed:merged", - // wasi_sandboxed_component_provider::MERGED_COMPONENT, - // )]; - const WASI_COMPONENTS: &[(&str, &[u8])] = wasi_sandboxed_component_provider::ALL_COMPONENTS; + const WASI_COMPONENTS: &[(&str, &[u8])] = &[( + "wasi-sandboxed:merged", + wasi_sandboxed_component_provider::MERGED_COMPONENT, + )]; let wasi_component_packages = WASI_COMPONENTS .iter() diff --git a/crates/numcodecs-wasm-host-reproducible/src/transform/nan.rs b/crates/numcodecs-wasm-host-reproducible/src/transform/nan.rs index 1d40a64c..a3022769 100644 --- a/crates/numcodecs-wasm-host-reproducible/src/transform/nan.rs +++ b/crates/numcodecs-wasm-host-reproducible/src/transform/nan.rs @@ -29,7 +29,7 @@ impl NaNCanonicaliser { }; reencoder .parse_core_module(&mut module, parser, wasm) - .map_err(|err| anyhow::format_err!("{}", err))?; + .map_err(|err| anyhow::format_err!("{err}"))?; let wasm = module.finish(); wasmparser::Validator::new_with_features(features).validate_all(&wasm)?; diff --git a/crates/numcodecs-wasm-host-reproducible/tests/round.wasm b/crates/numcodecs-wasm-host-reproducible/tests/round.wasm index acec20e1..34f018f0 100644 --- a/crates/numcodecs-wasm-host-reproducible/tests/round.wasm +++ b/crates/numcodecs-wasm-host-reproducible/tests/round.wasm @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9498652bc5911a86d50632baedca282036eb20169736acebbd251c7242efbeae -size 378559 +oid sha256:b53e081203620aa12ad22c1fece51a99f440cdb5fad826319521b79b6d1c1a2d +size 387564 diff --git a/crates/numcodecs-wasm-host/Cargo.toml b/crates/numcodecs-wasm-host/Cargo.toml index 80d3d187..5faac615 100644 --- a/crates/numcodecs-wasm-host/Cargo.toml +++ b/crates/numcodecs-wasm-host/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "numcodecs-wasm-host" -version = "0.1.0" +version = "0.2.0" edition = { workspace = true } authors = { workspace = true } repository = { workspace = true } diff --git a/crates/numcodecs-wasm-host/README.md b/crates/numcodecs-wasm-host/README.md index 42e2d88f..e3d4c554 100644 --- a/crates/numcodecs-wasm-host/README.md +++ b/crates/numcodecs-wasm-host/README.md @@ -3,7 +3,7 @@ [CI Status]: https://img.shields.io/github/actions/workflow/status/juntyr/numcodecs-rs/ci.yml?branch=main [workflow]: https://github.com/juntyr/numcodecs-rs/actions/workflows/ci.yml?query=branch%3Amain -[MSRV]: https://img.shields.io/badge/MSRV-1.86.0-blue +[MSRV]: https://img.shields.io/badge/MSRV-1.87.0-blue [repo]: https://github.com/juntyr/numcodecs-rs [Latest Version]: https://img.shields.io/crates/v/numcodecs-wasm-host diff --git a/crates/numcodecs-wasm-host/src/lib.rs b/crates/numcodecs-wasm-host/src/lib.rs index 6c30d9c1..fa57892c 100644 --- a/crates/numcodecs-wasm-host/src/lib.rs +++ b/crates/numcodecs-wasm-host/src/lib.rs @@ -3,7 +3,7 @@ //! [CI Status]: https://img.shields.io/github/actions/workflow/status/juntyr/numcodecs-rs/ci.yml?branch=main //! [workflow]: https://github.com/juntyr/numcodecs-rs/actions/workflows/ci.yml?query=branch%3Amain //! -//! [MSRV]: https://img.shields.io/badge/MSRV-1.86.0-blue +//! [MSRV]: https://img.shields.io/badge/MSRV-1.87.0-blue //! [repo]: https://github.com/juntyr/numcodecs-rs //! //! [Latest Version]: https://img.shields.io/crates/v/numcodecs-wasm-host diff --git a/crates/numcodecs-wasm-logging/Cargo.toml b/crates/numcodecs-wasm-logging/Cargo.toml index 656225b6..5f50ad1f 100644 --- a/crates/numcodecs-wasm-logging/Cargo.toml +++ b/crates/numcodecs-wasm-logging/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "numcodecs-wasm-logging" -version = "0.1.0" +version = "0.2.0" edition = { workspace = true } authors = { workspace = true } repository = { workspace = true } diff --git a/crates/numcodecs-wasm-logging/README.md b/crates/numcodecs-wasm-logging/README.md index 68d9ab9b..1f82a67f 100644 --- a/crates/numcodecs-wasm-logging/README.md +++ b/crates/numcodecs-wasm-logging/README.md @@ -3,7 +3,7 @@ [CI Status]: https://img.shields.io/github/actions/workflow/status/juntyr/numcodecs-rs/ci.yml?branch=main [workflow]: https://github.com/juntyr/numcodecs-rs/actions/workflows/ci.yml?query=branch%3Amain -[MSRV]: https://img.shields.io/badge/MSRV-1.86.0-blue +[MSRV]: https://img.shields.io/badge/MSRV-1.87.0-blue [repo]: https://github.com/juntyr/numcodecs-rs [Latest Version]: https://img.shields.io/crates/v/numcodecs-wasm-logging diff --git a/crates/numcodecs-wasm-logging/src/lib.rs b/crates/numcodecs-wasm-logging/src/lib.rs index a6b27747..9f073e03 100644 --- a/crates/numcodecs-wasm-logging/src/lib.rs +++ b/crates/numcodecs-wasm-logging/src/lib.rs @@ -3,7 +3,7 @@ //! [CI Status]: https://img.shields.io/github/actions/workflow/status/juntyr/numcodecs-rs/ci.yml?branch=main //! [workflow]: https://github.com/juntyr/numcodecs-rs/actions/workflows/ci.yml?query=branch%3Amain //! -//! [MSRV]: https://img.shields.io/badge/MSRV-1.86.0-blue +//! [MSRV]: https://img.shields.io/badge/MSRV-1.87.0-blue //! [repo]: https://github.com/juntyr/numcodecs-rs //! //! [Latest Version]: https://img.shields.io/crates/v/numcodecs-wasm-logging diff --git a/crates/numcodecs/Cargo.toml b/crates/numcodecs/Cargo.toml index 22027487..c7993bfb 100644 --- a/crates/numcodecs/Cargo.toml +++ b/crates/numcodecs/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "numcodecs" -version = "0.2.1" +version = "0.3.0" edition = { workspace = true } authors = { workspace = true } repository = { workspace = true } diff --git a/crates/numcodecs/README.md b/crates/numcodecs/README.md index 03c6989e..1b8ebaa1 100644 --- a/crates/numcodecs/README.md +++ b/crates/numcodecs/README.md @@ -3,7 +3,7 @@ [CI Status]: https://img.shields.io/github/actions/workflow/status/juntyr/numcodecs-rs/ci.yml?branch=main [workflow]: https://github.com/juntyr/numcodecs-rs/actions/workflows/ci.yml?query=branch%3Amain -[MSRV]: https://img.shields.io/badge/MSRV-1.86.0-blue +[MSRV]: https://img.shields.io/badge/MSRV-1.87.0-blue [repo]: https://github.com/juntyr/numcodecs-rs [Latest Version]: https://img.shields.io/crates/v/numcodecs diff --git a/crates/numcodecs/src/lib.rs b/crates/numcodecs/src/lib.rs index 3b3f93e8..4e5ff5ad 100644 --- a/crates/numcodecs/src/lib.rs +++ b/crates/numcodecs/src/lib.rs @@ -3,7 +3,7 @@ //! [CI Status]: https://img.shields.io/github/actions/workflow/status/juntyr/numcodecs-rs/ci.yml?branch=main //! [workflow]: https://github.com/juntyr/numcodecs-rs/actions/workflows/ci.yml?query=branch%3Amain //! -//! [MSRV]: https://img.shields.io/badge/MSRV-1.86.0-blue +//! [MSRV]: https://img.shields.io/badge/MSRV-1.87.0-blue //! [repo]: https://github.com/juntyr/numcodecs-rs //! //! [Latest Version]: https://img.shields.io/crates/v/numcodecs diff --git a/py/numcodecs-wasm-template/pyproject.toml b/py/numcodecs-wasm-template/pyproject.toml index 17ca245f..e1fea1a0 100644 --- a/py/numcodecs-wasm-template/pyproject.toml +++ b/py/numcodecs-wasm-template/pyproject.toml @@ -16,7 +16,7 @@ license = { file = "LICENSE" } requires-python = ">=3.10" dependencies = [ - "numcodecs-wasm~=0.1.5", # wasi 0.2.3 + "numcodecs-wasm~=0.2.0", # wasi 0.2.6 ] [project.entry-points."numcodecs.codecs"] diff --git a/py/numcodecs-wasm/Cargo.toml b/py/numcodecs-wasm/Cargo.toml index 9e54fa9b..b3a44e31 100644 --- a/py/numcodecs-wasm/Cargo.toml +++ b/py/numcodecs-wasm/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "numcodecs-wasm" -version = "0.1.7+wasi0.2.3" +version = "0.2.1+wasi0.2.6" edition = { workspace = true } authors = { workspace = true } repository = { workspace = true } diff --git a/py/numcodecs-wasm/pyproject.toml b/py/numcodecs-wasm/pyproject.toml index f1fdd4f2..f7b8afc3 100644 --- a/py/numcodecs-wasm/pyproject.toml +++ b/py/numcodecs-wasm/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "maturin" [project] name = "numcodecs_wasm" -version = "0.1.7" # wasi 0.2.3 +version = "0.2.1" # wasi 0.2.6 description = "numcodecs compression for codecs compiled to WebAssembly" authors = [{ name = "Juniper Tyree", email = "juniper.tyree@helsinki.fi" }]