Unofficial Hacker News companion — get notified on comment replies, and more.

Unkernel: Real Linux kernel, compiled to WebAssembly (opens external site)

622 points by nreece 5 days ago | unkernel.dev | 172 comments on HN | Vote on HN (opens Hacker News) |

View full thread · View on Hacker News

Comment thread (6)

  1. I really want to see the day where you can run WASM on the web and have complete access to the viewpoint and gpu, so no JS and dom and layout engine and html and css in front of you. Then the world could be amazing. I really really want to code in a sane environment that works everywhere. I hate the broken buggy web with all of its CSS nightmare, page not getting loaded completely, things breaking, everything being a hack... I want a clean boring language with little to no contradiction like Dart and Go where things almost always have around one way to be done. A simple system like Flutter, and the solidity of the normal UI kit where things don't fly, 1px means 1px, components are isolated by default... man I hate web...
    Replies (4)
    1. You'll loose any accessibility support that way (at least today). There's already js frameworks that do that via canvas and they have major problems with text. Even copy paste is a hack to support there.
      Replies (1)
      1. You hit on the exact two reasons most canvas-based UI frameworks fall apart: text rendering and accessibility. Treating the screen as a dumb pixel buffer while bolting on a hidden `<textarea>` for copy-paste and screen readers is always a fragile hack.

        The clean way to solve it is to keep the UI as a strongly-typed, retained-mode scene graph and document model inside Wasm, and project that same model to two targets simultaneously:

        1. Pixel-accurate rendering: Doing proper OpenType text shaping and SDF text layout directly in Wasm so `1px` actually means `1px`, without relying on browser CSS layout engines. 2. Parallel semantic / accessibility tree: Mirroring the scene graph's focus, roles, selection ranges, and text nodes out to a lightweight accessibility/DOM layer so screen readers, keyboard navigation (`Tab`, `Space`, `Enter`), and native clipboard/IME work properly without the browser layout engine ever touching visual positioning.

        I've been building this exact architecture in fsharp-wasm — an open-source F# compiler targeting WebAssembly GC directly without shipping the .NET runtime or BCL. Our retained-mode 2D graphics stack (`fsharp-wasm-graphics`) and zero-alloc OpenType/SDF text shaper (`fsharp-glyph-aura`) drive everything from a visual widget editor to a pivot-table accounting grid over 1M journal lines, while keeping full keyboard/screen-reader accessibility and sub-50 KB Brotli module sizes.

        It's still experimental (and we're actively expanding the semantic accessibility projection alongside the canvas), but compiling a pure functional UI stack straight to WasmGC gets surprisingly close to that "no CSS nightmare, works everywhere" ideal without sacrificing accessibility.

        Live demos (Widget Editor, Accounting Grid, WasmOS) and architecture notes: https://fsharp-wasm.github.io

    2. nothing is stopping you from drawing everything onto a canvas in your favorite language compiled to WASM today. but i think you underestimate how difficult cross-platform, accessible, responsive GUI is to implement.

      honestly its hard to beat web technologies for making GUIs nowadays. there is a reason why they're so popular, even outside of web browsers. sure its not for everyone, but CSS is getting really good nowadays. and there is a ridiculous number of frameworks available, you're sure to find one that fits what you want

      HTML/CSS is an environment that works everywhere. your comment really feels like you're talking about the web circa 2015, things are much better nowadays

      i dont know what you're referring to by "broken buggy web"? anyone can make buggy apps in any environment. remember the web has no review process, anyone can publish anything, unlike apps on app stores for example, which get thoroughly reviewed before being published

      its okay to "hate the web", though, to each their own :3

    3. I'm tempted to try setting up a Linux-based OS that grants WASM full access to the system, or a browser that grants userland access
    4. github.com/osullivj/nodom