Add justfile and ignore out/
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
b8617c7aaa
commit
cb1cec8b13
2 files changed
+34
No files matched your search
@@ -4,3 +4,4 @@ target/
|
|||||||
target
|
target
|
||||||
.mooncakes/
|
.mooncakes/
|
||||||
.moonagent/out/
|
.moonagent/out/
|
||||||
|
/out/
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
exe := "_build/native/debug/build/cmd/main/main.exe"
|
||||||
|
|
||||||
|
# list recipes
|
||||||
|
default:
|
||||||
|
@just --list
|
||||||
|
|
||||||
|
# build the compiler
|
||||||
|
build:
|
||||||
|
moon build --target native
|
||||||
|
|
||||||
|
# type-check only
|
||||||
|
check:
|
||||||
|
moon check
|
||||||
|
|
||||||
|
# compile examples/<name>.wat to out/<name> (a static ELF)
|
||||||
|
compile name: build
|
||||||
|
mkdir -p out
|
||||||
|
wasm-tools parse examples/{{name}}.wat -o out/{{name}}.wasm
|
||||||
|
wasm-tools validate out/{{name}}.wasm
|
||||||
|
{{exe}} out/{{name}}.wasm out/{{name}}
|
||||||
|
|
||||||
|
# compile and run one example
|
||||||
|
run name: (compile name)
|
||||||
|
-./out/{{name}}; echo "exit code: $?"
|
||||||
|
|
||||||
|
# build and run every example
|
||||||
|
examples: build
|
||||||
|
./run_examples.sh
|
||||||
|
|
||||||
|
# remove build output
|
||||||
|
clean:
|
||||||
|
moon clean
|
||||||
|
rm -rf out
|
||||||
Reference in new issue
Block a user