Skip to content

chore(amalgamate): regenerate single-header cjsonx.h with upstream fixes #12

chore(amalgamate): regenerate single-header cjsonx.h with upstream fixes

chore(amalgamate): regenerate single-header cjsonx.h with upstream fixes #12

Workflow file for this run

name: WASM
on:
push:
branches: [ master, main ]
pull_request:
branches: [ master, main ]
jobs:
emscripten:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Emscripten
uses: mymindstorm/setup-emsdk@v14
- name: Compile cjsonx_wasm.js
run: |
# Ensure emcc is available
source emsdk_env.sh || true
emcc js/wasm_wrapper.c -o docs/demo/cjsonx_wasm.js \
-O3 \
-s EXPORTED_FUNCTIONS="['_cjsonx_wasm_parse', '_cjsonx_wasm_get_error', '_cjsonx_wasm_get_error_offset', '_cjsonx_wasm_dump', '_cjsonx_wasm_free', '_malloc', '_free']" \
-s EXPORTED_RUNTIME_METHODS="['ccall', 'cwrap', 'UTF8ToString', 'getValue', 'setValue', 'lengthBytesUTF8', 'stringToUTF8']" \
-s ALLOW_MEMORY_GROWTH=1 \
-Iinclude \
-I.
- name: Verify build artifacts exist
run: |
ls -la docs/demo/cjsonx_wasm.js
ls -la docs/demo/cjsonx_wasm.wasm