Hacker News new | ask | show | jobs
by gouh 2599 days ago
a bit off topic, but I was wondering, can WASI API be used directly from c/c++ without compiling to wasm ? Basically to have native perf but still benefit from the crossplatform APIs that WASI will expose
1 comments

That depends entirely on the implementation (and leaves open the question of ABI and binary file format).
Doesn't WASI defines a sort of ABI (what are the data types, the functions, arguments, return types etc...) ?
Yes, but WASI doesn't define calling convention and binary format, because they are defined by WASM. Your proposed WASI-native would need to define them.
ah okay I see, thanks for your answer