emscripten-core / emscripten-core/emscripten

Missing methods on INCOMING_MODULE_JS_API, like `onMalloc`

Open
#21,410 7 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
27.6k
Forks
3.6k
Avg merge
1d 1h
Merged PRs (30d)
105

Description

Please include the following in your bug report:

**Version of emscripten/emsdk:**
3.1.32

CMAKE link options:
```cmake
"SHELL:-s MODULARIZE=1"
"SHELL:-s EXPORT_NAME=${MODULE_NAME}"
"SHELL:-s ENVIRONMENT=web,worker"
"SHELL:-s FETCH=1"
"SHELL:-s DYNAMIC_EXECUTION=0"
"SHELL:-s STRICT=0"
"SHELL:-s IMPORTED_MEMORY=1"
"SHELL:-s --minify 0"
"SHELL:-s --closure 0"
"SHELL:-s INCOMING_MODULE_JS_API=onMalloc" # same with or without
```

Looking at the output .js files, or logging the `Module` object, there are tons of things missing from https://github.com/emscripten-core/emscripten/blob/main/src/settings.js#L951C5-L965.

I'd especially need methods that are related to memory management. Is there any reason why they aren't included?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.