Like in C language for UNIX/Windows macros. Any idea? So by doing this, my compilation for javascript won't throw errors for not having createDir defined.
3)
when not defined(js):
# code for c, cpp, objc backends
else:
# code for the js backend
hi Brotherhood of Nod.
For 2. Is this the tutorial https://github.com/treeform/nim_emscripten_tutorial ?
Nim's closure iterators are basically stackless coroutines and do work very well, but can only yield from within the body of the iterator. They also aren't supported by the js backend, but should work under wasm.
For now, asyncdispatch and asyncjs is probably the best way to do concurrency.
The coro module is an unstable API that hasn't seen much attention recently. It works well under the arc/orc garbage collector
PRs are welcome. With orc becoming the default GC, coroutines are very interesting to look at again.
it will dramatically reduce the compilation time ?
It usually dramatically does reduce the compilation time as much time is spent in the C(++) backend part (plus all of its optimizers) and that result is cached effectively. Further improvements will come when incremental compilation will ship.