Developer
Yagiz Nizipli
yagiz@nizipli.com
Performance
YoY:+1111%Key patterns and highlights from this developer's activity.
Breakdown of growth, maintenance, and fixes effort over time.
Bugs introduced vs. fixed over time.
Reclassifies engineering effort based on bug attribution. Commits that introduced bugs are retrospectively counted as poor investments.
Investment Quality reclassifies engineering effort based on bug attribution data. Commits identified as buggy origins (those that introduced bugs later fixed by someone) have their grow and maintenance time moved into the Wasted Time category. Their waste (fix commits) remains counted as productive. All other commits retain their standard classification: grow is productive, maintenance is maintenance, and waste (fixes) is productive.
The standard model classifies commits as Growth, Maintenance, or Fixes. Investment Quality adds a quality lens: a commit that introduced a bug is retrospectively counted as a poor investment — the engineering time spent on it was wasted because it ultimately required additional fix work. Fix commits (Fixes in the standard model) are reframed as productive, because fixing bugs is valuable work.
Currently computed client-side from commit and bug attribution data. Ideal server-side endpoint:
POST /v1/organizations/{orgId}/investment-quality
Content-Type: application/json
Request:
{
"startTime": "2025-01-01T00:00:00Z",
"endTime": "2025-12-31T23:59:59Z",
"bucketSize": "BUCKET_SIZE_MONTH",
"groupBy": ["repository_id" | "deliverer_email"]
}
Response:
{
"productivePct": 74,
"maintenancePct": 18,
"wastedPct": 8,
"buckets": [
{
"bucketStart": "2025-01-01T00:00:00Z",
"productive": 4.2,
"maintenance": 1.8,
"wasted": 0.6
}
]
}Latest analyzed commits from this developer.
| Hash | Message | Date | Files |
|---|
Commit activity distribution by hour and day of week. Shows when this developer is most active.
Developers who frequently work on the same files and symbols. Higher score means stronger code collaboration.
| Effort |
|---|
| 58ad97fc | This commit introduces **new capabilities** to the **Rust JSG layer** by adding comprehensive support for V8's JavaScript buffer types: `ArrayBuffer`, `ArrayBufferView`, `SharedArrayBuffer`, and `BackingStore`. It implements **new C++ FFI functions** in `src/rust/jsg/ffi.c++` and `src/rust/jsg/ffi.h`, along with their corresponding **Rust bindings** in `src/rust/jsg/v8.rs` and public exports in `src/rust/jsg/lib.rs`. This enables Rust code to directly create, manipulate, and inspect these fundamental JavaScript data structures, significantly enhancing **interoperability** for high-performance data handling. The `jsg-test` suite gains new tests in `src/rust/jsg-test/tests/buffer_types.rs` to validate this functionality, while minor **refactoring** in `src/rust/jsg/wrappable.rs` and `src/rust/jsg-test/tests/arrays.rs` accommodates the new `jsg::Lock` parameter. | Mar 31 | 9 | grow |
| a6d5b684 | This commit introduces **new capabilities** to the **Rust JavaScript Gateway (JSG) macro system**, enabling developers to define and register instance and prototype properties for JSG resources. It implements the `#[jsg_property]` and `#[jsg_inspect_property]` procedural macros within `src/rust/jsg-macros/lib.rs`, which automate the registration of these properties for seamless JavaScript interoperability. This **new feature** significantly enhances how Rust types can expose their internal state to JavaScript, providing a declarative and efficient mechanism. Comprehensive documentation, including usage examples for the new attributes, has also been added to `src/rust/jsg-macros/README.md`. | Mar 30 | 3 | grow |
| ac4bdf90 | This commit introduces **new capabilities** to the **Rust JSG library** by adding comprehensive support for several `TypedArray` methods. It specifically enables interaction with `Float16Array` and `Uint8ClampedArray` types, alongside generic `TypedArray` properties such as `byte_offset`, `data`, `element_size`, `is_integer_type`, and methods like `as_slice` and `as_mut_slice`. This was achieved by implementing new C++ FFI functions in `ffi.c++` and `ffi.h`, and then creating corresponding Rust bindings and implementations in `v8.rs`. The addition of these methods significantly improves the **Rust-JavaScript interoperability** for `TypedArray` objects, allowing Rust code to more effectively read and manipulate these JavaScript data structures. New test cases in `arrays.rs` validate this expanded functionality. | Mar 26 | 4 | grow |
| 5e2a624c | This commit performs a significant **dependency upgrade**, primarily updating **TypeScript** and numerous other npm packages across various `package.json` files. It updates core development dependencies like `@eslint/js`, `eslint`, `esbuild`, and `pnpm`, alongside specific runtime dependencies. To accommodate these updates and enhance type safety, several **internal modules** (`crypto_random`, `internal_net`, `internal_timers_promises`, `pyodide/internal/topLevelEntropy`) received **minor type assertion and declaration adjustments**. Additionally, the **TypeScript configuration** was updated to ignore specific deprecations, and the `_Location` class in the **WPT harness** gained a `Symbol.iterator` for `searchParams`. This **maintenance** effort ensures the project leverages the latest library features and bug fixes, while improving overall type correctness and compatibility. | Mar 25 | 10 | maint |
| bcc7a5d7 | Merge pull request #6271 from cloudflare/yagiz/enable-eslint-wd-test | Mar 25 | 0 | – |
| 5d002a6f | This commit provides a **bug fix** addressing **Windows build errors** caused by clang/clang-cl compiler crashes. It resolves these issues in two main areas: the **container client** and the **server** module. For the container client, it hides `EgressMapping` and `EgressState` definitions from `container-client.h` by moving them to `container-client.c++`, reducing header dependencies and using an opaque pointer. Concurrently, in the server module, a problematic `goto` statement was removed from the `listenOnSockets` coroutine in `server.c++`, and socket type parsing was refactored into a new function `parseSocketType`. This ensures the project can now be successfully built on Windows using clang-based compilers. | Mar 25 | 4 | waste |
| bdda01dd | This commit performs **maintenance** on the **Web Platform Tests (WPT)** integration, primarily updating test configurations and environment setup. It introduces a patch to disable `virtualenv` for the WPT `serve` command, simplifying the test execution environment. Additionally, it updates test configurations for `WebCryptoAPI`, `encoding`, and `URLPattern` tests within `src/wpt/`. These updates involve **disabling specific tests**, **removing omitted tests**, and **adding new expected failures** to account for cross-platform behavior differences and platform-specific regex interpretations, ensuring more accurate and relevant test results. | Mar 25 | 8 | maint |
| 1bddada2 | This commit **introduces full support for `v8::Name` and `v8::Symbol` types** within the **Rust JSG (JavaScript Glue) bindings**. It establishes the necessary **FFI (Foreign Function Interface) definitions** in `src/rust/jsg/ffi.c++` and `src/rust/jsg/ffi.h` to expose V8's native operations for these types, such as identity hashing for `v8::Name` and creation/description for `v8::Symbol`. The corresponding **Rust-side implementations** in `src/rust/jsg/v8.rs` provide safe and idiomatic wrappers for these new capabilities. This **new capability** significantly enhances the Rust JSG's ability to interact with fundamental JavaScript primitive types, enabling more robust and complete interoperability. Comprehensive **unit tests** have been added in `src/rust/jsg-test` to validate the correct behavior of `v8::Name` and `v8::Symbol` bindings. | Mar 24 | 7 | grow |
| 390cf7d1 | This commit **enables** the `fn_params_excessive_bools` Clippy rule in the project's configuration, a **maintenance** task aimed at improving code quality by flagging functions with excessive boolean parameters. As part of this change, specific instances within the **JavaScript Glue (JSG) V8 integration** (`src/rust/jsg/v8.rs`) are explicitly exempted. `#[expect]` attributes are added to the `ffi` module and `remove_strong_ref` function to justify their existing boolean parameters, which are necessary due to **FFI constraints**. This ensures the new lint promotes cleaner function signatures across the codebase without introducing warnings for these specific, justified cases. | Mar 24 | 3 | maint |
| 7c3f90f5 | This commit **enhances error handling** for Rust components within the `jsg` module by **configuring the Rust panic hook** to **request process termination** when a panic occurs. It introduces C++ FFI functions (`handle_rust_panic`) to facilitate this termination and integrates the panic handler with the **V8 runtime** via `setup_v8_panic_handler`. This **critical stability improvement** ensures that unrecoverable Rust errors lead to a clean process exit, preventing potential hangs or undefined behavior. A new test in `src/rust/jsg-test/tests/resource_callback.rs` verifies this termination behavior. | Mar 24 | 5 | waste |
| 1f638e07 | This commit provides a **bug fix** for a **segfault** occurring in the **`ContainerClient`** within the `workerd/server` component. It addresses an object lifetime management issue by modifying promise handling in the `start()` and `snapshotDirectory()` methods. By attaching `addRef()`, the commit ensures the `ContainerClient` object's lifetime is correctly managed, preventing crashes during container operations. This significantly improves the overall **stability** of the server's container interactions. | Mar 23 | 1 | waste |
| 304cc9b4 | This commit **fixes a bind failure** within the **`workerd` server's container client** by enhancing the network binding logic. Specifically, the `startEgressListener` function now includes a **fallback mechanism** to bind to the loopback address (127.0.0.1) if the initial attempt to bind to the gateway address fails. This **bug fix** directly addresses and resolves connectivity issues experienced on **WSL with Docker Desktop**, improving the reliability of the egress listener startup in these specific environments. | Mar 23 | 1 | waste |
| d62d62aa | This commit **implements comprehensive Rust bindings for V8 string types**, specifically `v8::String` and `v8::String::Utf8Value`, within the **`src/rust/jsg` module**. This **new capability** extends the Foreign Function Interface (FFI) layer, providing Rust with direct access to V8 string creation, manipulation, and conversion functions. The changes include new FFI declarations and implementations in C++ (`ffi.h`, `ffi.c++`), along with corresponding Rust types and methods in `v8.rs`, ensuring robust string handling between Rust and the V8 engine. Extensive tests have been added in `jsg-test/tests/string.rs` to validate the new bindings. This work significantly enhances the project's ability to interact with JavaScript string data from Rust, laying a foundation for more complex V8 integrations. | Mar 23 | 7 | grow |
| cea70af8 | This commit introduces a **new capability** to configure **V8's abort-on-uncaught-exception behavior** within the `jsg` ecosystem. It adds a new FFI function, `jsg_v8_set_abort_on_uncaught_exception_callback`, to the **`jsg` crate** for setting a V8 callback that triggers an abort on uncaught exceptions. To simplify its usage, a new procedural macro, `#[jsg::abort_handler]`, is provided in the **`jsg-macros` crate**, allowing developers to easily apply this configuration. This enhancement ensures more robust error handling and process control when integrating with the V8 runtime, as demonstrated by its application in `jsg-test`. | Mar 20 | 6 | waste |
| e8382888 | This commit introduces **comprehensive support for tracing `v8::Global<v8::Value>` and `v8::TracedReference`** within the garbage collection system, a **new capability** that significantly enhances memory management. It updates the **`jsg` Rust crate** to implement `Global<T>` with `TracedReference` and modifies GC visitor logic, while the **`jsg-macros` crate** gains macro support for automatic tracing code generation. The **`workerd/jsg` C++ module** now includes `GcVisitor` overloads and implementations to manage the strength of these V8 handles during garbage collection, alongside new FFI definitions in `ffi-inl.h` and `ffi.c++`. This ensures that long-lived JavaScript objects held by Rust code are correctly managed by V8's garbage collector, preventing memory leaks, and is validated by **new garbage collection tests** in `jsg-test`. | Mar 20 | 11 | grow |
| 18a37e13 | This commit introduces **enhanced garbage collection tracing** capabilities within the **`jsg_resource` macro**, specifically adding support for correctly tracing resources wrapped in `Cell<Option<T>>` and `Cell<Nullable<T>>` types. This **new capability** extends the `jsg-macros` crate by implementing new functions like `extract_cell_inner` and `generate_cell_trace_statement` to handle these `Cell` variants. The **`jsg-test`** suite has been updated with comprehensive test cases to validate the correct behavior of GC tracing for these new configurations. This ensures that optional or nullable resources managed via `Cell` are properly handled by the garbage collector, preventing memory leaks or incorrect resource management. | Mar 20 | 2 | grow |
| 7acd963f | This commit performs a significant **refactoring** across the **`jsg`** and **`jsg-macros`** crates to enhance safety, improve FFI interactions, and address review feedback. The `jsg_method` and `jsg_resource` macros were overhauled to integrate robust panic handling and validate constructor definitions, ensuring safer Rust-to-JavaScript bindings. The **FFI boundary** was strengthened by introducing `abort_on_panic` for controlled panic propagation and optimizing `memory_name` retrieval by directly using Rust's static C strings, eliminating C++ caching. These changes, validated by new tests in **`jsg-test`**, contribute to a more stable and predictable JavaScript-Rust interface by improving panic safety and correctness. | Mar 19 | 8 | maint |
| 742b4569 | This commit introduces a **new capability** by adding the `#[jsg_constructor]` procedural macro to the **`jsg-macros`** crate, enabling Rust types to define constructors directly callable from JavaScript. It involves implementing the macro's logic, adding C++ FFI functions like `wrappable_attach_wrapper` in **`jsg`** to correctly attach Rust `Wrappable` instances to V8 `this` objects, and updating relevant documentation. This significantly enhances the **Rust-V8 FFI**, allowing for more seamless instantiation and management of Rust-backed objects within JavaScript environments, as validated by new test cases in `jsg-test`. | Mar 18 | 8 | grow |
| b80aa574 | This commit introduces **performance optimizations** for the **TextDecoder** when handling **legacy encodings**, particularly UTF-16. It **refactors** the **Rust encoding library** (`src/rust/encoding/lib.rs`) to reuse an internal buffer for UTF-16 output and implement lazy resetting of the decoder state, significantly reducing allocations. The `LegacyDecoder::decode` method in **Workerd's API** (`src/workerd/api/encoding-legacy.c++`) is updated to leverage these Rust-side improvements, enabling a zero-copy view of the UTF-16 output. This work enhances the efficiency and speed of decoding operations for various legacy character sets by minimizing memory reallocations and data copying. | Mar 18 | 2 | maint |
| 75b49f9e | This commit introduces comprehensive **garbage collection (GC) support for Rust-owned objects** exposed to JavaScript, fundamentally changing how these resources are managed. It refactors the core **`jsg` library** to provide `jsg::Rc` and `Weak` types for GC-aware reference counting, while the **`jsg-macros`** are updated to automatically generate `GarbageCollected` implementations and tracing logic for `Rc<T>`, `Weak<T>`, `Option<Rc<T>>`, and `Nullable<Rc<T>>` fields. The **FFI layer** is heavily modified to integrate with C++ `Wrappable` and V8's GC, ensuring proper tracing and lifecycle management. This major **feature addition and refactoring** simplifies resource management for Rust developers, improves memory safety, and is validated by extensive new **`jsg-test`** cases and updated documentation across the project. | Mar 18 | 33 | grow |
This commit introduces **new capabilities** to the **Rust JSG layer** by adding comprehensive support for V8's JavaScript buffer types: `ArrayBuffer`, `ArrayBufferView`, `SharedArrayBuffer`, and `BackingStore`. It implements **new C++ FFI functions** in `src/rust/jsg/ffi.c++` and `src/rust/jsg/ffi.h`, along with their corresponding **Rust bindings** in `src/rust/jsg/v8.rs` and public exports in `src/rust/jsg/lib.rs`. This enables Rust code to directly create, manipulate, and inspect these fundamental JavaScript data structures, significantly enhancing **interoperability** for high-performance data handling. The `jsg-test` suite gains new tests in `src/rust/jsg-test/tests/buffer_types.rs` to validate this functionality, while minor **refactoring** in `src/rust/jsg/wrappable.rs` and `src/rust/jsg-test/tests/arrays.rs` accommodates the new `jsg::Lock` parameter.
This commit introduces **new capabilities** to the **Rust JavaScript Gateway (JSG) macro system**, enabling developers to define and register instance and prototype properties for JSG resources. It implements the `#[jsg_property]` and `#[jsg_inspect_property]` procedural macros within `src/rust/jsg-macros/lib.rs`, which automate the registration of these properties for seamless JavaScript interoperability. This **new feature** significantly enhances how Rust types can expose their internal state to JavaScript, providing a declarative and efficient mechanism. Comprehensive documentation, including usage examples for the new attributes, has also been added to `src/rust/jsg-macros/README.md`.
This commit introduces **new capabilities** to the **Rust JSG library** by adding comprehensive support for several `TypedArray` methods. It specifically enables interaction with `Float16Array` and `Uint8ClampedArray` types, alongside generic `TypedArray` properties such as `byte_offset`, `data`, `element_size`, `is_integer_type`, and methods like `as_slice` and `as_mut_slice`. This was achieved by implementing new C++ FFI functions in `ffi.c++` and `ffi.h`, and then creating corresponding Rust bindings and implementations in `v8.rs`. The addition of these methods significantly improves the **Rust-JavaScript interoperability** for `TypedArray` objects, allowing Rust code to more effectively read and manipulate these JavaScript data structures. New test cases in `arrays.rs` validate this expanded functionality.
This commit performs a significant **dependency upgrade**, primarily updating **TypeScript** and numerous other npm packages across various `package.json` files. It updates core development dependencies like `@eslint/js`, `eslint`, `esbuild`, and `pnpm`, alongside specific runtime dependencies. To accommodate these updates and enhance type safety, several **internal modules** (`crypto_random`, `internal_net`, `internal_timers_promises`, `pyodide/internal/topLevelEntropy`) received **minor type assertion and declaration adjustments**. Additionally, the **TypeScript configuration** was updated to ignore specific deprecations, and the `_Location` class in the **WPT harness** gained a `Symbol.iterator` for `searchParams`. This **maintenance** effort ensures the project leverages the latest library features and bug fixes, while improving overall type correctness and compatibility.
Merge pull request #6271 from cloudflare/yagiz/enable-eslint-wd-test
This commit provides a **bug fix** addressing **Windows build errors** caused by clang/clang-cl compiler crashes. It resolves these issues in two main areas: the **container client** and the **server** module. For the container client, it hides `EgressMapping` and `EgressState` definitions from `container-client.h` by moving them to `container-client.c++`, reducing header dependencies and using an opaque pointer. Concurrently, in the server module, a problematic `goto` statement was removed from the `listenOnSockets` coroutine in `server.c++`, and socket type parsing was refactored into a new function `parseSocketType`. This ensures the project can now be successfully built on Windows using clang-based compilers.
This commit performs **maintenance** on the **Web Platform Tests (WPT)** integration, primarily updating test configurations and environment setup. It introduces a patch to disable `virtualenv` for the WPT `serve` command, simplifying the test execution environment. Additionally, it updates test configurations for `WebCryptoAPI`, `encoding`, and `URLPattern` tests within `src/wpt/`. These updates involve **disabling specific tests**, **removing omitted tests**, and **adding new expected failures** to account for cross-platform behavior differences and platform-specific regex interpretations, ensuring more accurate and relevant test results.
This commit **introduces full support for `v8::Name` and `v8::Symbol` types** within the **Rust JSG (JavaScript Glue) bindings**. It establishes the necessary **FFI (Foreign Function Interface) definitions** in `src/rust/jsg/ffi.c++` and `src/rust/jsg/ffi.h` to expose V8's native operations for these types, such as identity hashing for `v8::Name` and creation/description for `v8::Symbol`. The corresponding **Rust-side implementations** in `src/rust/jsg/v8.rs` provide safe and idiomatic wrappers for these new capabilities. This **new capability** significantly enhances the Rust JSG's ability to interact with fundamental JavaScript primitive types, enabling more robust and complete interoperability. Comprehensive **unit tests** have been added in `src/rust/jsg-test` to validate the correct behavior of `v8::Name` and `v8::Symbol` bindings.
This commit **enables** the `fn_params_excessive_bools` Clippy rule in the project's configuration, a **maintenance** task aimed at improving code quality by flagging functions with excessive boolean parameters. As part of this change, specific instances within the **JavaScript Glue (JSG) V8 integration** (`src/rust/jsg/v8.rs`) are explicitly exempted. `#[expect]` attributes are added to the `ffi` module and `remove_strong_ref` function to justify their existing boolean parameters, which are necessary due to **FFI constraints**. This ensures the new lint promotes cleaner function signatures across the codebase without introducing warnings for these specific, justified cases.
This commit **enhances error handling** for Rust components within the `jsg` module by **configuring the Rust panic hook** to **request process termination** when a panic occurs. It introduces C++ FFI functions (`handle_rust_panic`) to facilitate this termination and integrates the panic handler with the **V8 runtime** via `setup_v8_panic_handler`. This **critical stability improvement** ensures that unrecoverable Rust errors lead to a clean process exit, preventing potential hangs or undefined behavior. A new test in `src/rust/jsg-test/tests/resource_callback.rs` verifies this termination behavior.
This commit provides a **bug fix** for a **segfault** occurring in the **`ContainerClient`** within the `workerd/server` component. It addresses an object lifetime management issue by modifying promise handling in the `start()` and `snapshotDirectory()` methods. By attaching `addRef()`, the commit ensures the `ContainerClient` object's lifetime is correctly managed, preventing crashes during container operations. This significantly improves the overall **stability** of the server's container interactions.
This commit **fixes a bind failure** within the **`workerd` server's container client** by enhancing the network binding logic. Specifically, the `startEgressListener` function now includes a **fallback mechanism** to bind to the loopback address (127.0.0.1) if the initial attempt to bind to the gateway address fails. This **bug fix** directly addresses and resolves connectivity issues experienced on **WSL with Docker Desktop**, improving the reliability of the egress listener startup in these specific environments.
This commit **implements comprehensive Rust bindings for V8 string types**, specifically `v8::String` and `v8::String::Utf8Value`, within the **`src/rust/jsg` module**. This **new capability** extends the Foreign Function Interface (FFI) layer, providing Rust with direct access to V8 string creation, manipulation, and conversion functions. The changes include new FFI declarations and implementations in C++ (`ffi.h`, `ffi.c++`), along with corresponding Rust types and methods in `v8.rs`, ensuring robust string handling between Rust and the V8 engine. Extensive tests have been added in `jsg-test/tests/string.rs` to validate the new bindings. This work significantly enhances the project's ability to interact with JavaScript string data from Rust, laying a foundation for more complex V8 integrations.
This commit introduces a **new capability** to configure **V8's abort-on-uncaught-exception behavior** within the `jsg` ecosystem. It adds a new FFI function, `jsg_v8_set_abort_on_uncaught_exception_callback`, to the **`jsg` crate** for setting a V8 callback that triggers an abort on uncaught exceptions. To simplify its usage, a new procedural macro, `#[jsg::abort_handler]`, is provided in the **`jsg-macros` crate**, allowing developers to easily apply this configuration. This enhancement ensures more robust error handling and process control when integrating with the V8 runtime, as demonstrated by its application in `jsg-test`.
This commit introduces **comprehensive support for tracing `v8::Global<v8::Value>` and `v8::TracedReference`** within the garbage collection system, a **new capability** that significantly enhances memory management. It updates the **`jsg` Rust crate** to implement `Global<T>` with `TracedReference` and modifies GC visitor logic, while the **`jsg-macros` crate** gains macro support for automatic tracing code generation. The **`workerd/jsg` C++ module** now includes `GcVisitor` overloads and implementations to manage the strength of these V8 handles during garbage collection, alongside new FFI definitions in `ffi-inl.h` and `ffi.c++`. This ensures that long-lived JavaScript objects held by Rust code are correctly managed by V8's garbage collector, preventing memory leaks, and is validated by **new garbage collection tests** in `jsg-test`.
This commit introduces **enhanced garbage collection tracing** capabilities within the **`jsg_resource` macro**, specifically adding support for correctly tracing resources wrapped in `Cell<Option<T>>` and `Cell<Nullable<T>>` types. This **new capability** extends the `jsg-macros` crate by implementing new functions like `extract_cell_inner` and `generate_cell_trace_statement` to handle these `Cell` variants. The **`jsg-test`** suite has been updated with comprehensive test cases to validate the correct behavior of GC tracing for these new configurations. This ensures that optional or nullable resources managed via `Cell` are properly handled by the garbage collector, preventing memory leaks or incorrect resource management.
This commit performs a significant **refactoring** across the **`jsg`** and **`jsg-macros`** crates to enhance safety, improve FFI interactions, and address review feedback. The `jsg_method` and `jsg_resource` macros were overhauled to integrate robust panic handling and validate constructor definitions, ensuring safer Rust-to-JavaScript bindings. The **FFI boundary** was strengthened by introducing `abort_on_panic` for controlled panic propagation and optimizing `memory_name` retrieval by directly using Rust's static C strings, eliminating C++ caching. These changes, validated by new tests in **`jsg-test`**, contribute to a more stable and predictable JavaScript-Rust interface by improving panic safety and correctness.
This commit introduces a **new capability** by adding the `#[jsg_constructor]` procedural macro to the **`jsg-macros`** crate, enabling Rust types to define constructors directly callable from JavaScript. It involves implementing the macro's logic, adding C++ FFI functions like `wrappable_attach_wrapper` in **`jsg`** to correctly attach Rust `Wrappable` instances to V8 `this` objects, and updating relevant documentation. This significantly enhances the **Rust-V8 FFI**, allowing for more seamless instantiation and management of Rust-backed objects within JavaScript environments, as validated by new test cases in `jsg-test`.
This commit introduces **performance optimizations** for the **TextDecoder** when handling **legacy encodings**, particularly UTF-16. It **refactors** the **Rust encoding library** (`src/rust/encoding/lib.rs`) to reuse an internal buffer for UTF-16 output and implement lazy resetting of the decoder state, significantly reducing allocations. The `LegacyDecoder::decode` method in **Workerd's API** (`src/workerd/api/encoding-legacy.c++`) is updated to leverage these Rust-side improvements, enabling a zero-copy view of the UTF-16 output. This work enhances the efficiency and speed of decoding operations for various legacy character sets by minimizing memory reallocations and data copying.
This commit introduces comprehensive **garbage collection (GC) support for Rust-owned objects** exposed to JavaScript, fundamentally changing how these resources are managed. It refactors the core **`jsg` library** to provide `jsg::Rc` and `Weak` types for GC-aware reference counting, while the **`jsg-macros`** are updated to automatically generate `GarbageCollected` implementations and tracing logic for `Rc<T>`, `Weak<T>`, `Option<Rc<T>>`, and `Nullable<Rc<T>>` fields. The **FFI layer** is heavily modified to integrate with C++ `Wrappable` and V8's GC, ensuring proper tracing and lifecycle management. This major **feature addition and refactoring** simplifies resource management for Rust developers, improves memory safety, and is validated by extensive new **`jsg-test`** cases and updated documentation across the project.