Skip to content

Global Functions and WebIDL binding #8390

@prestomation

Description

@prestomation

I'm trying to build a JS->C++ bridge for a large, existing C++ code base.
The code base already builds with emscripten and is already used by others in WASM. What I am doing that is new is exposing the library to javascript(the others use it from C++ that is also compiled to WASM).

This library uses C++ classes and a large set of global functions.

It seems I cannot model the global functions using the webidl-binder. Is it possible to model global functions using webidl-binder and I've just missed it?

That aside, I've modeled some of the classes using Webidl-binding and modeled the global functions using embind. But when I call a global function(modeled using embind) that uses a class instance(modeled by webidl) I get an UnboundTypeError.

Should I expect mixing webidl and embind to work?

Thanks!

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