add README
This commit is contained in:
parent
94352f8bc0
commit
c0aa9d1660
|
@ -1,2 +1,3 @@
|
|||
*.wasm
|
||||
.tup
|
||||
build.sh
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
# land
|
||||
|
||||
A simple little "land" to run webassembly programs in.
|
||||
|
||||
## Building
|
||||
|
||||
First, install [tup](http://gittup.org/tup/index.html).
|
||||
|
||||
### I have FUSE
|
||||
|
||||
```console
|
||||
$ tup init
|
||||
$ tup
|
||||
```
|
||||
|
||||
### I don't have FUSE
|
||||
|
||||
```console
|
||||
$ tup init
|
||||
$ tup generate build.sh
|
||||
$ ./build.sh
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
Not very usable outside of the tests in `cmd/land` yet :(. All webassembly modules require an exported function main that returns an i32. TODO: argv.
|
13
build.sh
13
build.sh
|
@ -1,13 +0,0 @@
|
|||
#! /bin/sh -e
|
||||
cd "cmd/land"
|
||||
vgo build -o ../../bin/land
|
||||
cd "../../userland/src/lib"
|
||||
node ../../compile.js counter.walt counter.wasm
|
||||
node ../../compile.js memory.walt memory.wasm
|
||||
wat2wasm -o add.wasm add.wast
|
||||
wat2wasm -o env.wasm env.wast
|
||||
wat2wasm -o fileops.wasm fileops.wast
|
||||
wat2wasm -o hello.wasm hello.wast
|
||||
wat2wasm -o writefile.wasm writefile.wast
|
||||
cd "../../.."
|
||||
go test -v ./cmd/land | tee bin/test.log
|
|
@ -1,4 +1,4 @@
|
|||
include_rules
|
||||
|
||||
: *_test.go | testdata/arbint.wasm testdata/struct.wasm |> vgo test -v -cover -race -o %o -c |> ../../bin/%d.test
|
||||
: *_test.go | testdata/arbint.wasm testdata/struct.wasm |> vgo test -v -cover -race -o %o |> ../../bin/%d.test
|
||||
: *.go |> vgo build -o %o |> ../../bin/land
|
||||
|
|
Loading…
Reference in New Issue