aquavm/npm/build_wasm.ps1
Pavel 0ddc44bf52
Npm package (#98)
This commit migrates wasm wrapper from JS SDK into the air interpreter package.

Changes include:

* Adding directory for npm package
* Setting up typescript build pipeline
* Renaming package to air-interpreter
* Fixing CI pipelines to support the new build process
* Fixing issue with memory access violation in wasm wrapper
2021-05-05 15:43:50 +03:00

12 lines
332 B
PowerShell

New-Item -ItemType Directory -Force -Path ./wasm
wasm-pack build ../interpreter --no-typescript --release -d ../npm/wasm
$base64string = [Convert]::ToBase64String([IO.File]::ReadAllBytes('./npm/wasm/aquamarine_client_bg.wasm'))
$data = "// auto-generated
module.exports = `"${base64string}`""
$data | Out-File "./src/wasm.js"