-
-
Notifications
You must be signed in to change notification settings - Fork 29
Open
Labels
good first issueGood for newcomersGood for newcomers
Description
While in the shell/Linux, you can run Wasm executables as Wanix tasks like native Linux executables. This is currently achieved with 3 parts:
- wexec: Linux executable that uses
/taskto allocate, start, and attach STDIO to awasitask for a Wasm executable - preload: Linux library that decorates libc
execve,execvp,execvpeto usewexecif there is a.wasmfile extension - init: shell init script that ultimately runs the Busybox shell with LD_PRELOAD pointing to
preload
As a side effect of this approach, we cannot build Busybox as a static binary because using LD_PRELOAD requires the dynamic linker (ld-linux), which then means we need a handful of files in /lib.
We could drop most of the /lib files, the preload component entirely, and go back to using a static build of Busybox by using binfmt_misc to simply register wexec as the "handler" for .wasm files.
Seems ideal, but I've never used it before and only learned about it just as I got the ld_preload approach working.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
good first issueGood for newcomersGood for newcomers
Type
Projects
Status
No status