diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7cfe2b79..9987bd26 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -60,6 +60,10 @@ jobs: git clean -fdx wasmtime build python download-wasmtime.py darwin x86_64 python setup.py bdist_wheel --plat-name macosx-10-13-x86_64 + - run: | + git clean -fdx wasmtime build + python download-wasmtime.py darwin arm64 + python setup.py bdist_wheel --plat-name macosx-11-0-arm64 - run: | git clean -fdx wasmtime build python download-wasmtime.py win32 x86_64 diff --git a/download-wasmtime.py b/download-wasmtime.py index ea60a217..c5131241 100644 --- a/download-wasmtime.py +++ b/download-wasmtime.py @@ -17,6 +17,8 @@ def main(platform, arch): version = fh.read().strip() if arch == 'AMD64': arch = 'x86_64' + if arch == 'arm64': + arch = 'aarch64' if platform == 'linux': filename = 'wasmtime-v{}-{}-linux-c-api.tar.xz'.format(version, arch) libname = '_libwasmtime.so' diff --git a/setup.py b/setup.py index 5e370ff6..1426e528 100644 --- a/setup.py +++ b/setup.py @@ -39,6 +39,9 @@ extras_require={ 'testing': [ 'coverage', + # remove flake8 once https://github.com/tholo/pytest-flake8/issues/87 is fixed + # and the new version of pytest-flake8 is released + 'flake8==4.0.1', 'pytest', 'pycparser', 'pytest-flake8', diff --git a/wasmtime/_ffi.py b/wasmtime/_ffi.py index 90cf7c77..736c3ca9 100644 --- a/wasmtime/_ffi.py +++ b/wasmtime/_ffi.py @@ -21,6 +21,8 @@ machine = platform.machine() if machine == 'AMD64': machine = 'x86_64' +if machine == 'arm64': + machine = 'aarch64' if machine != 'x86_64' and machine != 'aarch64': raise RuntimeError("unsupported architecture for wasmtime: {}".format(machine))