Releases: DuckLogic/zerogc
Update to nightly 2022-02-08
Fixes
- Support nightly version 2022-02-08
- Requires specifying some more explicit types to assist GAT inference.
Some API improvements (still needs redesign)
Significant API changes, but the API still needs a redesign to fix soundness issues.
To be clear, this does not fix the outstanding soundness issues.
See commit notes for full list of changes.
Major Features
- Add
GcErrorwrapper - Add
GcStringas garbage collected string - Add an "epsilon" collector that never collects memory
- Implement
GcDeserializeusing serde - Optionally emulate
core::allocAPI - Add
GcIndexMapcollection
Public API Changes
- Parameterize
GcSafeby'gclifetime andCollectorId - Make
GcErasetrait an aliasGcRebrand
Internal Improvements & Fixes
- Use const generics for arrays
- Fix
trait_object_trace!macro - Make
GcHandleuse generic associated types - Handle cycles in
Trace::NEEDS_TRACE - Remove
#[feature(...)]s that have been stabilized
Add GcSimpleAlloc::alloc_uninit method
Features
- Add
GcSimpleAlloc::alloc_uninitmethod - Support tracing
parking_lot::{Mutex, RwLock} - Use thin pointers
Internal Changes
- Simplify
unsafe_gc_impl!using proc-macro-kwargs - [simple] Expose a method to get a GcType
Add support for arrays, vectors, and trait objects
Major Changes
- Add support for garbage collected arrays/vectors (#16)
- Implement support for tracing trait objects (#15)
- Revert "Make GcRef a trait once again"
- Move
NEEDS_DROPtoTracetrait
Minor Fixes
- Fix duplicate 'Id' generics with
#[zerogc(mutable)] - Implement Trace for RefCell/Cell iff T: NullTrace
- Implement GcSimpleAlloc for DummyContext
Make GcRef a trait once again
- [simple] Move collector ids in the object header
- When using multiple collectors, this reduces the pointer size from 128 -> 64 bits\
- Use compare_exchange instead of CAS for global collector
There are some serious API changes that will be coming up soon here.
Significantly cleanup zerogc_derive
- e225f32: Mark
binary_trees_parallel::Treewith collector_id(SimpleCollectorId) - b337b2f: Add procedural
unsafe_gc_impl!macro for manual impls (#22)- This siginificantly simplifies the implementation for stdlib types
- Implement NullTrace for PhantomData
- 010be99: Add unsafe attribute to skip generating destructor
- aee5449: Make #[zerogc(nop_trace) implicitly skip the Drop impl
- bbb8d0b: Add #[derive(NullTrace)] as sugar for #[zerogc(nop_trace)]
- ab5fcbb: Drop parking_lot's usage of 'nightly' feature
- NOTE: The simple collector still depends on other nightly features..
Support derive for enums and types with a single non-gc lifetime
- [BREAKING] Split GcBrand up into GcErase + GcRebrand
- [derive] Implement safety checks for GcErase + GCRebrand
- [derive] Fix parse errors in procedural derive for enums
- Implement Trace for bool and char
- Implement Trace for
&'static str - Support deriving erase/rebrand for non-gc lifetimes
where Self: NullTrace- There can be one and only one lifetime, and it can't be
'gc
- There can be one and only one lifetime, and it can't be
The API should be (starting to) settle down towards the v0.2.0 release. The v0.2.0 release will include a Generational GC, support for non-sized types, and builtin supports for arrays. It will be the first release that is not marked as a "pre-release",
[derive] Support ignoring lifetimes on Trace
We only bumped the version on zerogc-derive
Use traits to control if collectors are singletons or thread safe
Now the zerogc-context crate can support singleton and multi-instance collectors in the same compilation. Likewise, it can also support thread-safe and thread-unsafe collectors in the same compilation. The simple implementation is still controlled by cfg-features but this is a step in the right direction.
- Implement Trace and GcSafe for String
- I cant believe I missed this -_-
- [derive] Support ignoring parameters for #[derive(Trace)]
- [derive] Support deriving NullTrace via #[zerogc(nop_trace)] attribute
Separate 'context' crate from 'simple' implementation
This will allow multiple collector implementations to share code around the context management and maintaining shadow stacks.