Skip to content

Commit

Permalink
Compiler optimization level for building WasmThemis (#919)
Browse files Browse the repository at this point in the history
* optimize libthemis.js with compiler

* update package.json for wasm-themis

* Update CHANGELOG.md

Co-authored-by: vixentael <vixentael@users.noreply.github.com>
  • Loading branch information
radetsky and vixentael committed May 24, 2022
1 parent a97973d commit bf70d25
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Expand Up @@ -4,6 +4,10 @@

Changes that are currently in development and have not been released yet.

## [0.14.6](https://github.com/cossacklabs/themis/releases/tag/0.14.6), May 24th 2022

**Reduce WasmThemis binary size x3, by increasing the compiler optimization level for WasmThemis build ([919](https://github.com/cossacklabs/themis/pull/919/)).**

## [0.14.5](https://github.com/cossacklabs/themis/releases/tag/0.14.5), April 14th 2022

**Typescript compatibility issues in WasmThemis**
Expand Down
2 changes: 1 addition & 1 deletion src/wrappers/themis/wasm/package.json
@@ -1,6 +1,6 @@
{
"name": "wasm-themis",
"version": "0.14.5",
"version": "0.14.6",
"description": "Themis is a convenient cryptographic library for data protection.",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion src/wrappers/themis/wasm/wasmthemis.mk
Expand Up @@ -39,7 +39,7 @@ $(BIN_PATH)/libthemis.js: LDFLAGS += -s LINKABLE=1
$(BIN_PATH)/libthemis.js: LDFLAGS += -s ERROR_ON_UNDEFINED_SYMBOLS=0
$(BIN_PATH)/libthemis.js: LDFLAGS += --pre-js $(WASM_PRE_JS)

$(BIN_PATH)/libthemis.js: CMD = $(CC) -o $@ $(filter %.o %a, $^) $(LDFLAGS)
$(BIN_PATH)/libthemis.js: CMD = $(CC) -o $@ $(filter %.o %a, $^) -O3 $(LDFLAGS)

$(BIN_PATH)/libthemis.js: $(THEMIS_STATIC) $(WASM_RUNTIME) $(WASM_PRE_JS)
@mkdir -p $(@D)
Expand Down

0 comments on commit bf70d25

Please sign in to comment.