Skip to content

Questions Related to Preserving Data Segments in BinaryenSetMemory C API #6314

@mobsceneZ

Description

@mobsceneZ

In Wasm Specification, data segments and memory are seperated. However, in Binaryen's current C API, they are deeply coupled.

This leads to some awkward use case, suppose there is a wasm module containing only data segments, and I want to add memory into it, I have to manually copy all existing data segments and pass them into BinaryenSetMemory, which is unnecessary if we can preserve original data segments.

Therefore, I wonder if we could add an additional argument to BinaryenSetMemory that indicates whether we should preserve the data segments or not. If that's reasonable, I already created a pull request #6313 and maybe you can check that out ;).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions