oxc/crates/oxc_allocator/Cargo.toml
overlookmotel bf4e5e1c18 feat(allocator): add HashMap (#8553)
Add `HashMap` type to `oxc_allocator`. `HashMap` is a thin wrapper around `hashbrown::HashMap`, which allocates in the arena. The inner map is wrapped in `ManuallyDrop`, so `HashMap` is non-`Drop` (same as `oxc_allocator::Vec`).

We use `FxHasher` for all hash maps, so I figured just make that part of the type, rather than having to specify the hasher everywhere we use `HashMap`.
2025-01-16 23:29:57 +00:00

35 lines
791 B
TOML

[package]
name = "oxc_allocator"
version = "0.46.0"
authors.workspace = true
categories.workspace = true
edition.workspace = true
homepage.workspace = true
include = ["/src"]
keywords.workspace = true
license.workspace = true
repository.workspace = true
rust-version.workspace = true
description.workspace = true
[lints]
workspace = true
[lib]
doctest = false
[dependencies]
allocator-api2 = { workspace = true }
bumpalo = { workspace = true, features = ["allocator-api2", "collections"] }
hashbrown = { workspace = true, features = ["allocator-api2"] }
rustc-hash = { workspace = true }
simdutf8 = { workspace = true }
serde = { workspace = true, optional = true }
[dev-dependencies]
serde = { workspace = true }
serde_json = { workspace = true }
[features]
serialize = ["dep:serde"]