Skip to content

FFI comparible for emscripten/make APIs public #20440

Description

@bram-nijenkamp

Hi All,

Version of emscripten/emsdk:
Docker emsdk:
emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 3.1.47 (431685f)

We have been using your API in a not so nice way I'll admit. But we use some internals to dynamically call JS functions. It is a cross-platform project in which on windows we use libffi and here we use this as a comparison. My problem was/is that val doesn't have it's _em_call en EM_VAL constructors public causing me to resort to these internals in the first place.

Now up until now this has worked great, however as of 3.1.47 you guys did something to val causing it to align to 8 bytes instead of pointer 4 on wasm32. As such the current way does not work. I have tried some more hacky stuff with offsets to fix it but to no affail.

As such I have come here on my knees to ask you guys to please make these APIs public or an abstraction on it to allow this dynamic calling?
Or should you have a better solution available.

Any other explanation I'll be able to provide as the snippet is off course rather small...

IntelliJ Snippet

Sincerely,
FrozenSource

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