add README

This commit is contained in:
Cadey Ratio 2018-06-20 08:13:49 -07:00
parent 94352f8bc0
commit c0aa9d1660
4 changed files with 28 additions and 14 deletions

1
.gitignore vendored
View File

@ -1,2 +1,3 @@
*.wasm *.wasm
.tup .tup
build.sh

26
README.md Normal file
View File

@ -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.

View File

@ -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

View File

@ -1,4 +1,4 @@
include_rules 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 : *.go |> vgo build -o %o |> ../../bin/land