News for hackers. Stuff that matters.
Re:Fomos: Experimental OS, built with Rust by vlovich123 on Tuesday August 29, 2023 @11:30PM (#37317339)
> How do you sleep, or wait asynchronously ? Just return;

This is a bit strange. I would think async I/O in the style of io_uring would be fantastic but this kind of model seems to rule out anything like that. That’ll make it hard to get reasonable perf. It’s also strange to not support async as it’s a natural suspension point to hook into but you would have to give up a lot of the design where your application state has to be explicitly saved / loaded via disk if I’m not mistaken. Seems pricy. Hopefully can be extended to support async properly.

In a similar vein, I suspect networking may become difficult to do (at least efficiently) for similar reasons but I’m not certain.

Re:Fomos: Experimental OS, built with Rust by projektfu on Wednesday August 30, 2023 @07:52AM (#37320630)
If I had to guess, something like async IO would be implemented by updating the context with the IO request and returning, and then your function would be called when it is ready. The function appears to me to be the end of an event loop that receives an arbitrary state in the parameter, so it should be able to generalize to anything an event loop would do.

You give up the language-level support for coroutines and async, though...

Re:Fomos: Experimental OS, built with Rust by Ruddle on Wednesday August 30, 2023 @08:32AM (#37321033)
Author here. Your guess is correct. An app is its own callback. It might be possible to write an small app-level executor to get back those sweet language-level support for async though.