diff --git a/.gitignore b/.gitignore index 01c0599..49546f3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ *.wasm .tup +build.sh diff --git a/README.md b/README.md new file mode 100644 index 0000000..69e01e5 --- /dev/null +++ b/README.md @@ -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. diff --git a/build.sh b/build.sh deleted file mode 100755 index 2c3828d..0000000 --- a/build.sh +++ /dev/null @@ -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 diff --git a/cmd/land/Tupfile b/cmd/land/Tupfile index f95548d..51ea52d 100644 --- a/cmd/land/Tupfile +++ b/cmd/land/Tupfile @@ -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