Cargo Features

[dependencies]
obel_platform = { version = "0.0.6", default-features = false, features = ["serialize", "std", "alloc", "critical-section", "portable-atomic"] }
default = std

The std feature is set by default whenever obel_platform is added without default-features = false somewhere in the dependency tree.

serialize

Functionality Adds serialization support through serde.

Enables serde of hashbrown

std default = alloc

Platform Compatibility Allows access to the std crate. Enabling this feature will prevent compilation on no_std targets, but provides access to certain additional features on supported platforms.

Enables thread_local, std of foldhash, spin, optional critical-section, optional portable-atomic, and optional portable-atomic-util

alloc std

Enables hashbrown and alloc of optional portable-atomic-util

portable-atomic-util:

Use alloc.

Note:

  • The MSRV when this feature is enabled and the std feature is not enabled is Rust 1.36 that alloc crate stabilized.

Affects hashbrown::hash_map, hashbrown::hash_set, hashbrown::hash_table

critical-section

critical-section provides the building blocks for synchronization primitives on all platforms, including no_std.

Enables critical-section, critical-section of optional portable-atomic

portable-atomic

portable-atomic provides additional platform support for atomic types and operations, even on targets without native support.

Enables portable-atomic and portable-atomic-util, portable_atomic of spin