'Running Clang in the Browser Using WebAssembly' (wasmer.io) 16
This week (MIT-licensed) WebAssembly runtime Wasmer announced "a major milestone in making any software run with WebAssembly."
The announcement's headline? Running Clang in the browser using WebAssembly... Thanks to the newest release of Wasmer (4.4) and the Wasmer JS SDK (0.8.0) you can now run [compiler front-end] clang anywhere Wasmer runs! This allows compiling C programs from virtually anywhere. Including Javascript and your preferred browser! (we tested Chrome, Safari and Firefox and everything is working like a charm)...
- You can compile C code to WebAssembly easily just using the Wasmer CLI: no toolchains or complex installations needed, install Wasmer and you are ready to go...!
- You can compile C projects directly from JavaScript...!
- We expect online IDEs to start adopting the SDK to allow their users compile and run C programs in the browser....
Do you want to use clang in your Javascript project? Thanks to our newly released Wasmer JS SDK you can do it easily, in both the browser and Node.js/Bun etc... Wasmer's clang can even optimize the file for you automatically using wasm-opt under the hood (Clang automatically detects if wasm-opt is used, and it will be automatically called when optimizing the file). Imagine using Emscripten without needing its toolchain installed — or even better, imagine running Emscripten in the browser.
The announcement looks to a future of compiling native Python libraries, when "any project depending on LLVM can now be easily compiled to WebAssembly..."
"This is the beginning of an awesome journey, we can't wait to see what you create next with this."
The announcement's headline? Running Clang in the browser using WebAssembly... Thanks to the newest release of Wasmer (4.4) and the Wasmer JS SDK (0.8.0) you can now run [compiler front-end] clang anywhere Wasmer runs! This allows compiling C programs from virtually anywhere. Including Javascript and your preferred browser! (we tested Chrome, Safari and Firefox and everything is working like a charm)...
- You can compile C code to WebAssembly easily just using the Wasmer CLI: no toolchains or complex installations needed, install Wasmer and you are ready to go...!
- You can compile C projects directly from JavaScript...!
- We expect online IDEs to start adopting the SDK to allow their users compile and run C programs in the browser....
Do you want to use clang in your Javascript project? Thanks to our newly released Wasmer JS SDK you can do it easily, in both the browser and Node.js/Bun etc... Wasmer's clang can even optimize the file for you automatically using wasm-opt under the hood (Clang automatically detects if wasm-opt is used, and it will be automatically called when optimizing the file). Imagine using Emscripten without needing its toolchain installed — or even better, imagine running Emscripten in the browser.
The announcement looks to a future of compiling native Python libraries, when "any project depending on LLVM can now be easily compiled to WebAssembly..."
"This is the beginning of an awesome journey, we can't wait to see what you create next with this."
ActiveX returns (Score:5, Insightful)
Re:ActiveX returns (Score:5, Insightful)
The tech nerds faith in solving everything with MORE tech features will eventually repeat the mistakes of history again and again... giving us more employment as we repeat the same pointless cycles.
ActiveX, Java Applets, WASM eventually... they'll add the "missing" features like direct browser or OS access. Like how they've optimized javascript to dynamically recompile for speed opened up some vectors. Funny how size and speed go up but we will waste effort and lower security in pursuit of optimizations whose benefit is lost before implementation on new hardware... usually so advertising related software can get more bloated...
We can't have a microkernel OS because of "speed" yet we've lost more speed with tons of less important features. I'll gladly lose some IO performance when I got such a huge boost migrating to SSD. Remember when Windows 98 transitioned to a much better NT based OS and the gamers were holding onto their unstable machines for a higher frame rate?
Re: (Score:2)
Re: (Score:2)
"Any WASM code that runs in a web browser doesn't have access to anything it isn't supposed to. Y'all are just terrified of browsers and javascript without even really knowing why."
Are you that ignorant of history? Browsers are some of the LEAST secure pieces of software in existence.
Sounds like a great platform for viruses (Score:2)
Ooh! Ooh! (Score:2)
Neat! I plan to cross-compile Firefox into WASM so I can run the browser in the browser!
Damn. (Score:2)
You beat me to it.
Re: (Score:2)
Re: (Score:1)
Dawg
Tech is like an onion (Score:2)
So, we can run a virtual machine in the browser which compiles a browser in which any code compiles to run programs like bots and adware and worms.
Yeah, like an onion, it stinks.
I never understood... (Score:2)
...the fascination with running more and more software in a browser.
A browser is a poor OS. There are better choices.
You can hammer in a screw with a wrench if you try hard enough, but it's better to use the proper tool for the job
It's funny (Score:2)
Makes one wonder how it would have gone if they'd acknowledge that that was the plan originally and follo
I hope this never catches on (Score:1)
Re: I hope this never catches on (Score:1)
Never catches on.....Like jit? It was supposed to be a preprossor firmware abstraction.
blast from the past (Score:2)