https://github.com/assemblyscript/node
Implementations of the node.js APIs for use with AssemblyScript.
https://github.com/assemblyscript/node
assemblyscript nodejs wasi wasm webassembly
Last synced: 3 months ago
JSON representation
Implementations of the node.js APIs for use with AssemblyScript.
- Host: GitHub
- URL: https://github.com/assemblyscript/node
- Owner: AssemblyScript
- License: apache-2.0
- Created: 2019-07-15T16:37:24.000Z (about 6 years ago)
- Default Branch: main
- Last Pushed: 2021-06-01T15:33:35.000Z (over 4 years ago)
- Last Synced: 2025-06-29T07:34:49.157Z (3 months ago)
- Topics: assemblyscript, nodejs, wasi, wasm, webassembly
- Language: TypeScript
- Size: 102 KB
- Stars: 66
- Watchers: 7
- Forks: 10
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
 node
======================Implementations of the node.js APIs for AssemblyScript, utilizing [WASI](https://wasi.dev).
Introduction
------------This library aims to provide a convenient node.js-like environment for AssemblyScript programs.
Please note that it is still in its early stages and that both the library and WASI are not even
close to be finalized.As always, if the idea sounds appealing to you, feel free to improve existing APIs or to contribute
additional ones.Instructions
------------Install the library components as a dependency of your project
```
$> npm install --save-dev AssemblyScript/node
```and include it in your build step to gain access to the implementations it provides:
```
$> asc --lib ./node_modules/@assemblyscript/node/assembly [...]
```Doing so will automatically register common globals like the `Buffer` class and enables requiring
for example the filesystem module through `import * as fs from "fs"`.Documentation
-------------* [Status and API documentation on the wiki](https://github.com/AssemblyScript/node/wiki)
* [Implementation sources](./assembly)Building
--------To run the tests, first make sure that development dependencies are installed, then run:
```
$> npm test
```One of the dependencies is [node-wasi](https://github.com/devsnek/node-wasi), which is a native
module. If you are running into issues when compiling it (on Windows), make sure that node-wasi
supports your version of node.js, that your machine can build native modules in the first place
and that your version of npm is recent (`npm install npm@latest -g`).