WASI 0.3.0 Released
122 points
2 hours ago
| 6 comments
| github.com
| HN
garganzol
48 minutes ago
[-]
Wrong direction. WASI should be simple and stable. Initially, it was revolving around a simple Unix-like API model and it was close to perfect. Now, there is an opinionated component model which is an unneeded overcomplication that should have never been considered as part of WebAssembly spec IMHO.

A real component model is a separate development and cannot be blindly tied to a particular ecosystem. Otherwise, its main purpose of providing easy interoperability between different ecosystems is totally lost.

I do not know why WebAssembly committee thinks that shoving-in CORBA-like monstrosity is even an acceptable idea. Let's keep WebAssembly lean and fast! Anything extra can (and should) be implemented by other technologies.

reply
spankalee
1 minute ago
[-]
The component model is what unlocks relatively type-safe interop between modules written in different languages. Given that Wasm is a runtime target for many languages, this is an entirely appropriate and useful goal.

If you have a host system where you want to expose APIs in an language-agnostic way, IDLs are the best way to do that.

You're also conflating the core WebAssembly work with the WASI work. There is some overlap in people, but WASI is developed separately.

reply
throawayonthe
7 minutes ago
[-]
i don't think people calling it CORBA-like are doing it in good faith, but regardless, no we should not do unix apis everywhere for the rest of time please
reply
tete
8 minutes ago
[-]
I agree. This is saddening. It seems to often happen in "standard first" scenarios for some reason. I was very happy when CloudABI and POSIX were picked as prior art inspiration.

Now it feels like it moved from "what would we need to get things done and achieve our goals?" to "what could be done and which goals could we achieve?"

Maybe I am missing something, but are the recent changes something that people requested?

reply
IshKebab
15 minutes ago
[-]
I disagree. We shouldn't just be copying Unix until the end of time.
reply
iqihs
2 minutes ago
[-]
less copying and more keeping in the spirit of, as it has clearly shown it is a model that is built to last
reply
b33j0r
59 minutes ago
[-]
Love/hate with this one. How was I supposed to follow this? I tried, and few things were publicly visible for nearly two years. I last checked in march and it looked like no progress had been made.

That makes me very suspicious of wasiv3. Funny enough, I already implemented a bunch of the promises (pun not intended) and think that freestanding wasm with custom integrations is the more likely future.

The promise of wasi components has not been fulfilled. The market wants to hotload and link artifacts dynamically. The wasi project requires insider wizardry to use it that way: the offering has been statically linking components before you ship. Defeating 99% of the use cases.

I do not like that this has been worked on in the shadows.

reply
hectaman
27 minutes ago
[-]
I don't think it's fair to say this work has happened in the shadows. I work on CNCF wasmCloud, and I know how hard we try to make this content available.

- Many standing meetings organized around SIGs, all on the public community calendar: https://calendar.google.com/calendar/u/0/newembed?src=events...

- A dedicated Zulip: https://bytecodealliance.zulipchat.com/

- Conferences organized around exactly these topics: Wasm Day, WasmCon, Wasm I/O, and the Bytecode Alliance Plumbers Summit

- CNCF projects: wasmCloud, Spin

- Blogs, many with recordings, summaries, and transcripts: https://bytecodealliance.org/articles/the-road-to-component-..., https://wasmcloud.com/community/, https://spinframework.dev/blog/index

If you want the architectural direction straight from the source, Luke Wagner's keynotes are the best place to start:

- "What is a Component (and Why)?" (WasmCon 2023): https://www.youtube.com/watch?v=tAACYA1Mwv4

- "The Path to Components": https://www.youtube.com/watch?v=phodPLY8zNE

- "Towards a Component Model 1.0" (Wasm I/O 2026): https://www.youtube.com/watch?v=qq0Auw01tH8

I mean this, though - what else would you like to see to try and make the content and process more accessible? Are there communities that are doing this really well that we could use for inspiration?

reply
tete
1 minute ago
[-]
> - "What is a Component (and Why)?" (WasmCon 2023): https://www.youtube.com/watch?v=tAACYA1Mwv4

At some point the speaker says "It should not be Systems Interface but Standard Interfaces" which honestly sounds like a different project. As an implementer or even as just a user in general, can it be trusted that tomorrow it isn't something completely different? Seems like an odd standard to follow.

reply
airstrike
35 minutes ago
[-]
It's version 0.3...
reply
ilaksh
19 minutes ago
[-]
Is there some Zig code demonstrating how to use all the changes in a Zig program that compiles to WASI 0.3.0?
reply
simonw
58 minutes ago
[-]
If you don't want to download the .tar.gz I think you can browse the content for this release (.wit interface files) here on GitHub: https://github.com/WebAssembly/WASI/tree/v0.3.0/proposals
reply
lifty
59 minutes ago
[-]
If you have used WASI in the past, can you mention your use case? Very curious if you found it to give you an edge compared to other sandboxing like containers or VMs.
reply
feznyng
10 minutes ago
[-]
In-process sandboxed llm-generated code execution. Considerably lighter weight, faster to boot (assuming pre-compilation) than Docker or spinning up micro-VMs.
reply
utopiah
40 minutes ago
[-]
I tinkered with https://extism.org and basically the use case is that they suggest, namely you can extend software in another programming language but without having to setup a container or VMs on the client. They "just" run the code in the browser and it can be JavaScript, sure, but can also be Python, Go, whatever.

It's quite specific though as I'm working on support programming in the browser.

If you are not deep into letting a very specific kind of user extend, it's probably overkill.

Even then it's a very VERY niche thing because it has to be simultaneously :

- someone who is opinionated about a programming language (either because they know too much, i.e. expert, or not enough, i.e beginner)

- is dedicated enough to want to try to build something on top of an existing system

- does not want to bother with solutions you mentioned

reply
airstrike
35 minutes ago
[-]
Extending my Rust binary with a marketplace of WASM-based extensions like VSCode
reply
jedisct1
26 minutes ago
[-]
The best usage example of WASI I know of is the Zig compiler: https://ziglang.org/news/goodbye-cpp/
reply
tdhz77
49 minutes ago
[-]
Edge rural farm systems
reply
OtomotO
55 minutes ago
[-]
extending software with a plugin system
reply
shevy-java
1 hour ago
[-]
Will WebAssembly ever achieve a real breakthrough? It's been almost 10 years since it came around. HTML, CSS and JavaScript were a breakthrough back in the days. WebAssembly still is not right now; only very few folks or companies use it.
reply
modulovalue
1 hour ago
[-]
It's already a breakthrough in my opinion.

Many things are possible that weren't possible before. For example, I was able to compile the Dart VM (the compiler + analyzer + VM) to wasm and run it on the web: https://github.com/modulovalue/dart-live it supports hot reload and many other cool features. It runs essentially everywhere and it's a very bare proof of concept for a fully integrated programming development system.

The problem is that things just take time if you have to coordinate across a bunch of languages and teams while trying to make everyone happy.

To give you a sense of what else is coming: the wasm ecosystem is moving towards supporting a component model. Eventually you'll be able to import any piece of code from any programming language that supports it. Wasm interface types will make that possible.

reply
Rochus
26 minutes ago
[-]
> I was able to compile the Dart VM (the compiler + analyzer + VM) to wasm and run it on the web

Is this really a representative use-case of WASM/WASI? Would'n it be much better to compile Dart to WASM (the Dart SDK even supports "dart compile wasm")?

reply
throawayonthe
3 minutes ago
[-]
this is a confusing question; why would it be much better to e.g. compile a C program for x86 linux musl but not the C compiler?
reply
swiftcoder
6 minutes ago
[-]
I think I've seen you comment this on every recent WASM post, and I'm really wondering what you think breakthrough success looks like for a low-level technology like WASM?

Do you expect everyone to hand-code their websites in WASM? Do you expect every webapp be cross-compiled to WASM?

From where I'm standing, WASM is extremely successful in its specific niches: in enabling islands of high-performance in otherwise web-based software, and in sandboxing plugins to native apps/servers.

reply
CGamesPlay
1 hour ago
[-]
I think its killer use case is actually embedded in non-web places. Tree Sitter parsers require arbitrary programs to be able to parse arbitrary languages. WebAssembly is a natural way to achieve that: write your parser in any language, compile to WebAssembly, use that result in any supported editor. You get sandboxed execution and arbitrary compute.

It has to compete with more domain-adapted use cases though. Does WASM make more sense than eBPF for packet filtering? It doesn't seem to make more sense than JavaScript for making websites. Maybe it makes more sense for deploying edge services (which IIUC is the main use case for WASI).

reply
wongarsu
50 minutes ago
[-]
Plugin architectures are a niche where WASM really shines. Before WASM most plugins were either high performance (loading dynamic libraries) or sandboxed and safe for untrusted plugins (LUA etc). WASM allows you to have your cake and eat it to. You pay with a bit of complexity, but it's in a great and somewhat unique place in the tradeoff space
reply
kettlecorn
1 hour ago
[-]
WebAssembly is used in all sorts of ways.

It's used heavily by major web apps like Figma, it's used to run non-Javascript languages on Cloudflare Workers, many compute-heavy web libraries rely on Wasm modules, many web games rely on Wasm, it's used for safe plugins in some native apps like Microsoft Flight Simulator, amongst other use cases.

reply
callahad
54 minutes ago
[-]
It's a silent technology, but I'd argue it has broken through in that most of us already use it daily without knowing. Figma, Google Sheets, Disney+, Prime Video, and much more all have WebAssembly somewhere in their stack.
reply
__s
1 hour ago
[-]
It has, but its usually just an optimization, so goes unnoticed
reply
Dwedit
30 minutes ago
[-]
WebAssembly doesn't beat JavaScript in performance, and that is embarrassing.
reply
kettlecorn
22 minutes ago
[-]
That's not accurate. I Googled for a recent performance benchmark and found this which indicates Wasm offers a notable performance gain: https://medium.com/@hashbyt/webassembly-vs-javascript-perfor...
reply
OtomotO
1 hour ago
[-]
WASI stands for WebAssembly System Interface.

It has little to do with the webassembly in the browser.

I use it to extend a native application, for example. No browser in sight at all.

reply
grufkork
1 hour ago
[-]
I mean, it’s another tool. It doesn’t really make an entirely new kind of web app possible, but it’s useful for some specific compute-heavy tasks (with limitations like JS<->WASM being slow). It’s also useful for running not-JS in the browser; I’m building a lighting console with a web UI distributed over multiple devices, and being able to use the exact same structs/representation and algorithms on server and client is pretty neat. It’s like Node, but in reverse! But none of this is cause for paradigm shift, so I don’t think seeing a ”breakthrough” really is relevant.
reply
lioeters
1 hour ago
[-]
You said the exact same thing a couple days ago. You don't know what you don't know.

WebAssembly has been a great success thanks to its excellent initial design.

reply
artemonster
1 hour ago
[-]
for me its undebuggability.

-"hey, look at our C Rust FORTRAN to WASM translator, blahblah"

-"uhm, cool, how do I debug it?"

-"yeah...about that...you cant!"

reply
fsloth
48 minutes ago
[-]
This! The only way to get to a stable system at least with c/c++ source, where you can hunt bugs, is to have a fairly large unit test coverage. When something fails - add that as test case; run ctest - pray that this is discoverable with tests.

So wasm is a really strange compilation target for systems programming languages.

I mean there _are_ ways to debug it in a browser but they sort of suck.

reply
tdhz77
46 minutes ago
[-]
Why can’t you?
reply