Skip to content

Heavily abstracted rewerite of the zerogc API for version 0.3 #34

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

Draft
wants to merge 36 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
9eec6a1
Initial commit
Techcable Apr 25, 2024
b2b79eb
Add README
Techcable Apr 25, 2024
927e525
utils: Remove alignment check from transmute_arbitrary
Techcable Apr 29, 2024
2839223
Use fixed alignment for GC types
Techcable Apr 29, 2024
6b9397f
Add bindings for mimalloc
Techcable May 1, 2024
ea40db0
Work on mark bits state (can be inverted in oldgen)
Techcable May 2, 2024
4e445d3
Write pointer trace & copy function
Techcable May 2, 2024
b15b5d4
Cleanup alloc using RawAllocTarget trait
Techcable May 2, 2024
e3bf385
Split layout code into seperate module
Techcable May 4, 2024
5efc76a
Get basic example to compile
Techcable May 5, 2024
304f4df
Avoid GcHeader::regular_value_ptr to satisfy miri
Techcable May 5, 2024
09e9072
Revert "Avoid GcHeader::regular_value_ptr to satisfy miri"
Techcable May 5, 2024
bf5da49
Add allocator debug mode, avoiding bumpalo
Techcable May 5, 2024
3aa6904
In debug mode, touch roots after trace
Techcable May 6, 2024
661f3be
Disable stacker::grow under miri
Techcable May 6, 2024
9bc55d9
Fix Gc::header offset calculation UB
Techcable May 6, 2024
d17c462
In debug-alloc, ArenaAlloc cannot frees individual allocs
Techcable May 6, 2024
68ae635
Attempt to explicitly Drop old-gen objects under miri
Techcable May 6, 2024
f087b89
Add lefthook.yml to check rust formatting
Techcable May 6, 2024
38a3b1e
Invoke destructors for dead objects
Techcable May 6, 2024
ede53ad
Add 'zerogc-nextv0.3/' from commit '38a3b1e13e2f2a8258aa325378952900d…
Techcable May 7, 2024
8cae9b7
Remove context and simple crates
Techcable May 8, 2024
bc9bac5
Drop features unsupported in v0.3
Techcable May 8, 2024
145fab5
Remove safepoint macros
Techcable May 8, 2024
0814629
Remove GcContext trait
Techcable May 8, 2024
e6aae10
Split lib.rs into submodules
Techcable May 10, 2024
896871b
Hide unstable features behind nightly flag
Techcable May 15, 2024
4bbbc41
Remove GcDeserialize derive code
Techcable May 15, 2024
80ee1d9
Remove GcHandle code
Techcable May 16, 2024
78ad4dc
Bump edition to 2021
Techcable May 17, 2024
8922006
Update some dependency versions
Techcable May 17, 2024
0bda65c
Fix usage of indexmap mutable keys in Trace
Techcable May 25, 2024
4c6b2c8
Add GcHeader trait & GcContext type
Techcable May 25, 2024
443e626
Fix clippy lints
Techcable May 28, 2024
6672aaa
More work on GcHandle trait and GcContext
Techcable Jun 21, 2024
c3d1472
Attempt to make GcHandle a trait
Techcable Jun 30, 2024
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
65 changes: 26 additions & 39 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,30 +9,24 @@ edition.workspace = true
readme = "README.md"

[dependencies]
scopeguard = "1.1"
inherent = "1"
# NOTE: Require an implementation of the abort that doesn't panic
#
# This can currently be done by enabling `std` or `libc`
libabort = { version = "0.1.7", default-features = false, features = ["always-immediate-abort"] }
# This provides a fallback `Allocator` API for stable rust.
allocator-api2 = { version = "0.2.18", default-features = false, features = ["alloc"] }
# Manually included tracing support for third party libraries
# Providing support for these important libraries,
# gives zerogc batteries included support.
indexmap = { version = "1.6", optional = true }
parking_lot = { version = "0.11", optional = true }
indexmap = { version = "2", optional = true }
parking_lot = { version = "0.12", optional = true }
arrayvec = { version = "0.7", optional = true }
anyhow = { version = "1", optional = true }
# Serde support (optional)
serde = { version = "1", optional = true, features = ["derive"] }
hashbrown = { version = "0.14.5", optional = true }
# Used for macros
zerogc-derive = { path = "libs/derive", version = "0.2.0-alpha.6" }
# Used for the "epsilon" no-op collector
bumpalo = { version = "3", optional = true }
# Used for our custom hashmap
ahash = { version = "0.7.0", default-features = false, optional = true }

[dependencies.hashbrown]
# Hashbrown is used for our custom hashmap implementation
# We also implement Trace regardless
version = "0.11"
optional = true
features = ["raw", "nightly"]
# Static assertions
static_assertions = "1.1"

[dev-dependencies]
serde_json = "1"
Expand All @@ -49,33 +43,26 @@ version = "0.2.0-alpha.7"
authors = ["Techcable <[email protected]>"]
repository = "https://github.com/DuckLogic/zerogc"
license = "MIT"
edition = "2018"
edition = "2021"

[features]
default = ["std", "epsilon", "epsilon-arena-alloc"]
default = ["std"]
# Depend on the standard library (optional)
#
# This implements tracing for most standard library types.
std = ["alloc"]
# Depend on `extern crate alloc` in addition to the Rust `core`
# This is implied by using the standard library (feature="std")
std = ["alloc", "allocator-api2/std", "libabort/std"]
# Implement `Trace` for types in `extern crate alloc` in addition to the Rust `core`.
# This supports types like `alloc::box::Box` and `alloc::vec::Vec`
#
# This implements `Trace` for `Box` and collections like `Vec`
# This is implied by using the standard library (feature="std")
# Regardless of the presence or absence of this feature,
# the implementation currently relies on the `alloc` crate (but this may change in the future).
alloc = []
# Emulate the `core::alloc::Allocator` api
# Enables support for thread-safe collectors.
#
# NOTE: This doesn't *necessarily* require the 'alloc'
# feature (because the API itself is in 'core')
allocator-api = []
# Our custom hashmap implementation
hashmap-impl = ["allocator-api", "hashbrown", "ahash"]
# Support a 'GcError' type that implements 'std::error::Error'
# by wrapping a 'GcHandle'
errors = []
# Serde support
serde1 = ["serde", "zerogc-derive/__serde-internal", "arrayvec/serde", "indexmap/serde-1", "hashbrown/serde"]
# Support the "epsilon" no-op collector
epsilon = []
# Configure the "epsilon" collector use arena allocation
# (on by default)
epsilon-arena-alloc = ["epsilon", "bumpalo"]
# This requires the `std` feature to be enabled.
sync = []
# Use nightly features
nightly = ["zerogc-derive/nightly"]
# Use the nightly `Allocator` api
nightly-allocator = ["allocator-api2/nightly"]
38 changes: 0 additions & 38 deletions libs/context/Cargo.toml

This file was deleted.

Loading