WASI 0.3.0 Released

(github.com)

130 points | by mavdol04 2 hours ago

6 comments

  • garganzol 1 hour 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.

    • spankalee 14 minutes 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.

      • lenkite 1 minute ago
        Why was the component model not expressed in LISP syntax like the way WAT is ? Why have yet another custom IDL language with bespoke parsing rules ?
    • zozbot234 5 minutes ago
      AIUI, the underlying motivation for the WASM component model is the same as for the early interface types proposal, which has been a planned part of WASM since the very beginning - namely to allow modules written in high-level languages to expose "native" interfaces, without requiring a completely bespoke translation into WASM's lower level facilities. That's a sensible goal, even if achieving this may ultimately involve something that's at least loosely reminiscent of CORBA.
    • throawayonthe 20 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
    • tete 20 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?

    • IshKebab 27 minutes ago
      I disagree. We shouldn't just be copying Unix until the end of time.
      • iqihs 15 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
        • Ericson2314 4 minutes ago
          That's like saying "the US Constitution has clearly shown it's a model that is built to last"

          Sometimes bad designs stick around due to pure inertia

  • b33j0r 1 hour 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.

  • ilaksh 32 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?
  • simonw 1 hour 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
  • lifty 1 hour 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.
    • spankalee 11 minutes ago
      I'm using it for a secure, language agnostic workflow orchestrator. Components have very finely-grained and controller permissions and access to data. They don't even get clocks by default (to mitigate against Spectre-style attacks) and credentials and tainted data are sequestered.
    • feznyng 23 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.
    • utopiah 53 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

    • airstrike 48 minutes ago
      Extending my Rust binary with a marketplace of WASM-based extensions like VSCode
    • tdhz77 1 hour ago
      Edge rural farm systems
    • jedisct1 39 minutes ago
      The best usage example of WASI I know of is the Zig compiler: https://ziglang.org/news/goodbye-cpp/
    • OtomotO 1 hour ago
      extending software with a plugin system
    • hectaman 32 minutes ago
      [flagged]
  • 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.
    • swiftcoder 19 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.

    • 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.

      • Rochus 39 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")?

        • throawayonthe 15 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?
    • 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).

      • wongarsu 1 hour 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
    • callahad 1 hour 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.
    • 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.

    • __s 1 hour ago
      It has, but its usually just an optimization, so goes unnoticed
    • Dwedit 43 minutes ago
      WebAssembly doesn't beat JavaScript in performance, and that is embarrassing.
    • 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.

    • 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.
    • 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.

    • 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!"

      • tdhz77 59 minutes ago
        Why can’t you?
      • fsloth 1 hour 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.

    • bearjaws 55 minutes ago
      [dead]