LinuxBIOS + WASMI
Posted: Tue Feb 25, 2020 10:25 am
What about adding support for WASM to LinuxBIOS and allow to write device drivers in WASM? Microsoft have planed to add support for multi-os drivers to UEFI. Why don't try this with LinuxBIOS and WASMI (or Linux -- the kernel -- and wasm). I known, currently someone tries to add WASM support to kernel, but I doubt it is addressed to writting device drivers.
Currently many devices are for USB, so potentially it could work on many hardware - we only need drivers. There's one problem: device drivers are still prepared in C/C++ instead of WASM. Mozilla and Microsoft is planned to create WASM interpreter, which supports POSIX/newer APIs. Is there any change to prepare API to write device drivers for multi-os purpose?
I think we need something like this:
1. WriteToVar(var_name, buffer, buffer_length)
2, ReadFromVar(var_name, buffer, buffer_length)
3. VarSize(var_name)
4. SwitchUserTo(user_id)
Possible many others (API above is only to configure device). When there will exist WASM interpreter with POSIX support and GTK+/Qt bindings, we could allow to deliver very good user experience by hardware vendor.
SwitchUserTo could been used to switching config of device dependent on current user or current VT.
Maybe just add API to query about available options, such like in CUPS/DBUS (and possible Mesa in future)? If yes, DE could create custom settings page.
Currently many devices are for USB, so potentially it could work on many hardware - we only need drivers. There's one problem: device drivers are still prepared in C/C++ instead of WASM. Mozilla and Microsoft is planned to create WASM interpreter, which supports POSIX/newer APIs. Is there any change to prepare API to write device drivers for multi-os purpose?
I think we need something like this:
1. WriteToVar(var_name, buffer, buffer_length)
2, ReadFromVar(var_name, buffer, buffer_length)
3. VarSize(var_name)
4. SwitchUserTo(user_id)
Possible many others (API above is only to configure device). When there will exist WASM interpreter with POSIX support and GTK+/Qt bindings, we could allow to deliver very good user experience by hardware vendor.
SwitchUserTo could been used to switching config of device dependent on current user or current VT.
Maybe just add API to query about available options, such like in CUPS/DBUS (and possible Mesa in future)? If yes, DE could create custom settings page.