Join the discussion
Write your take first — we'll ask for email only when you're ready to publish.
- Hacker News
- This is so cool! I'm having trouble thinking of all the different use cases and potential issues with this, but I don't think anyone has done something like this before. Great work
- Thanks for taking a look and for kind words!
We've also had a prototype running multiplayer DOOM between browsers via WebRTC. I wonder what kinds of network applications might be interesting here.
- I really like this. I think the possibilities are multiple. I will try it to test the generic POSIX compliance of my main hobby project.
What is the main plus you have over other similar projects or tools like JSLinux?
Which preprocessor directives can I expect to have if I need to write custom code when my executable is compiled for Kandelo?
What is the reason for choosing GPL instead of MIT or similar?
by program - > What is the main plus you have over other similar projects or tools like JSLinux?
Good question! I had to do some research. Here's my understanding:
JSLinux is emulates a complete machine architecture. JSLinux runs in the browser's Wasm runtime, and JSLinux programs run on JSLinux. Both Kandelo's kernel and processes run directly in the browser's Wasm runtime, with the kernel fielding syscalls from processes. Kandelo does not emulate CPUs.
Pre-existing software can run on JSLinux, but software must be rebuilt to run on Kandelo.
Given the lack of CPU emulation, I would expect Kandelo to be more efficient than JSLinux, but for completeness, it's hard to beat JSLinux's actual system emulation.
> Which preprocessor directives can I expect to have if I need to write custom code when my executable is compiled for Kandelo?
In general, we intend user software to be buildable by using standard C/POSIX macros with the Kandelo SDK. Does that answer your question?
> What is the reason for choosing GPL instead of MIT or similar?
We have a mix of GPL and MIT licenses in this project. For software that is not linked with with user programs, we choose the GPL so that folks may build upon our work but cannot make it closed source. Software that links with user programs is intentionally MIT-licensed to avoid forcing user software into the GPL.
Here are our brief notes on the topic: https://github.com/Automattic/kandelo/tree/67ad37130e2ba4c11...
- How easy would it be to integrate this into something like this?
https://lerc.neocities.org (first page load initialized the filesystem in indexeddb, reload the page to boot off it). I really should automate that.
If there is enough of an API to the processes being run by kandelo, I could even build a full /proc interface for them.
by Lerc - I feel like I'm not properly appreciating what that site does. Would you be up for explaining a bit? It fun to interact with the shell and fun to see JS implementations of core utils. How would you imagine Kandelo might integrate with it? Would it be another way to run programs in addition to the JS utils?
There is already a way to list processes that the Kandelo web app uses. To see the info, you can click the Internals button in the dock and click on the Procs tab. I'll try to follow up later with more details.
- I had the idea of achieving build isolation by codemodding the Rust implementations of bash and the GNU coreutils (brush+uutils) to use a VFS (wasmtime's cap-std) backed by the real FS and then disabling anything that remained problematic. It kind of works but I'm still not particularly confident in it and I think this is probably the better approach.
The some points of trouble I ran into were dead symlinks left behind on the FS pointing to real files and escape codes interacting with the terminal (e.g. escape codes reading from the clipboard).
by grayrest - The build isolation approach sounds interesting, but I'm not sure I understand.
Do you mean isolating build scripts by using a VFS mapped to the real FS and masking away everything the build script should not have access to?
> The some points of trouble I ran into were dead symlinks left behind on the FS pointing to real files
Symlinks make this space trickier for sure.
> escape codes interacting with the terminal (e.g. escape codes reading from the clipboard).
Woah. TIL this was possible.