Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 44 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,47 @@
![AS](https://avatars1.githubusercontent.com/u/28916798?s=48) node
======================

Implementations of the node.js APIs using wasi for use with AssemblyScript.
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 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 "fs"`.

Documentation
-------------

There is no sophisticated documentation yet but you can [browse the implementations](./assembly)
to find out what's already supported (and what's not).

Building
--------

To run the tests, first make sure that development dependencies are installed, then run:

```
$> npm run test
```
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@assemblyscript/node",
"description": "Implementations of the node.js APIs for use with AssemblyScript.",
"description": "Implementations of the node.js APIs for AssemblyScript, utilizing WASI.",
"version": "0.1.0",
"license": "Apache-2.0",
"types": "assembly/node.d.ts",
Expand Down