From d32613d9b8cfddd57f950d1ff86a98753374643d Mon Sep 17 00:00:00 2001 From: "Johan B.W. de Vries" Date: Sat, 9 Jul 2022 12:35:32 +0200 Subject: [PATCH] We have a name \o/ --- Makefile | 8 ++++---- README.md | 15 +++++++++++++-- {py2wasm => phasm}/__init__.py | 0 {py2wasm => phasm}/__main__.py | 0 {py2wasm => phasm}/compiler.py | 0 {py2wasm => phasm}/ourlang.py | 0 {py2wasm => phasm}/utils.py | 0 {py2wasm => phasm}/wasm.py | 0 tests/integration/helpers.py | 4 ++-- tests/integration/test_static_checking.py | 5 ++--- 10 files changed, 21 insertions(+), 11 deletions(-) rename {py2wasm => phasm}/__init__.py (100%) rename {py2wasm => phasm}/__main__.py (100%) rename {py2wasm => phasm}/compiler.py (100%) rename {py2wasm => phasm}/ourlang.py (100%) rename {py2wasm => phasm}/utils.py (100%) rename {py2wasm => phasm}/wasm.py (100%) diff --git a/Makefile b/Makefile index 49045bf..80cc868 100644 --- a/Makefile +++ b/Makefile @@ -3,8 +3,8 @@ WABT_DIR := /home/johan/Sources/github.com/WebAssembly/wabt WAT2WASM := $(WABT_DIR)/bin/wat2wasm WASM2C := $(WABT_DIR)/bin/wasm2c -%.wat: %.py py2wasm/*.py venv/.done - venv/bin/python -m py2wasm $< $@ +%.wat: %.py phasm/*.py venv/.done + venv/bin/python -m phasm $< $@ %.wat.html: %.wat 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) lint: venv/.done - venv/bin/pylint py2wasm + venv/bin/pylint phasm typecheck: venv/.done - venv/bin/mypy --strict py2wasm + venv/bin/mypy --strict phasm venv/.done: requirements.txt python3.8 -m venv venv diff --git a/README.md b/README.md index 93683c4..5ab49f7 100644 --- a/README.md +++ b/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. diff --git a/py2wasm/__init__.py b/phasm/__init__.py similarity index 100% rename from py2wasm/__init__.py rename to phasm/__init__.py diff --git a/py2wasm/__main__.py b/phasm/__main__.py similarity index 100% rename from py2wasm/__main__.py rename to phasm/__main__.py diff --git a/py2wasm/compiler.py b/phasm/compiler.py similarity index 100% rename from py2wasm/compiler.py rename to phasm/compiler.py diff --git a/py2wasm/ourlang.py b/phasm/ourlang.py similarity index 100% rename from py2wasm/ourlang.py rename to phasm/ourlang.py diff --git a/py2wasm/utils.py b/phasm/utils.py similarity index 100% rename from py2wasm/utils.py rename to phasm/utils.py diff --git a/py2wasm/wasm.py b/phasm/wasm.py similarity index 100% rename from py2wasm/wasm.py rename to phasm/wasm.py diff --git a/tests/integration/helpers.py b/tests/integration/helpers.py index c1ec6a7..d19c697 100644 --- a/tests/integration/helpers.py +++ b/tests/integration/helpers.py @@ -14,8 +14,8 @@ import wasmer_compiler_cranelift import wasmtime -from py2wasm.utils import our_process -from py2wasm.compiler import module +from phasm.utils import our_process +from phasm.compiler import module DASHES = '-' * 16 diff --git a/tests/integration/test_static_checking.py b/tests/integration/test_static_checking.py index f3de90b..ad43a7c 100644 --- a/tests/integration/test_static_checking.py +++ b/tests/integration/test_static_checking.py @@ -1,8 +1,7 @@ import pytest -from py2wasm.utils import our_process - -from py2wasm.ourlang import StaticError +from phasm.utils import our_process +from phasm.ourlang import StaticError @pytest.mark.integration_test @pytest.mark.parametrize('type_', ['i32', 'i64', 'f32', 'f64'])