File tree Expand file tree Collapse file tree 2 files changed +50
-2
lines changed
Expand file tree Collapse file tree 2 files changed +50
-2
lines changed Original file line number Diff line number Diff line change 11![ AS] ( https://avatars1.githubusercontent.com/u/28916798?s=48 ) node
22======================
33
4- Implementations of the node.js APIs using wasi for use with AssemblyScript.
4+ Implementations of the node.js APIs for AssemblyScript, utilizing [ WASI] ( https://wasi.dev ) .
5+
6+ Introduction
7+ ------------
8+
9+ This library aims to provide a convenient node.js-like environment for AssemblyScript programs.
10+ Please note that it is still in its early stages and that both the library and WASI are not even
11+ close to be finalized.
12+
13+ As always, if the idea sounds appealing to you, feel free to improve existing APIs or to contribute
14+ additional ones.
15+
16+ Instructions
17+ ------------
18+
19+ Install the library components as a dependency of your project
20+
21+ ```
22+ $> npm install --save-dev AssemblyScript/node
23+ ```
24+
25+ and include it in your build step to gain access to the implementations it provides:
26+
27+ ```
28+ $> asc --lib ./node_modules/@assemblyscript/node/assembly [...]
29+ ```
30+
31+ Doing so will automatically register common globals like the ` Buffer ` class and enables requiring
32+ for example the filesystem module through ` import * as fs from "fs" ` .
33+
34+ Documentation
35+ -------------
36+
37+ * [ Status and API documentation on the wiki] ( https://github.com/AssemblyScript/node/wiki )
38+ * [ Implementation sources] ( ./assembly )
39+
40+ Building
41+ --------
42+
43+ To run the tests, first make sure that development dependencies are installed, then run:
44+
45+ ```
46+ $> npm test
47+ ```
48+
49+ One of the dependencies is [ node-wasi] ( https://github.com/devsnek/node-wasi ) , which is a native
50+ module. If you are running into issues when compiling it (on Windows), make sure that node-wasi
51+ supports your version of node.js, that your machine can build native modules in the first place
52+ and that your version of npm is recent (` npm install npm@latest -g ` ).
Original file line number Diff line number Diff line change 11{
22 "name" : " @assemblyscript/node" ,
3- "description" : " Implementations of the node.js APIs for use with AssemblyScript ." ,
3+ "description" : " Implementations of the node.js APIs for AssemblyScript, utilizing WASI ." ,
44 "version" : " 0.1.0" ,
55 "license" : " Apache-2.0" ,
66 "types" : " assembly/node.d.ts" ,
You can’t perform that action at this time.
0 commit comments