What if the first step towards the next OS evolution is something like the Linux syscall API?

I've implemented a small prototype that allows me to write a program and compile it for pretty much any platform. ImageImageImage
I think WASI is the wrong approach as it basically makes libc the API which makes the implementation burden heavy for programming-language authors.
Here's the example app running on macOS and in a web browser: Image
Now, imagine adding ops for io_uring for IO as well as webgpu for drawing.
A real implementation would offer async syscalls (in addition to an io_uring function) but currently WASM on the web platform is the only place where it is not possible to suspend&resume execution and so either the API needs a callback or web wasm needs a suspension feature.
Got suspend/resume working for wasm in browsers via @kripken’s Binaryen asyncify, a pass run on the wasm (so not dependent on any compiler or PL.) Nice! Now open() works w/ FileSystem web api and io_uring will be possible to implement.
Zooming out, with this approach (implementing part of the Linux syscall api) I think it would be possible to compile a wide range of Linux apps to run on web, macOS etc with no or very few modifications. Like, musl might “just work.”
Here's a live demo of the "universal syscall" prototype which you can run in a web browser: rsms.me/etc/xsys-demo/

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Rasmus Andersson

Rasmus Andersson Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @rsms

8 Sep
UI design world: let’s clear this up once and for all:

“Modal” is when user input goes into an alternate mode. It is _not_ an overlay window.

Better language for an overlay window: “Dialog box” or “Pop-up window.”

(Don’t agree? Context menus are modal but not windows :-)
Figma is modal in many ways: Subtle: selecting the pen tool or rectangle tool changes what happens when you click.
Obvious: Opening the “share” window changes the mode of keyboard input.
Barely modal: Color panel (only some keyboard input changes)
Read 12 tweets
23 Jun
Concurrent programming can be hard. After days (over the course of weeks) I was today finally able to make a channel implementation pass my tests. Sometimes the smallest things takes the most time to get right.

Here's a short thread …
The kind of "channel" I've implemented is a form of CSP (see swtch.com/~rsc/thread/) which is used to communicate between threads. It's similar to Go's chan but works with threads rather than a custom coroutine runtime.
Read 31 tweets
2 May
This is what large parts of the commercial WWW has become. It really saddens me. It’s like a hundred tortured voices screaming in desperation. How do we fix this?! How did we get here?
What needs to change is culture around value and technology to support it.
Being a journalistic publication in this day and age must be tough with a web culture of “everything is free.” How do you compete with that?! We all need to put bread on the table.
Here’s a practical example how broken the web system is. Okay so a friend told me about a cool DIY instax back for the Mamiya RZ/RB cameras. I do a web search and end up on this film photography website. Looks legit. Looks like work of passion. Good stuff. ImageImage
Read 10 tweets
1 Apr
Re building tools: I strongly believe that tools — software libraries, utilities, etc. — should only be created to solve an issue which you have a direct relationship to. History has proven this to be an excellent measure of success.
[Thread ...]
Most of us have probably experienced the "CRM system made for other people" that sucks, because the creators of it didn't use it themselves and thus couldn't relate to the problems their thing was solving.

So here's some good terminology:
- "Me ware"
- "Us ware"
- "Them ware"
"Them ware" is the worst possible thing; a "none of the roads taken" kind of compromise. You build something for someone else without a need of yourself. It will be incredibly hard to make something good this way since you will essentially fly blind.
Read 8 tweets
30 Mar
(Now that I'm no longer working at Figma I can do this:)

Hey @figmadesign this is _so_ confusing. Can we plsss reverse the direction? Image
Since I've gotten the same Q a few times:

Read 6 tweets
26 Jan
Although this article is a bit too extreme and an overreaction, I must say that as a non-Chrome user it seems more and more websites only work in chrom{e,ium}. At least once a week I have this experience (I use Safari.) Thread →

lwn.net/SubscriberLink…
The contemporary idea of a web browser is an abstraction layer for technology to allow some document or software to be available to anyone using a web browser. If your website only works in Chrome it’s really not different from say only working on macOS.
There’s a cost to everything and with web development a big chunk of cost is in quality (making a UI reliable and behave the way a user expects it to.) An increasing cost area is also writing & testing browser-specific code and that seems really backwards to me.
Read 14 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!

Follow Us on Twitter!

:(