MVP #1
8
Makefile
8
Makefile
@ -3,8 +3,8 @@ WABT_DIR := /home/johan/Sources/github.com/WebAssembly/wabt
|
|||||||
WAT2WASM := $(WABT_DIR)/bin/wat2wasm
|
WAT2WASM := $(WABT_DIR)/bin/wat2wasm
|
||||||
WASM2C := $(WABT_DIR)/bin/wasm2c
|
WASM2C := $(WABT_DIR)/bin/wasm2c
|
||||||
|
|
||||||
%.wat: %.py py2wasm/*.py venv/.done
|
%.wat: %.py phasm/*.py venv/.done
|
||||||
venv/bin/python -m py2wasm $< $@
|
venv/bin/python -m phasm $< $@
|
||||||
|
|
||||||
%.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 $@
|
||||||
@ -28,10 +28,10 @@ test: venv/.done
|
|||||||
WAT2WASM=$(WAT2WASM) venv/bin/pytest tests $(TEST_FLAGS)
|
WAT2WASM=$(WAT2WASM) venv/bin/pytest tests $(TEST_FLAGS)
|
||||||
|
|
||||||
lint: venv/.done
|
lint: venv/.done
|
||||||
venv/bin/pylint py2wasm
|
venv/bin/pylint phasm
|
||||||
|
|
||||||
typecheck: venv/.done
|
typecheck: venv/.done
|
||||||
venv/bin/mypy --strict py2wasm
|
venv/bin/mypy --strict phasm
|
||||||
|
|
||||||
venv/.done: requirements.txt
|
venv/.done: requirements.txt
|
||||||
python3.8 -m venv venv
|
python3.8 -m venv venv
|
||||||
|
|||||||
15
README.md
15
README.md
@ -1,5 +1,16 @@
|
|||||||
webasm (python)
|
phasm
|
||||||
===============
|
=====
|
||||||
|
|
||||||
|
Elevator pitch
|
||||||
|
--------------
|
||||||
|
A language that looks like Python, handles like Haskell, and compiles to
|
||||||
|
WebAssembly.
|
||||||
|
|
||||||
|
Naming
|
||||||
|
------
|
||||||
|
- p from python
|
||||||
|
- ha from Haskell
|
||||||
|
- asm from WebAssembly
|
||||||
|
|
||||||
You will need wat2wasm from github.com/WebAssembly/wabt in your path.
|
You will need wat2wasm from github.com/WebAssembly/wabt in your path.
|
||||||
|
|
||||||
|
|||||||
@ -14,8 +14,8 @@ import wasmer_compiler_cranelift
|
|||||||
|
|
||||||
import wasmtime
|
import wasmtime
|
||||||
|
|
||||||
from py2wasm.utils import our_process
|
from phasm.utils import our_process
|
||||||
from py2wasm.compiler import module
|
from phasm.compiler import module
|
||||||
|
|
||||||
DASHES = '-' * 16
|
DASHES = '-' * 16
|
||||||
|
|
||||||
|
|||||||
@ -1,8 +1,7 @@
|
|||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
from py2wasm.utils import our_process
|
from phasm.utils import our_process
|
||||||
|
from phasm.ourlang import StaticError
|
||||||
from py2wasm.ourlang import StaticError
|
|
||||||
|
|
||||||
@pytest.mark.integration_test
|
@pytest.mark.integration_test
|
||||||
@pytest.mark.parametrize('type_', ['i32', 'i64', 'f32', 'f64'])
|
@pytest.mark.parametrize('type_', ['i32', 'i64', 'f32', 'f64'])
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user