Open bluenote10 opened 5 years ago
@soasme Any plan on supporting js compile in the near future?
I would be interested too. It should not be too difficult, the obstacle should be only module re
which is not available in js backend (depends on PCRE). If sometime ago I would have said we could use jsre
, now I would probably try with nim-regex
, which received a lot of endorsements recently (it might end up in "stdlib" through the bundler and is now accepted - by Araq nonetheless - as the better regular expression module).
On the other hand for JS backend a wrapper for a markdown library (eg markdown-it) would also probably make sense.
I have been looking into module jsre
; the most difficult thing is it has a completely different API with re module. I'll take a look into nim-regex and see if it can solve the problem.
I can see the value nim-markdown can be compiled to javascript as a backend. Will definitely add it to the roadmap.
My plan was to use nim-markdown within a Karax app (js target), but compilations fails with:
It looks like js support is currently blocked by this: https://github.com/nim-lang/Nim/issues/7640