petersalomonsen / javascriptmusic

A.K.A. WebAssembly Music. Live coding music and synthesis in Javascript / AssemblyScript (WebAssembly)
https://petersalomonsen.com
GNU General Public License v3.0
380 stars 32 forks source link

WASM lib module export #22

Closed petersalomonsen closed 4 years ago

petersalomonsen commented 4 years ago

Add another WASM export mode: library module for use from other WASM modules or from C ( by converting from WASM to C as shown in the gist here: https://gist.github.com/petersalomonsen/58c3d977d35c60bfee58c4f5d19aa9f5 )

For the new export mode, a modal is needed to be able to choose executable WASM or library WASM. Added a generic modal web component using template strings for customizing the modal content, which is part of a showcase (to be written more about in the future) of how to use built-in Web Components technologies instead of a framework like React or Angular.

The javascript song compiler use of eval is replaced with a function created from a string, as eval does not work with rollup (which is to be introduced in the future).