This repository has been archived on 2023-11-05. You can view files and clone it, but cannot push or open issues or pull requests.
wasm-micro-runtime/samples/workload/bwa/README.md
Wenyong Huang 365ec6360b
Update build scripts and documents of workload samples for wasi-sdk-12.0 (#484)
Update the build scripts of sample workloads (meshoptimizer/bwa/wasm-av1) to use the wasi-sdk-12.0 firstly to build the workload and discard clang-11, as wasi-sdk-12 supports wasi, simd and pthread better. And update the related documents.
Also modify wasm mini loader to sync up with the change of wasm normal loader.

Signed-off-by: Wenyong Huang <wenyong.huang@intel.com>
2020-12-29 14:41:09 +08:00

47 lines
1.1 KiB
Markdown

"bwa" sample introduction
==============
This sample demonstrates how to build [bwa](https://github.com/lh3/bwa) into
WebAssembly with simd support and run it with iwasm.
## Preparation
please refer to [installation instructions](../README.md).
## Build
``` shell
$ mkdir build && cd build
$ cmake ..
$ make
# to verify
$ ls bwa.wasm
```
## Download sample data
Download the bwa-0.7.15 binary package from
[such an address](https://sourceforge.net/projects/bio-bwa/files/bwakit/bwakit-0.7.15_x64-linux.tar.bz2/download),
a sample data file named **hs38DH.fa** will be used later.
If want more data, please refer to http://hgdownload.cse.ucsc.edu/goldenpath/hg19/bigZips/
## Run workload
Firstly please build iwasm with simd support:
``` shell
$ cd <wamr dir>/product-mini/platforms/linux/
$ mkdir build && cd build
$ cmake .. -DWAMR_BUILD_SIMD=1
$ make
```
Then compile wasm file to aot file and run:
``` shell
$ cd <wamr dir>/samples/workload/bwa/build
$ <wamr dir>/wamr-compiler/build/wamrc --enable-simd -o bwa.aot bwa.wasm
$ <wamr dir>/product-mini/platforms/linux/iwasm --dir=. bwa.aot index hs38DH.fa
```