|
|
|
|
|
by kjksf
3283 days ago
|
|
It's like asking "is there JavaScript API to JavaScript". WebAssembly is a portable instruction set, a simplified CPU. The main use case for WebAssembly is compiling C/C++ code to that instruction set using emsscripten, which is a clang-based C/C++ compiler that emits WebAssembly modules. Depending on how you look at it, the answer to "is there C API to assembly?" is: a) yes, that's the first API there ever was and it's the main API b) the question doesn't make sense. C/C++ is compiled to WebAssembly, there's no API to it. You could imagine a system that would allow using WebAssembly modules from native C/C++ code, where you would need a C/C++ bridge to executing WebAssembly functions (similar to JavaScript bridge for calling WebAssembly functions), but this is not really why WebAssembly exists |
|