Skip to content

Memory object  #9

Closed
Closed
@Faliszek

Description

@Faliszek

First of all - thank you so much for your work on this, amazing job!

I try to use it in order to load some wasm file generated from this repo: https://github.com/matrix-org/matrix-rust-sdk/tree/main/bindings/matrix-sdk-crypto-js

It loads perfectly fine, but later this library uses memory object which from what I read, in browser returns from instatiate function (I think)

When I compile their wasm file to wat there is a code that looks like this

(memory $memory (export "memory") 20)

which according to chatgpt should be accesible on js side like this

//loading binary
const result = await WebAssembly.instatiate(binary);
//getting memory.buffer
result.exports.memory.buffer

Is there a plan for support this behaviour? Or do you have any guidance how can I add it? Thanks in advance :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions