A repository for an accordion in web assembly written in rust.
to build the project rust and wasm-pack are required on your machine.
use wasm-pack build --release --target web
to build the project.
create a folder on your webserver and insert the following files (minimum):
- pkg/novinet_wasm_accordion.js
- pkg/novinet_wasm_accordion_bg.js
- pkg/novinet_wasm_accordion_bg.wasm
add this script tag to your html:
<script type="module">
import init, {add_event_listeners_accordion}
from 'url/to/folder/novinet_wasm_accordion.js';
async function run() {
await init();
add_event_listeners_accordion();
}
run();
</script>