mirror of
https://github.com/danbulant/oxc
synced 2026-05-24 12:21:58 +00:00
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`.
35 lines
791 B
TOML
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"]
|