WebAssembly / WebAssembly/binaryen

Missing C API for inspecting Memory?

Open
#1,603 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement help wanted
Dominant language
WebAssembly
Stars
8.6k
Forks
885
Avg merge
1d 19h
Merged PRs (30d)
69

Description

Currently, there is BinaryenSetMemory in C API, but we don't have something like BinaryenGetMemory which ideally would allow us to inspect the data segments of a module, given a deserialized BinaryenModuleRef.

Having such an interface allows a wasm-targeting compiler based on binaryen to perform a simple sanity check: deserialize the generated module, and check if the deserialized data segments match the ones we feed to binaryen but represented in another language.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the existing BinaryenSetMemory C API and the BinaryenModuleRef deserialization path. Define an inspection interface that exposes a module's data segments, then verify that deserialized segments can be compared with the input segments used by the wasm-targeting compiler.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, wasm
Domain
api, compilers
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.