Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

switch ArrayBuffer constructor #96

Closed
wants to merge 1 commit into from

Conversation

kmatzen
Copy link

@kmatzen kmatzen commented Sep 19, 2024

I'd like to be able to incorporate emnapi as an emscripten-based backend for JsRuntimeHost, but it has a limitation in that it can't properly expose the backing memory of an allocated ArrayBuffer as writable without an extra memory synchronization call after it has been constructed [issue]. This doesn't seem to be an issue if the memory given to the ArrayBuffer constructor is fully initialized. Would you mind if this were switched to pass the initialized memory as input rather than attempt to modify the backing buffer after construction? Existing tests pass and BabylonNative on emscripten runs correctly.

Copy link
Contributor

@bghgary bghgary left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be okay, but this it not the only place we do this kind of array buffer management.

@kmatzen
Copy link
Author

kmatzen commented Sep 21, 2024

No longer needed as it makes more sense to keep babylon in the js layer and wrap it with emscripten rather than to compile babylonnative down to wasm.

@kmatzen kmatzen closed this Sep 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants