31 ms·
Have you read this article by the lead developer of Flutter, Ian Hickson [0]? It describes using WASM just as you describe to have a fully cross platform UI fra
by satvikpendem 3y ago
Have you read this article by the lead developer of Flutter, Ian Hickson [0]? It describes using WASM just as you describe to have a fully cross platform UI framework, which is a concept that Flutter uses.
[0] https://docs.google.com/document/d/1peUSMsvFGvqD5yKh3GprskLC3KVdAlLGOsK6gFoEOD0/edit?resourcekey=0-bPajpoo9IBZpG__-uCBE6w https://docs.google.com/document/d/1peUSMsvFGvqD5yKh3GprskLC...
- seanisom 3y agoThanks - that link does not appear to be open access, anyways I don't think I've seen it. I'm familiar with Flutter at a high-level (Kevin Moore gave a great talk on it at Wasm I/O), and I think other than requiring users to work in Dart, it is probably one of the most powerful ways to do cross-platform UI today. Worth noting that their original GPU backend was Skia, and now they are retooling around Flutter GPU (Impeller)[0], which is kind of designed similarly as an abstract rendering interface over platform-specific GPU APIs. [0] https://github.com/flutter/flutter/wiki/Flutter-GPU https://github.com/flutter/flutter/wiki/Flutter-GPU
- satvikpendem 3y agoI edited the link to be public, let me know if that still works. I think the ideal in that article is that people can write components in whatever languages they want, and when they compile to WASM, they can all interoperate. It reminds me of all of those compile-to-Javascript languages for writing micro-frontends, although there is not as much interoperability from a React boundary to say, a ClojureScript boundary. By the way, what are you building as a solo founder for YC? Is it related to this project? For this project, I'm curious to see how exactly WASM interoperates with the GPU directly, bypassing the platform specific APIs. Do you still have to write GPU-specific parts for each of the GPU manufacturers? I wonder if there would be an open standard called WASM-GPU in the future that abstracts over these but doesn't necessarily touch any of the OS directly.
- seanisom 3y agoGot it, thanks. Not what I was expecting. To me, this reads like the intersection of "Web Components as Wasm" and "The Browser as an OS" - almost something analogous to WASI as browser APIs that are delivered via Wasm ABI instead of JS/WebIDL. It's an interesting take, and as long as it can operate alongside existing code, I'm all for that. There are strong parallels to what we're building - small modules of Wasm graphics code that can interoperate across a common interface. Check the repo for the GPU integration - it's like a super trimmed down version of wgpu, where graphics data is copied out of Wasm linear memory and a host specific API (WebGPU/OpenGL/DirectX) takes care of the upload to the GPU. There is a wasi-webgpu WebAssembly L1 proposal that I am involved with in the works, driven by Mendy Berger, and at some point all of this will be tooled on top of that with wgpu as a backend. For renderlet the company, the goal is to build developer tools that make it easy to build renderlets and these kinds of applications without having to write raw Wasm code. The meta-compiler in the video is the first step in that direction! The runtime itself will always be open-source.
- pjmlp 3y agoIt reminds me of something else, actually. "More than 20 programming tools vendors offer some 26 programming languages — including C++, Perl, Python, Java, COBOL, RPG and Haskell — on .NET." https://news.microsoft.com/2001/10/22/massive-industry-and-developer-support-for-microsoft-net-on-display-at-professional-developers-conference-2001/ https://news.microsoft.com/2001/10/22/massive-industry-and-d... "The EM intermediate language is a family of intermediate languages created to facilitate the production of portable compilers." "EM is a real programming language and could be implemented in hardware; a number of the language front-ends have libraries implemented in EM assembly language.", namely C, Pascal, Modula-2, Occam, and BASIC. https://en.wikipedia.org/wiki/EM_intermediate_language https://en.wikipedia.org/wiki/EM_intermediate_language "The high-level instruction set (called TIMI for "Technology Independent Machine Interface" by IBM), allows application programs to take advantage of advances in hardware and software without recompilation" https://en.wikipedia.org/wiki/IBM_AS/400#Technology_Independence https://en.wikipedia.org/wiki/IBM_AS/400#Technology_Independ... WASM is just another take on this.
- 3y ago
- sheepscreek 3y agoMight be this article: https://docs.google.com/document/u/0/d/1peUSMsvFGvqD5yKh3GprskLC3KVdAlLGOsK6gFoEOD0 https://docs.google.com/document/u/0/d/1peUSMsvFGvqD5yKh3Gpr...
- nchmy 3y agonope
- mendyberger 3y agoThis is the public link https://t.co/3xeGnKhwYr https://t.co/3xeGnKhwYr
- nmfisher 3y agoRelated - I’ve written a Flutter package to wrap the Filament PBR rendering package and I hacked together a WASM implementation so I could build 3D apps in Flutter for web. It’s still just experimental (I’m waiting for some upstream Dart fixes to land around WASM FFI, and shared memory support would be nice in Flutter too) but I think it’s promising. Bundle size is a bit of an issue at the moment too. https://github.com/nmfisher/flutter_filament https://github.com/nmfisher/flutter_filament
- seanisom 3y agoThis is awesome! I'm not fluent with Flutter/Dart but would like to dig in to how the build / Wasm packaging works. The state of shared memory for Wasm is not great, although raw SharedArrayBuffers work ok in a browser for running multiple guests. Getting multi-memory properly working through llvm is likely a better solution. We've got a bundle size issue as well even with -O3. I thought it was due to the amount of templated glm simd code we run, but now am convinced its deeper than that into Emscripten. Haven't been able to look into deeply yet.