3 ms·
substitute "posix threads" to see why it was written this way. WebAssembly is the platform (aside: and an assembly langauge) that provides WebAssembly threads.
by clord 5y ago
substitute "posix threads" to see why it was written this way.
WebAssembly is the platform (aside: and an assembly langauge) that provides WebAssembly threads. It makes sense to say "use posix threads from C or C++". Posix is underneath whatever language you use.
Saying "running posix threads written in C or C++" seems to suggest that someone is running their own custom threading library in C or C++.
- billconan 5y agoI don't think "use posix threads from C or C++" is a good example, because posix threads are natively available to c and c++. whereas webassembly threads are not. the code has to be compiled into wasm first. That's why I asked if the word "from" was "compiled from or executed from". Yes, wasm is a platform, but c++ runtime can also be a platform. You could build a c++ runtime/compiler into wasm to compile and run c code. Or you could embed a wasm runtime into a c++ program (i.e. the github project I mentioned.) you can run linux vm inside a windows host, or you can run a windows vm inside a linux host, which one is the platform? And what if we say "use posix threads from rust"? I would interpret it as a rust program calling a posix threads, perhaps implemented in c. or a rust program calling a rust crate wrapping posix thread.