Skip to content

Conversation

hhugo
Copy link
Member

@hhugo hhugo commented Jul 28, 2025

The goal is to address LexiFi/gen_js_api#177
cc mlasson

@vouillon, can this work with wasmoo ?

@smorimoto
Copy link
Member

@hhugo Ping

@hhugo
Copy link
Member Author

hhugo commented Oct 21, 2025

@vouillon, how do you want to implement such feature ?

@hhugo hhugo requested a review from vouillon October 21, 2025 17:31
@vouillon
Copy link
Member

I have pushed something. It only works with whole-program compilation, though. With separate compilation, only the JavaScript primitives used in the Wasm runtime are linked-in. I'm not sure what to do about that.

@hhugo
Copy link
Member Author

hhugo commented Oct 22, 2025

I have pushed something. It only works with whole-program compilation, though. With separate compilation, only the JavaScript primitives used in the Wasm runtime are linked-in. I'm not sure what to do about that.

Could we add a syntax to re-export js value to the wasm runtime ?

@hhugo
Copy link
Member Author

hhugo commented Oct 23, 2025

I have pushed something. It only works with whole-program compilation, though. With separate compilation, only the JavaScript primitives used in the Wasm runtime are linked-in. I'm not sure what to do about that.

Could we add a syntax to re-export js value to the wasm runtime ?

IIUC, we just need a way to tell the wasmoo compiler that additional js value must be included when building the js runtime.
The current mechanism checks the wasm code for import of the "js" namespace. We could either trick the system with "fake" import of additional js value or have a separate mechanism such as an annotation in the js runtime files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants