MVP #1

Merged
jbwdevries merged 73 commits from idea_crc32 into master 2022-08-21 12:59:21 +00:00
4 changed files with 7 additions and 3 deletions
Showing only changes of commit eb74c8770d - Show all commits

View File

@ -9,6 +9,9 @@ WASM2C := $(WABT_DIR)/bin/wasm2c
%.wat.html: %.wat %.wat.html: %.wat
venv/bin/pygmentize -l wat -O full -f html $^ -o $@ venv/bin/pygmentize -l wat -O full -f html $^ -o $@
%.py.html: %.py
venv/bin/pygmentize -l py -O full -f html $^ -o $@
%.wasm: %.wat %.wasm: %.wat
$(WAT2WASM) $^ -o $@ $(WAT2WASM) $^ -o $@
@ -18,7 +21,7 @@ WASM2C := $(WABT_DIR)/bin/wasm2c
# %.exe: %.c # %.exe: %.c
# cc $^ -o $@ -I $(WABT_DIR)/wasm2c # cc $^ -o $@ -I $(WABT_DIR)/wasm2c
examples: venv/.done $(subst .py,.wasm,$(wildcard examples/*.py)) $(subst .py,.wat.html,$(wildcard examples/*.py)) examples: venv/.done $(subst .py,.wasm,$(wildcard examples/*.py)) $(subst .py,.wat.html,$(wildcard examples/*.py)) $(subst .py,.py.html,$(wildcard examples/*.py))
venv/bin/python3 -m http.server --directory examples venv/bin/python3 -m http.server --directory examples
test: venv/.done test: venv/.done

1
examples/.gitignore vendored
View File

@ -1,3 +1,4 @@
*.py.html
*.wasm *.wasm
*.wat *.wat
*.wat.html *.wat.html

View File

@ -6,7 +6,7 @@
<body> <body>
<h1>Buffer</h1> <h1>Buffer</h1>
<a href="index.html">List</a> - <a href="buffer.py">Source</a> - <a href="buffer.wat.html">WebAssembly</a> <a href="index.html">List</a> - <a href="buffer.py.html">Source</a> - <a href="buffer.wat.html">WebAssembly</a>
<div style="white-space: pre;" id="results"></div> <div style="white-space: pre;" id="results"></div>

View File

@ -5,7 +5,7 @@
<body> <body>
<h1>Fibonacci</h1> <h1>Fibonacci</h1>
<a href="index.html">List</a> - <a href="fib.py">Source</a> - <a href="fib.wat.html">WebAssembly</a> <a href="index.html">List</a> - <a href="fib.py.html">Source</a> - <a href="fib.wat.html">WebAssembly</a>
<div style="white-space: pre;" id="results"></div> <div style="white-space: pre;" id="results"></div>