The decision to include a WebAssembly backend in the GCC codebase was recently approved by the GCC Steering Committee. This backend will enable GCC to compile source code in C/C++ languages into WebAssembly intermediate code. The approval of the delivery of the backend is a general decision, with the specific implementation and acceptance of the code to be determined separately by the review team.
With the inclusion of this backend, developers will be able to utilize GCC for compiling code that can be integrated with JavaScript projects, run in web browsers, executed in Node.js environments, or used to create standalone applications that can run on multiple platforms using the WebAssembly runtime.
The proposed implementation for integration into GCC involves utilizing external dependencies such as wabt for tooling, a WebAssembly libc implementation called wasi-libc, and a linker known as wasm-ld. While the implementation is still in progress, some functionalities like support for debugging information, reference types, tables, exceptions, structuring, and setjump/longjump operations are yet to be fully implemented.