Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(swc_allocator): Provide allocators #10061

Merged
merged 38 commits into from
Feb 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changeset/wicked-carrots-fix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
swc_allocator: major
hstr: major
---

feat(swc_allocator): Provide allocators
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

45 changes: 25 additions & 20 deletions crates/swc_allocator/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,32 +14,37 @@ version = "3.0.1"


[features]
default = []
nightly = ["bumpalo/allocator_api", "hashbrown/nightly"]
rkyv = ["dep:rkyv", "dep:rancor"]
scoped = ["nightly"]
serde = ["dep:serde"]
hashbrown = ["dep:hashbrown", "hashbrown/allocator-api2"]
nightly = [
"skip-warning",
"allocator-api2/nightly",
"bumpalo/allocator_api",
"hashbrown/nightly",
]
rkyv = ["dep:rkyv", "dep:rancor"]
serde = ["dep:serde"]
# This feature is used to suppress warnings about slowness caused by stable rustc.
# It's recommended to use nightly rustc until the allocator APIs are stabilized.
skip-warning = []


[dependencies]
bumpalo = { workspace = true, features = [
"boxed",
"collections",
"allocator-api2",
] }
hashbrown = { workspace = true }
ptr_meta = { workspace = true }
rancor = { workspace = true, optional = true }
rkyv = { workspace = true, optional = true }
rustc-hash = { workspace = true }
serde = { workspace = true, optional = true }
triomphe = { workspace = true }
allocator-api2 = { workspace = true }
bumpalo = { workspace = true, features = ["allocator-api2"] }
hashbrown = { workspace = true, optional = true }
ptr_meta = { workspace = true }
rancor = { workspace = true, optional = true }
rkyv = { workspace = true, optional = true }
rustc-hash = { workspace = true }
serde = { workspace = true, optional = true }
triomphe = { workspace = true }


[dev-dependencies]
criterion = { workspace = true }

codspeed-criterion-compat = { workspace = true }
swc_malloc = { version = "1.0.0", path = "../swc_malloc" }
criterion = { workspace = true }

swc_malloc = { version = "1.0.0", path = "../swc_malloc" }


[[bench]]
Expand Down
215 changes: 0 additions & 215 deletions crates/swc_allocator/src/alloc.rs

This file was deleted.

Loading
Loading