4 ms·
Show HN: Create Native Desktop Apps from WebAssembly
- syrusakbary 4y agoHi HN! At Wasmer we have been working to enable more use cases for the WebAssembly ecosystem. We believe that Wasm can become the lingua franca for software, and we have started to work towards enabling that: starting with standalone native executables generation from Wasm WASI packages. Looking forward hearing your thoughts!
- mountainriver 4y agoWasmer is one of the projects I’m most excited about right now. It offers such an elegant view on where we could take runtimes
- thepra 4y agoI guess Blazor WebAssembly based webapps can't be used with this system.
- melony 4y agoDoes Wasm have a universal GUI story outside of the browser?
- yellowapple 4y agoThat's what I'm wondering, too, and I was expecting that to be the thing described in the article based on the title.
- wizofaus 4y agoSince when was .lol a top level domain?? Have they just given up now? (Edit: 7 years now apparently, never seen it before...)
- detaro 4y agosince 2015 (one of the new-gTLD rounds)
- dmitrygr 4y agoHistory repeats itself yet again. Write-once-run-anywhere,eh? :) We had a thing for that a while ago, we called it Java. It had a similarly compelling story.
- jeroenhd 4y agoI like Wasmer for the ability to sandbox executables, because WASM can't do more than some very basic I/O if it ever gets compromised; great for a plugin architecture! This, however, feels like a newer, inefficient, more limited version of Java JARs or dotnet DLLs. Why not compile into a more optimized bytecode format instead? Pretty sure you can generate a C# binary that compiles into a single platform native executable that includes the framework (and all of your dependencies, I believe?). Want a cross platform native app that's even faster? Compile for Windows, bundle Wine! Want the limitations of the Javascript framework? Run the Windows executable in a browser through Boxedwine!
- intelVISA 4y agoLove it, and not wrong. Isn't bytecode typically more performant than this approach?
- survirtual 4y agoI think your judgment is premature. Also, wasm can do a whole lot more than basic I/O? There is a lot of value in a wasm target, especially for universal apps. You can use any language desired and end up with a near native binary that can run anywhere, even the browser. That is powerful, and new. Couple that with a crossplatform GUI and you have an app that can run anywhere with a single codebase. The same app can be extended with any language and another wasm module. If done right, this allows for a maintainable, high-perf, low-friction, universal experience. It is a very desirable, low-compromise tradeoff of near native performance without sacrificing mobility or flexibility. For me personally, using rust targeting wasm is the only way I’m building apps right now. Nothing else comes close and I’ve used almost everything. I’ve waited a long time for this tech stack, and I am very grateful to all the players who made it happen.
- jeroenhd 4y agoWASM itself can't do anything, it needs bridging code to do actual I/O. This is by design and I think that's a good thing security wise. WASM runtimes are just the JVM reimagined, but slightly less capable because of WASM compatibility restrictions. Yes, we have tons of compilers that target WASM now, but there's no technical reason why they can't target the JVM or dotnet runtime instead. GraalVM is proof of this, it has an LLVM runtime that can take LLVM bitcode and run it within the same context as a great many other languages. WASM may have more existing tooling because of people plumbing it directly into browsers but the "write once, run anywhere" concept has been around for decades now. I'm curious what tech stack you're using for cross platform applications, because I honestly haven't seen what the big deal about WASM is other than "Javascript but starting to get fast".
- devcat 4y agoSeems like blog post author is not aware of zig being able to cross-compile c and zig to any platform (and even glibc version) out of box without any additional toolchains
- _6zfa 4y agoThis is mentioned in the first post of the blog post series that is mentioned in the first sentence of the article! The gist is, use `wasmer create-exe --target other-target-triple` to cross-compile with zig (if available) to the targets wasmer compiler backends (llvm, cranelift, and our custom "singlepass" backend) support. Disclaimer: I am the author of those features/git commits.