Framework for building fast genomics web tools with WebAssembly and WebWorkers
The improvements in v3 are focused on speeding up initialization time:
aioli.worker.js
In v2, Aioli had to download a separate .js
file that contained the WebWorker logic. In v3, that WebWorker logic is embedded directly into the Aioli npm library, so no additional downloads are needed.
config.json
filesIn v2, Aioli downloaded a config.json
file for every tool it initialized. Since this file has only been used to specify WebAssembly features (simd, threads), which are rarely used, these files have been removed. For tools like sandbox.bio/playground that load a lot of tools at once, this means much faster load times!
base
moduleIn v2, Aioli used a mock base module as the main WebAssembly module where all file system operations run. For convenience, this was removed in v3 for the majority of cases, where instead one of the tools is treated as the base module. Only if Aioli can't find any tool with reinit: false
will the base module be required, which is unlikely.
If you're running a tool that needs access to "stdin", you can now set it explicitly using CLI.stdin = "Hello"
before calling the tool of interest.
reinit
that when enabled, reinitializes the Wasm module after every exec (useful if you can't reset the global state between calls to the main()
function)cd
to change working directory of all tools at oncestdout
and stderr
so that printf
statements that don't include a \n
are still returned when we call the exec()
function. For example, in previous Aioli versions, a command like bcftools query -f "%ALT\n"
would work but bcftools query -f "%ALT"
would not return anything until you called another command that output a \n
!samtools index
, which expect the ability to write in the input folder-s MODULARIZE=1
when compiling to WebAssembly so each tool is isolated.See https://github.com/biowasm/biowasm/issues/48 for details.
You can keep using Aioli v1, and the biowasm CDN v1 will remain up for now.
config.json
on cdn.biowasm.com
) and the user does not have SIMD enabled in their browser, Aioli will load the non-SIMD version of the WebAssembly module automatically. In other words, apps using Aioli don't need to do feature detection themselves.