Skip to content

Latest commit

 

History

History
executable file
·
23 lines (18 loc) · 536 Bytes

README.md

File metadata and controls

executable file
·
23 lines (18 loc) · 536 Bytes

Example: Insertion Sort

Uses: @esmbly/transformer-jsdoc, @esmbly-transformer-wasm, memory

Summary

This example shows how an insertion sort algorithm can be transformed to WebAssembly by chaining @esmbly/transformer-jsdoc and @esmbly/transformer-wasm.

# Input (JavaScript with JSDoc comments)
src/sort.js

# Output (WebAssembly)
dist/sort.wasm

Transforming the example

yarn run esmbly run

Running the tests

yarn test