Skip to content

Commit

Permalink
Conditionally include igzip if 64bit sys
Browse files Browse the repository at this point in the history
  • Loading branch information
milesgranger committed Sep 24, 2024
1 parent ec0782d commit c47b868
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
3 changes: 0 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,6 @@ use-system-blosc2-shared = ["libcramjam/use-system-blosc2", "libcramjam/blosc2-s

wasm32-compat = ["libcramjam/wasm32-compat"]

# isa-l not supported on 32-bit arch
[target.'cfg(target_pointer_width = "32")'.features]
default = ["extension-module", "snappy", "lz4", "bzip2", "brotli", "xz", "zstd", "gzip", "deflate", "blosc2"]

[dependencies]
pyo3 = { version = "^0.22", default-features = false, features = ["macros"] }
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Available algorithms:
- [X] ZSTD           `cramjam.zstd`
- [X] XZ / LZMA  `cramjam.xz`
- [X] Blosc2        `cramjam.experimental.blosc2`
- [X] IGzip        `cramjam.experimental.igzip`
- [X] IGzip        `cramjam.experimental.igzip` (only on 64-bit systems)

All available for use as:

Expand Down
5 changes: 4 additions & 1 deletion src/experimental.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ pub mod experimental {
#[pymodule_export]
use crate::blosc2::blosc2;

#[cfg(any(feature = "igzip", feature = "isal-static", feature = "isal-shared"))]
#[cfg(all(
any(feature = "igzip", feature = "isal-static", feature = "isal-shared"),
target_pointer_width = "64"
))]
#[pymodule_export]
use crate::igzip::igzip;
}
5 changes: 4 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,10 @@ pub mod bzip2;
pub mod deflate;
#[cfg(any(feature = "gzip", feature = "gzip-static", feature = "gzip-shared"))]
pub mod gzip;
#[cfg(any(feature = "igzip", feature = "isal-static", feature = "isal-shared"))]
#[cfg(all(
any(feature = "igzip", feature = "isal-static", feature = "isal-shared"),
target_pointer_width = "64"
))]
pub mod igzip;
#[cfg(feature = "lz4")]
pub mod lz4;
Expand Down

0 comments on commit c47b868

Please sign in to comment.