Skip to content

Commit bead365

Browse files
authored
add emscripten support
1 parent e0f86a4 commit bead365

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed

.github/workflows/releasebuild.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,41 @@ jobs:
188188
name: artifact-${{ github.job }}-${{ strategy.job-index }}
189189
path: ./wheelhouse/*.whl
190190

191+
build_wheels_pyodide:
192+
name: Build wheels on ubuntu-latest/pyodide
193+
needs: [build_sdist]
194+
runs-on: ubuntu-latest
195+
env:
196+
CIBW_TEST_REQUIRES: pytest hypothesis
197+
CIBW_TEST_COMMAND: pytest {package}/tests
198+
CIBW_PLATFORM: pyodide
199+
CIBW_BUILD_VERBOSITY: 3
200+
201+
steps:
202+
- uses: actions/download-artifact@v4
203+
with:
204+
name: artifact-sdist
205+
path: dist
206+
207+
- uses: actions/setup-python@v5
208+
with:
209+
python-version: "3.12"
210+
211+
- name: Copy wheel
212+
run: cp dist/*.tar.gz rapidfuzz.tar.gz
213+
214+
- name: Build wheel
215+
uses: pypa/[email protected]
216+
with:
217+
package-dir: rapidfuzz.tar.gz
218+
output-dir: wheelhouse
219+
220+
- name: Upload wheels
221+
uses: actions/upload-artifact@v4
222+
with:
223+
name: pyodide-wheel
224+
path: ./wheelhouse/*.whl
225+
191226
deploy-wheels:
192227
if: github.event_name == 'release' && github.event.action == 'published'
193228
needs: [build_wheels_windows, build_wheels_macos, build_wheels_linux, build_sdist]

CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,11 @@ else()
3737
add_compile_options(-Wall -Wextra -pedantic -Wno-psabi)
3838
endif()
3939

40+
if(EMSCRIPTEN)
41+
add_compile_options(-fexceptions)
42+
add_link_options(-fexceptions)
43+
endif()
44+
4045
if(CMAKE_VERSION VERSION_LESS 3.18)
4146
find_package(
4247
Python

0 commit comments

Comments
 (0)