Cargo Features

[dependencies]
zerogc = { version = "0.2.0-alpha.7", default-features = false, features = ["std", "alloc", "allocator-api", "hashmap-impl", "errors", "serde1", "epsilon", "epsilon-arena-alloc", "parking_lot", "anyhow"] }
default = epsilon, epsilon-arena-alloc, std

These default features are set whenever zerogc is added without default-features = false somewhere in the dependency tree.

std default = alloc

Depend on the standard library (optional)

This implements tracing for most standard library types.

alloc std

Depend on extern crate alloc in addition to the Rust core This is implied by using the standard library (feature="std")

This implements Trace for Box and collections like Vec

Affects zerogc::GcSimpleAlloc.alloc_array_from_vec

allocator-api hashmap-impl?

Emulate the core::alloc::Allocator api

NOTE: This doesn't necessarily require the 'alloc' feature (because the API itself is in 'core')

Affects zerogc::allocator

hashmap-impl = ahash, allocator-api, hashbrown

Our custom hashmap implementation

Affects zerogc::hash_map

errors

Support a 'GcError' type that implements 'std::error::Error'
by wrapping a 'GcHandle'

Affects zerogc::errors, zerogc::GcSimpleAlloc.alloc_error

serde1 = serde

Serde support

Enables serde of arrayvec and hashbrown ^0.11 and zerogc-derive

Used for macros

and serde-1 of indexmap ^1.6

Manually included tracing support for third party libraries Providing support for these important libraries,
gives zerogc batteries included support.

Affects zerogc::serde

epsilon default epsilon-arena-alloc

Support the "epsilon" no-op collector

epsilon-arena-alloc default = bumpalo, epsilon

Configure the "epsilon" collector use arena allocation (on by default)

Affects alloc::Default

Features from optional dependencies

In crates that don't use the dep: syntax, optional dependencies automatically become Cargo features. These features may have been created by mistake, and this functionality may be removed in the future.

indexmap serde1?

Enables indexmap ^1.6

parking_lot implicit feature

Enables parking_lot ^0.11

parking_lot:

More compact and efficient implementations of the standard synchronization primitives

arrayvec serde1?
anyhow implicit feature

Enables anyhow

anyhow:

Flexible concrete Error type built on std::error::Error

serde serde1?

Enables serde

Serde support (optional)

bumpalo epsilon-arena-alloc

Enables bumpalo

Used for the "epsilon" no-op collector

ahash hashmap-impl?

Enables ahash ^0.7.0

Used for our custom hashmap

hashbrown hashmap-impl? serde1?

Enables hashbrown ^0.11