feat: expose inspector object wrapping - #2041
Open
satouriko wants to merge 2 commits into
Open
Conversation
V8InspectorSession can wrap embedder-provided values as Inspector remote objects, but rusty_v8 did not expose wrapObject or make its generated protocol type available to the bindings. Build plumbing: - add the generated Inspector protocol include directory to GN and bindgen - keep the generated RemoteObject type opaque in Rust bindings Rust and C++ bindings: - add wrap_object with scoped Context and Value handles - own and destroy RemoteObject instances through the existing C++ ownership pattern - serialize remote objects to CRDTP/CBOR with AppendSerialized - reuse the existing C++ byte-vector bridge for owned Rust bytes Tests: - verify wrapped object IDs interoperate with Runtime.getProperties Verification: - cargo fmt --check - clang-format-19 --verbose --Werror --dry-run src/*.cc src/*.hpp src/*.h - V8_FROM_SOURCE=1 LIBCLANG_PATH="$PWD/third_party/rust-toolchain/lib" cargo clippy --all-targets --locked -- -D clippy::all - V8_FROM_SOURCE=1 LIBCLANG_PATH="$PWD/third_party/rust-toolchain/lib" cargo nextest run --locked (289 passed)
satouriko
force-pushed
the
feat/inspector-wrap-object
branch
from
August 1, 2026 14:45
0e25a49 to
2b4d839
Compare
Actions cache fallbacks could restore Cargo artifacts produced by another build.rs. Cargo could then reuse a stale Clippy build-script fingerprint even after the exact cache key missed. Cache keys: - partition fallback caches by the build.rs content hash - keep Cargo.lock and submodule status in exact keys for selective rebuilds - apply the same policy to matrix, ASAN, and Windows ARM caches Verification: - cargo fmt --check - YAML parse and cache-key assertions (4/4) - V8_FROM_SOURCE=1 LIBCLANG_PATH=third_party/rust-toolchain/lib cargo nextest run --locked (289 passed)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #2033.
Summary
Expose V8 Inspector's
V8InspectorSession::wrapObjectAPI and the generated-header build plumbing it requires.RemoteObjectwithout leaking generated protocol classes into the public Rust APIAppendSerializedRuntime.getPropertiesThis intentionally contains only the build plumbing and
wrapObject;releaseObjectGroupis handled separately in #2040, andunwrapObjectremains follow-up work as requested in #2033.Testing
cargo fmt --checkclang-format-19 --verbose --Werror --dry-run src/*.cc src/*.hpp src/*.hV8_FROM_SOURCE=1 LIBCLANG_PATH=/usr/lib/llvm-19/lib cargo clippy --all-targets --locked -- -D clippy::allV8_FROM_SOURCE=1 LIBCLANG_PATH=/usr/lib/llvm-19/lib cargo nextest run --locked(287 passed)