Skip to content
Open
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: 4 additions & 0 deletions .github/workflows/ci-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ jobs:
wget --no-verbose https://github.com/sylabs/singularity/releases/download/v4.2.1/singularity-ce_4.2.1-noble_amd64.deb
sudo apt-get install -y ./singularity-ce_4.2.1-noble_amd64.deb

- name: Set up QuickJS
if: ${{ matrix.step == 'unit' }}
run: sudo apt-get install -y quickjs

- name: Set up Python
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
Expand Down
20 changes: 20 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,26 @@ Using the CWL Parsers
saved_obj = save(cwl_obj)
print(f"Export of the loaded CWL object: {saved_obj}.")

Choosing a JavaScript engine
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

CWL expressions are evaluated with `QuickJS <https://bellard.org/quickjs/>`_
when a usable ``qjs`` executable is found on the ``PATH``, and with Node.js
otherwise (falling back to a ``node:slim`` software container if Node.js is
not installed either). QuickJS starts quickly enough that every evaluation
runs in its own short-lived subprocess; there is no software container
fallback for QuickJS. Setting the ``CWL_JS_ENGINE`` environment variable to
``node`` or ``quickjs`` forces a specific engine.

A specific engine can also be installed programmatically, which takes
precedence over ``CWL_JS_ENGINE``:

.. code:: python

from cwl_utils.sandboxjs import QuickJSEngine, set_js_engine

set_js_engine(QuickJSEngine())

Development
-----------

Expand Down
Loading