Skip to content

Conversation

@juj
Copy link
Collaborator

@juj juj commented Dec 16, 2019

This makes a first step towards getting MINIMAL_RUNTIME working with wasm backend.

Copy link
Member

@kripken kripken left a comment

Choose a reason for hiding this comment

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

Good to see this!

for e in exports:
receiving.append('var %(mangled)s = Module["%(mangled)s"] = asm["%(e)s"];' % {'mangled': asmjs_mangle(e), 'e': e})
if shared.Settings.DECLARE_ASM_MODULE_EXPORTS:
if shared.Settings.WASM and shared.Settings.MINIMAL_RUNTIME:
Copy link
Member

Choose a reason for hiding this comment

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

why does wasm2js output differ from wasm output here? in general in the wasm backend the js/wasm paths are much more similar than in fastcomp (wasm2js literally polyfills the WebAssembly APIs, and everything should be identical except for that), so I was hoping we would not have differences here.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I don't know yet. I have not yet tried against wasm2js. I just put this like this to follow the fastcomp route, and did not go too far making modifications to keep the amount to review small for each PR.

@juj juj force-pushed the wasm_backend_minimal_runtime_hello_world branch from 2886b50 to 5f6e9c2 Compare December 17, 2019 19:49
Copy link
Member

@kripken kripken left a comment

Choose a reason for hiding this comment

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

Fair enough, lgtm with that settings_internal.js comment addressed.

@juj
Copy link
Collaborator Author

juj commented Dec 18, 2019

Check - updated to address review and pass tests, I'll land this once tests come through, and proceed to next set of features.

@juj juj force-pushed the wasm_backend_minimal_runtime_hello_world branch from f42831e to 0d5720b Compare December 19, 2019 07:39
@juj juj merged commit 5dba39c into emscripten-core:incoming Dec 19, 2019
if (array.length > 0) {
return "['" + array.join("','") + "']";
} else {
return [];
Copy link
Member

Choose a reason for hiding this comment

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

shouldn't this be a string too?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

That would certainly help the code to work..

petersalomonsen pushed a commit to petersalomonsen/emscripten that referenced this pull request Dec 22, 2019
* -O0 Hello world working with MINIMAL_RUNTIME.
belraquib pushed a commit to belraquib/emscripten that referenced this pull request Dec 23, 2020
* -O0 Hello world working with MINIMAL_RUNTIME.
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