Skip to content

Commit

Permalink
fixes obsolete documentations about the JS backend (#24263)
Browse files Browse the repository at this point in the history
ref #21849
ref #21613
  • Loading branch information
ringabout authored Oct 8, 2024
1 parent d72b848 commit f73e03b
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions doc/backends.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,20 +87,19 @@ available. This includes:
* OS-specific operations
* threading, coroutines
* some modules of the standard library
* proper 64-bit integer arithmetic

To compensate, the standard library has modules [catered to the JS backend](
lib.html#pure-libraries-modules-for-js-backend)
lib.html#pure-libraries-modules-for-the-javascript-backend)
and more support will come in the future (for instance, Node.js bindings
to get OS info).

To compile a Nim module into a ``.js`` file use the `js`:option: command; the
default is a ``.js`` file that is supposed to be referenced in an ``.html``
file. However, you can also run the code with `nodejs`:idx:
(http://nodejs.org):
(https://nodejs.org):

```cmd
nim js -d:nodejs -r examples/hallo.nim
nim js -r examples/hallo.nim
```

If you experience errors saying that `globalThis` is not defined, be
Expand Down

0 comments on commit f73e03b

Please sign in to comment.