News for hackers. Stuff that matters.
Re:Sneak Peek at WebAssembly Studio by kdma on Saturday June 02, 2018 @01:41PM (#17215528)
Nice video but (unrelated to the IDE) in order to use a printf from js it was necessary to: provide a js emulated syscall to c file that calls another c function that calls back to js again
Re:Sneak Peek at WebAssembly Studio by Q6T46nT668w6i3m on Saturday June 02, 2018 @02:09PM (#17215648)
Yeah, it’s super weird when most people are expecting this to compile into JavaScript running in a browser. Nevertheless, to be fair, this isn’t a C, C++, or Rust to JavaScript compiler-compiler it’s a C, C++, or Rust compiler that targets WebAssembly. I realize this might read as overly pedantic but it explains why it makes sense to the implement the C interface. It’s also a reasonable optimization pass for a mature compiler when it knows that you’re targeting WebAssembly running in a browser.