MVP #1

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

View File

@ -6,6 +6,9 @@ WASM2C := $(WABT_DIR)/bin/wasm2c
%.wat: %.py py2wasm/*.py venv/.done %.wat: %.py py2wasm/*.py venv/.done
venv/bin/python -m py2wasm $< $@ venv/bin/python -m py2wasm $< $@
%.wat.html: %.wat
venv/bin/pygmentize -l wat -O full -f html $^ -o $@
%.wasm: %.wat %.wasm: %.wat
$(WAT2WASM) $^ -o $@ $(WAT2WASM) $^ -o $@
@ -15,7 +18,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)) examples: venv/.done $(subst .py,.wasm,$(wildcard examples/*.py)) $(subst .py,.wat.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,2 +1,3 @@
*.wasm *.wasm
*.wat *.wat
*.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">WebAssembly</a> <a href="index.html">List</a> - <a href="buffer.py">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">WebAssembly</a> <a href="index.html">List</a> - <a href="fib.py">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>

View File

@ -1,4 +1,5 @@
mypy==0.812 mypy==0.812
pygments==2.12.0
pylint==2.7.4 pylint==2.7.4
pytest==6.2.2 pytest==6.2.2
pytest-integration==0.2.2 pytest-integration==0.2.2