Hi,
I have just joined the ML and I'll be probably mainly observing.
But I think that there is one major use case which is missing in the wiki page and that is the issue with bundled WASM code in Node.js. While having compiler ready is certainly precondition, I think that the bundling in Node.js should not be forgotten.
Vít
I think that the bundling in Node.js should not be forgotten.
Thanks for identifying that. To clarify do you mean Node.js needs to be able to bundle in externalized WASM so we can rebuild it, or something else?
On Tue, Jan 24, 2023 at 6:50 AM Vít Ondruch vondruch@redhat.com wrote:
Hi,
I have just joined the ML and I'll be probably mainly observing.
But I think that there is one major use case which is missing in the wiki page and that is the issue with bundled WASM code in Node.js. While having compiler ready is certainly precondition, I think that the bundling in Node.js should not be forgotten.
Vít
Wasm-sig mailing list -- wasm-sig@lists.fedoraproject.org To unsubscribe send an email to wasm-sig-leave@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/wasm-sig@lists.fedoraproject.o... Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue
Dne 24. 01. 23 v 15:26 Michael Dawson napsal(a):
I think that the bundling in Node.js should not be forgotten.
Thanks for identifying that. To clarify do you mean Node.js needs to be able to bundle in externalized WASM so we can rebuild it, or something else?
I mean that when there is some WASM file included in Node.js, we have to be able to replace this file with file compiled from plain sources. IOW, we must adhere to this guideline:
https://docs.fedoraproject.org/en-US/packaging-guidelines/what-can-be-packag...
Actually I think that the guideline should be extended to include the WASM files.
Vít
On Tue, Jan 24, 2023 at 6:50 AM Vít Ondruch vondruch@redhat.com wrote:
Hi, I have just joined the ML and I'll be probably mainly observing. But I think that there is one major use case which is missing in the wiki page and that is the issue with bundled WASM code in Node.js. While having compiler ready is certainly precondition, I think that the bundling in Node.js should not be forgotten. Vít _______________________________________________ Wasm-sig mailing list -- wasm-sig@lists.fedoraproject.org To unsubscribe send an email to wasm-sig-leave@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/wasm-sig@lists.fedoraproject.org Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue
On Tuesday, 24 January 2023 at 18:30, Vít Ondruch wrote:
Dne 24. 01. 23 v 15:26 Michael Dawson napsal(a):
I think that the bundling in Node.js should not be forgotten.
Thanks for identifying that. To clarify do you mean Node.js needs to be able to bundle in externalized WASM so we can rebuild it, or something else?
I mean that when there is some WASM file included in Node.js, we have to be able to replace this file with file compiled from plain sources. IOW, we must adhere to this guideline:
https://docs.fedoraproject.org/en-US/packaging-guidelines/what-can-be-packag...
Actually I think that the guideline should be extended to include the WASM files.
The precompiled .wasm files should be removed in %prep and recompiled with wat2wasm (from wabt package) from .wat sources. Possibly, they could be further optimized with wasm-opt (from binaryen package).
Regards, Dominik
Thanks for the clarification. I added that use case into the list here: https://fedoraproject.org/wiki/SIGs/WASM#What%27s_needed_for_use_cases_we_wa...
Feel free to edit/improve that section in the Wiki if I've not captured what you had in mind.
On Tue, Jan 24, 2023 at 3:48 PM Dominik 'Rathann' Mierzejewski < dominik@greysector.net> wrote:
On Tuesday, 24 January 2023 at 18:30, Vít Ondruch wrote:
Dne 24. 01. 23 v 15:26 Michael Dawson napsal(a):
I think that the bundling in Node.js should not be forgotten.
Thanks for identifying that. To clarify do you mean Node.js needs to be able to bundle in externalized WASM so we can rebuild it, or something else?
I mean that when there is some WASM file included in Node.js, we have to
be
able to replace this file with file compiled from plain sources. IOW, we must adhere to this guideline:
https://docs.fedoraproject.org/en-US/packaging-guidelines/what-can-be-packag...
Actually I think that the guideline should be extended to include the
WASM
files.
The precompiled .wasm files should be removed in %prep and recompiled with wat2wasm (from wabt package) from .wat sources. Possibly, they could be further optimized with wasm-opt (from binaryen package).
Regards, Dominik -- Fedora https://getfedora.org | RPM Fusion http://rpmfusion.org There should be a science of discontent. People need hard times and oppression to develop psychic muscles. -- from "Collected Sayings of Muad'Dib" by the Princess Irulan _______________________________________________ Wasm-sig mailing list -- wasm-sig@lists.fedoraproject.org To unsubscribe send an email to wasm-sig-leave@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/wasm-sig@lists.fedoraproject.o... Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue
Dne 24. 01. 23 v 21:48 Dominik 'Rathann' Mierzejewski napsal(a):
On Tuesday, 24 January 2023 at 18:30, Vít Ondruch wrote:
Dne 24. 01. 23 v 15:26 Michael Dawson napsal(a):
I think that the bundling in Node.js should not be forgotten.
Thanks for identifying that. To clarify do you mean Node.js needs to be able to bundle in externalized WASM so we can rebuild it, or something else?
I mean that when there is some WASM file included in Node.js, we have to be able to replace this file with file compiled from plain sources. IOW, we must adhere to this guideline:
https://docs.fedoraproject.org/en-US/packaging-guidelines/what-can-be-packag...
Actually I think that the guideline should be extended to include the WASM files.
The precompiled .wasm files should be removed in %prep and recompiled with wat2wasm (from wabt package) from .wat sources. Possibly, they could be further optimized with wasm-opt (from binaryen package).
Never heard of this and I am not entirely sure how that would look in practice.
So this is one of the cases AFAIK. Node.js bundles llhttp:
https://github.com/nodejs/node/tree/main/deps/undici/src/lib/llhttp
And there are various WASM files. And this is llhttp source:
https://github.com/nodejs/llhttp
Now how would the wat2wasm help here? Could you please elaborate?
Vít
Regards, Dominik
On Wednesday, 25 January 2023 at 10:15, Vít Ondruch wrote:
Dne 24. 01. 23 v 21:48 Dominik 'Rathann' Mierzejewski napsal(a):
On Tuesday, 24 January 2023 at 18:30, Vít Ondruch wrote:
Dne 24. 01. 23 v 15:26 Michael Dawson napsal(a):
I think that the bundling in Node.js should not be forgotten.
Thanks for identifying that. To clarify do you mean Node.js needs to be able to bundle in externalized WASM so we can rebuild it, or something else?
I mean that when there is some WASM file included in Node.js, we have to be able to replace this file with file compiled from plain sources. IOW, we must adhere to this guideline:
https://docs.fedoraproject.org/en-US/packaging-guidelines/what-can-be-packag...
Actually I think that the guideline should be extended to include the WASM files.
The precompiled .wasm files should be removed in %prep and recompiled with wat2wasm (from wabt package) from .wat sources. Possibly, they could be further optimized with wasm-opt (from binaryen package).
Never heard of this and I am not entirely sure how that would look in practice.
So this is one of the cases AFAIK. Node.js bundles llhttp:
https://github.com/nodejs/node/tree/main/deps/undici/src/lib/llhttp
And there are various WASM files. And this is llhttp source:
https://github.com/nodejs/llhttp
Now how would the wat2wasm help here? Could you please elaborate?
It would help if they were built from WAT sources. WAT is like ASM sources for regular binaries. llhttp seems to be written partially in TypeScript which I'm not familiar with. However, WASM files must be treated like any other binaries. They must not be packaged directly from upstream in a Fedora package. In case of llhttp, it seems one needs a C-to-WASM compiler as C sources are generated with llparse from TypeScript sources.
So, let me rephrase:
The precompiled .wasm files should be removed in %prep and recompiled with appropriate compiler from source.
Example compilers: WAT : wat2wasm (wabt) C : ??? ...
Regards, Dominik
On 1/25/23 13:04, Dominik 'Rathann' Mierzejewski wrote:
On Wednesday, 25 January 2023 at 10:15, Vít Ondruch wrote:
Dne 24. 01. 23 v 21:48 Dominik 'Rathann' Mierzejewski napsal(a):
On Tuesday, 24 January 2023 at 18:30, Vít Ondruch wrote:
Dne 24. 01. 23 v 15:26 Michael Dawson napsal(a):
I think that the bundling in Node.js should not be forgotten.
Thanks for identifying that. To clarify do you mean Node.js needs to be able to bundle in externalized WASM so we can rebuild it, or something else?
I mean that when there is some WASM file included in Node.js, we have to be able to replace this file with file compiled from plain sources. IOW, we must adhere to this guideline:
https://docs.fedoraproject.org/en-US/packaging-guidelines/what-can-be-packag...
Actually I think that the guideline should be extended to include the WASM files.
The precompiled .wasm files should be removed in %prep and recompiled with wat2wasm (from wabt package) from .wat sources. Possibly, they could be further optimized with wasm-opt (from binaryen package).
Never heard of this and I am not entirely sure how that would look in practice.
So this is one of the cases AFAIK. Node.js bundles llhttp:
https://github.com/nodejs/node/tree/main/deps/undici/src/lib/llhttp
And there are various WASM files. And this is llhttp source:
https://github.com/nodejs/llhttp
Now how would the wat2wasm help here? Could you please elaborate?
It would help if they were built from WAT sources. WAT is like ASM sources for regular binaries. llhttp seems to be written partially in TypeScript which I'm not familiar with. However, WASM files must be treated like any other binaries. They must not be packaged directly from upstream in a Fedora package. In case of llhttp, it seems one needs a C-to-WASM compiler as C sources are generated with llparse from TypeScript sources.
So, let me rephrase:
The precompiled .wasm files should be removed in %prep and recompiled with appropriate compiler from source.
Example compilers: WAT : wat2wasm (wabt) C : ???
clang compiles C to WASM.
-Tom
...
Regards, Dominik
wasm-sig@lists.fedoraproject.org