Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update emscripten requirements and WASM CI job #1036

Merged
merged 8 commits into from
Nov 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,10 @@ jobs:
with:
toolchain: stable
profile: minimal
- name: Install Node.js 10.x
- name: Install Node.js 16.x
uses: actions/setup-node@v1
with:
node-version: 10.x
node-version: 16.x
- name: Install Emscripten
run: |
version=$(cat src/wrappers/themis/wasm/emscripten/VERSION)
Expand Down
17 changes: 10 additions & 7 deletions .github/workflows/test-wasm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,11 @@ jobs:
strategy:
matrix:
node-version:
- 10.x # legacy
- 12.x # old LTS
- 14.x # current LTS
- 16.x # current stable
- 12.x # legacy
- 14.x # legacy
- 16.x # legacy
- 18.x # current LTS
- 20.x # current active
fail-fast: false
steps:
- name: Install Node.js ${{ matrix.node-version }}
Expand Down Expand Up @@ -110,9 +111,11 @@ jobs:
strategy:
matrix:
node-version:
- 12.x # old LTS
- 14.x # current LTS
- 16.x # current stable
- 12.x # legacy
- 14.x # legacy
- 16.x # legacy
- 18.x # current LTS
- 20.x # current active
fail-fast: false
env:
# WasmThemis uses promises to handle asynchronous WebAssmebly compilation.
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ _Code:_

- Minimum supported Rust version is now 1.58 ([#977](https://github.com/cossacklabs/themis/pull/977), [#984](https://github.com/cossacklabs/themis/pull/984)).

- **WasmThemis**

- Updated required `emsdk` version to 3.1.47 ([#1036](https://github.com/cossacklabs/themis/pull/1036)).
- WasmThemis now works with Node v18 and v20 ([#1036](https://github.com/cossacklabs/themis/pull/1036)).

- **WebAssembly**

- Node.js v8 is no longer supported ([#901](https://github.com/cossacklabs/themis/pull/901)).
Expand Down
2 changes: 1 addition & 1 deletion src/wrappers/themis/wasm/emscripten/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.0.0
3.1.47
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
["_malloc", "_free"]
6 changes: 4 additions & 2 deletions src/wrappers/themis/wasm/wasmthemis.mk
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,17 @@ WASM_PATH = src/wrappers/themis/wasm
WASM_SRC += $(WASM_PATH)/package.json
WASM_SRC += $(wildcard $(WASM_PATH)/src/*.js)

WASM_RUNTIME = $(abspath $(WASM_PATH)/emscripten/runtime_exports.json)
WASM_PRE_JS = $(abspath $(WASM_PATH)/emscripten/pre.js)
WASM_RUNTIME = $(abspath $(WASM_PATH)/emscripten/runtime_exports.json)
WASM_PRE_JS = $(abspath $(WASM_PATH)/emscripten/pre.js)
WASM_EXPORTED_FUNCTIONS = $(abspath $(WASM_PATH)/emscripten/exported_functions.json)

WASM_PACKAGE = $(BIN_PATH)/wasm-themis.tgz

$(BIN_PATH)/libthemis.js: LDFLAGS += -s EXPORTED_RUNTIME_METHODS=@$(WASM_RUNTIME)
$(BIN_PATH)/libthemis.js: LDFLAGS += -s ALLOW_TABLE_GROWTH
$(BIN_PATH)/libthemis.js: LDFLAGS += -s MODULARIZE=1
$(BIN_PATH)/libthemis.js: LDFLAGS += -s ALLOW_MEMORY_GROWTH=1
$(BIN_PATH)/libthemis.js: LDFLAGS += -s EXPORTED_FUNCTIONS=@$(WASM_EXPORTED_FUNCTIONS)
# FIXME(ilammy, 2020-11-29): rely in EMSCRIPTEN_KEEPALIVE instead of LINKABLE
# For some reason existing EMSCRIPTEN_KEEPALIVE macros do not work and without
# LINKABLE flag wasm-ld ends up stripping *all* Themis functions from "*.wasm"
Expand Down
2 changes: 1 addition & 1 deletion tests/soter/soter_sym_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -605,7 +605,7 @@ static void test_invalid_params(void)
}
}

void run_soter_sym_test()
void run_soter_sym_test(void)
{
testsuite_enter_suite("soter sym");
// testsuite_run_test(soter_sym_test);
Expand Down
2 changes: 1 addition & 1 deletion third_party/boringssl/src
Submodule src updated from 897a2c to a43c76