add gc support to Rust owned objects
This PR adds garbage collection support to Rust-owned JSG resources, enabling proper cleanup when V8 collects JavaScript wrapper objects.
Implements Oilpan integration to our Rust/JSG integration. Compared to C++ GC implementation, Rust use cppgc heap for allocation of resources rather than kj::heap. We eventually need to do the same thing in our C++ implementation as well.
Used AI to help me write comments.
CodSpeed Performance Report
Merging this PR will not alter performance
Comparing yagiz/rust-gc (cc5611d) with main (dbe7e6f)
Summary
✅ 129 untouched benchmarks
⏩ 49 skipped benchmarks[^skipped]
[^skipped]: 49 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.
The generated output of @cloudflare/workers-types matches the snapshot in types/generated-snapshot :tada:
I'm taking one step back and prepare an internal document to make the best decision.