Hacker News new | ask | show | jobs
by Xeamek 1058 days ago
>Then writing a web app with backend and frontend in the same efficient language.

How does that work? What i mean specifically is how convenient is it to use js interop in dev time, and not just compile nim to js as a standalone lib?

Can we simply call something like browser API directly from Nim (Or with fairly simple wrapper)?

2 comments

Since Nim compiles to JS and C you just have to tell Nim what is available dn the target language and you can call stuff just as if it was a Nim function. These definitions can be auto generated, and they can live in a package you can simply import.
I think you can just import dom and get access to browser APIs.