Emscripten and Solid

Emscripten.org was mentioned by @happybeing on the Safenet forum. I had not heard of it and it looks really interesting.

I wonder if it makes sense (maybe not?) to think of a WebId or Solid aware version of Emscripten. Emscripten compiles C or other languages to WebAssembly.

Emscripten has a file system API and it offers multiple file systems which can be mounted with FS.mount(). It also supports registering arbitrary device drivers composed of a device id and a set of device specific stream callbacks. High level FS operations transparently interact with the device.

User and group permissions are defined but ignored in FS.open(path, flags, [mode]) where mode is readonly, writeonly, or readwrite. The file permissions set in mode are only used if the file is created. The caller is always treated as the owner of the file and only the owners permissions apply.

If the user and group permissions were treated according to the WebId of the agent invoking the code, then Emscripten could use device drivers or mount file systems that access the web but respect user and group permissions as well.

2 Likes

If Emscripten is made Solid aware and there would be users and groups used for file system operations, then does that mean that there would also be the concept of superusers that could for example list the groups that a user is in? Would users have to opt-in to be subject or visible to superuser commands and if so would they also choose which commands they would opt-in for?

-edit-
Probably there should be a choice for each “command” to be opt-in, and each run of of each command to be opt-in. Also the answer or report from each “owner” or “user” (or group) should also be opt-in. So only in some cases would a “superuser” be sure their “shell script” was executed.