Emscripten is now a proper package

So far, the emscripten package was a bit of a hack. It relied on a text file ~.emsdkdir in the home directory which contained the directory of the emscripten installation. This was not very nice, because it was hard to build packages for several emscripten versions.

But now, emscripten is a repacked package that installs emscripten into the conda environment. This allows in principle to compile packages for multiple emscripten versions.

Local builds with pixi

Setting up a local build environment for emscripten-forge used to be a very complicated process with many dependencies and many steps. But with the usage of pixi this has become trivial!

# this only needs to be done once
pixi run setup

# thats it! packages can now be built
pixi run build-emscripten-wasm32-pkg recipes/recipes_emscripten/regex

Goodby boa, welcome rattler-build

When emscripten-forge was started, we relied on https://github.com/mamba-org/boa which is a conda-build like tool but using more of mamba then conda. This was always a bit brittle and we had to maintain a fork of boa to make it work with emscripten-wasm32. Testing did not work at all, because test dependencies could only be specified for the target_platform and not for the host_platform, ie only for emscripten-wasm32 and not for linux-64 (or any other host platform). This means there was no sane way to install the "emulators" to run the wasm code on the host platform. Also the error messages were not very helpful and the code was hard to understand.

But then there came rattler-build which is a complete rewrite of boa / conda-build in rust which is faster, has barely any dependencies, and has easy to understand error messages. And to make it even better, test dependencies can be specified for the host platform and the target platform! This means we can now install the pyjs-code-runner which can be used to run wasm in a headless browser.

This allows to have a proper test section in the recipe.yaml file like in the regex recipe:

tests:
  - script: pytester
    requirements:
      build:
        - pytester
      run:
        - pytester-run
    files:
      recipe:
        - test_regex.py

Today we have removed boa support from this repository and are now using only rattler-build.