Skip to content

GuestHeap: SharedMemory accessor + napi bump + Cargo.lock (ECO-416) - #6822

Open
Arshia001 wants to merge 2 commits into
wasmer-v8-imports-bridge-fixesfrom
napi-value-scope-rework
Open

GuestHeap: SharedMemory accessor + napi bump + Cargo.lock (ECO-416)#6822
Arshia001 wants to merge 2 commits into
wasmer-v8-imports-bridge-fixesfrom
napi-value-scope-rework

Conversation

@Arshia001

Copy link
Copy Markdown
Member

Stack 4/4 (wasmer) — final; matches local state. Base: wasmer-v8-imports-bridge-fixes.

Wasmer-side of the GuestHeap work:

  • lib/api: expose the backing VMSharedMemory on SharedMemory so an embedder can grow a shared memory store-free from any thread
  • napi submodule bumps: GuestHeap + copy-layer removal + >2 GiB external-pointer fix, and the shared-heap-per-memory fix (WASIX-threads host-corruption)
  • Cargo.lock update for the offset-allocator dependency

See wasmerio/napi#43. ⚠️ Final PR of the stack; not yet mergeable. Relates to ECO-416.

@Arshia001
Arshia001 requested a review from syrusakbary as a code owner July 24, 2026 14:23
@Arshia001
Arshia001 force-pushed the napi-value-scope-rework branch from 45ddbed to efb5e20 Compare July 28, 2026 14:31
Copilot AI review requested due to automatic review settings July 28, 2026 14:31

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a public accessor on SharedMemory to expose its backing VMSharedMemory handle, enabling embedders to access the underlying shared-memory representation directly (e.g., for store-independent workflows).

Changes:

  • Expose SharedMemory::vm_shared_memory() returning a reference to the backing VMSharedMemory.
  • Document intended cross-thread/store-free usage patterns for the returned handle.

Comment on lines +78 to +84
/// The backing VM shared-memory handle.
///
/// Clones of the handle share the same underlying allocation, so an
/// embedder can keep a clone and operate on the memory (e.g. grow it via
/// [`LinearMemory::grow`]) from any thread without holding a store.
///
/// [`LinearMemory::grow`]: wasmer_vm::LinearMemory::grow
@Arshia001
Arshia001 force-pushed the napi-value-scope-rework branch from efb5e20 to b2b5a4e Compare July 28, 2026 14:54
@Arshia001
Arshia001 force-pushed the napi-value-scope-rework branch from b2b5a4e to 3ee4915 Compare July 28, 2026 16:10
Arshia001 and others added 2 commits August 4, 2026 13:54
Lets embedders keep a clonable, store-free handle to a shared linear
memory so they can operate on it (e.g. grow) from any thread. Needed by
wasmer-napi to claim guest-memory pages from host-side code that runs on
V8 GC threads without Store access.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@Arshia001
Arshia001 force-pushed the napi-value-scope-rework branch from 3ee4915 to f35909d Compare August 4, 2026 13:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants