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

Check Emscripten toolchain version for WasmThemis #879

Merged
merged 5 commits into from Nov 24, 2021

Conversation

ilammy
Copy link
Collaborator

@ilammy ilammy commented Nov 24, 2021

Recently we have ran into some issues with building WasmThemis because of Emscripten toolchain mismatch. It seems WasmThemis is pretty heavily dependent on the Emscripten version and might fail to build with anything but the currently supported one. Let's make this official then.

src/wrappers/themis/wasm/emscripten/VERSION file now contains the Emscripten SDK version that's supposed to be used to build WasmThemis. CI can fetch it from there to install the right version. I've taught GitHub Actions to do this. @shadinua, please take care of BuildBot 🙏

Additionally, make wasmthemis command now verifies that current Emscripten version matches the one in the version file and fails the build if they don't agree. There is no escape hatch. Wanna try a different version – edit the VERSION file.

Checklist

  • Change is covered by automated tests
  • The coding guidelines are followed
  • Changelog is updated

Keep around the Emscripten SDK that should be used to build WasmThemis.
This allows to easily verify that you have the right SDK available.
WasmThemis preparation (Emscripen install) needs access to the repo now.
Check out the code before other dependencies are installed.
Instead of hardcoding the expected Emscripten version, use the one
maintained in the repository.
Now that we have everything in place, verify that Emscripten environment
matches the one we expect. "emsdk" command does not support any sort of
"version" query, but the "emcc" binary conveniently includes a version.
Since users might be accustomed to building WasmThemis with whatever
version they have available, make it known that from now on you are
expected to use exactly the version we support. At least, if you're
building WasmThemis via our Makefile.
@ilammy ilammy added infrastructure Automated building and packaging W-WasmThemis 🌐 Wrapper: WasmThemis, JavaScript API, npm packages labels Nov 24, 2021
@ilammy ilammy added this to the 0.14.0 milestone Nov 24, 2021
Copy link
Contributor

@shadinua shadinua left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@ilammy ilammy merged commit c4f6c67 into cossacklabs:master Nov 24, 2021
@ilammy ilammy deleted the wasm-emscripten-version branch November 24, 2021 12:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infrastructure Automated building and packaging W-WasmThemis 🌐 Wrapper: WasmThemis, JavaScript API, npm packages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants