WebAssembly / WASI

WebAssembly System Interface
Other
4.85k stars 251 forks source link

Library on demand (LOD) in WASI #455

Closed vasuskimo closed 2 years ago

vasuskimo commented 2 years ago

LOD, library-on-demand is a cross between a library and a service using Web Assembly WASI. LOD obviates the need for linking during compile time. Simply call LOD, like a web service when you need and it will be downloaded from some repo and when you are done simply release it.

There is a precedence in Javascript/node where one can do this kind of dynamic import.

This LOD feature would become an imperative as WASI begins to gain traction.

devsnek commented 2 years ago

isn't this just dynamic linking?

vasuskimo commented 2 years ago

isn't this just dynamic linking?

Well, I meant dynamic linking in the true sense. Could you do "import("https://foo.bar") or i="include("https://foo.bar") and not from Javascript.

sbc100 commented 2 years ago

WASI itself doesn't really deal with how your program and its libraries are composed. Perhaps that module linking proposal is better place to discuss this kind of thing? : https://github.com/WebAssembly/module-linking

vasuskimo commented 2 years ago

Created an issue in https://github.com/WebAssembly/module-linking as @sbc100 pointed out and closing this issue.