]> khamidou — GitHub mirrors - safetensors.git/commit
Fix no-std feature configuration to auto-fallback from std to alloc (#651)
authorDilshod Tadjibaev <939125+antimora@users.noreply.github.com>
Mon, 8 Sep 2025 08:24:14 +0000 (03:24 -0500)
committerGitHub <noreply@github.com>
Mon, 8 Sep 2025 08:24:14 +0000 (10:24 +0200)
commit0816a1ae1d6b731cefd67f061d80d1cadd0dd7bb
tree7630b8a635dff9a8dc7bde7700bf92df8926f8de
parent0e0151116b29fad9155f623b08b002c17bb09057
Fix no-std feature configuration to auto-fallback from std to alloc (#651)

* Refactor feature flags for alloc and std support

Updated Cargo.toml to always enable alloc support and removed the alloc feature from dependencies. The alloc feature is now a no-op for backward compatibility. Adjusted lib.rs to use alloc when std is not enabled and removed compile-time errors enforcing feature exclusivity.

* Update no-std test command in CI workflow

Removes the explicit 'alloc' feature from the no-std test command in the GitHub Actions workflow, running tests with only --no-default-features. This may be to ensure tests run in a stricter no-std environment or to match updated feature requirements.
.github/workflows/rust.yml
safetensors/Cargo.toml
safetensors/src/lib.rs