as2wasm is an Apache Royale tool that transpiles Actionscript (AS3) source code directly to WebAssembly (Wasm) modules. Version 0.1.5 is the latest stable release, part of the Apache Royale 0.9.x series. It enables running legacy Flash/Actionscript applications in modern browsers without the Flash plugin, targeting WebAssembly for near-native performance. Key differentiators: it is the only open-source AS3-to-Wasm transpiler, integrates with the Apache Royale framework for cross-platform UI compilation, and supports both ActionScript 3 and optional SWF input via a separate binary variant. Release cadence follows Apache Royale's quarterly releases.
npm install as2wasmNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates compiling ActionScript files and strings to WebAssembly modules, then instantiating them.
Install the SWF variant: npm install apache-royale-0.9.x-bin-js-swf or use the royale-asjs SWF build.
Replace calls to `compile()` with `compileString()`.
Use dynamic import (e.g., `import('as2wasm')`) in Node.js or configure your bundler for ESM.Use the `memory` option: `compileString(code, { memory: { initial: 256, maximum: 512 } })`.Remove `-as2` or `--as2` flags in compile options; code must be AS3 compliant.
Run `npm install as2wasm` (or `yarn add as2wasm`) in your project root.
Use `compileString()` instead of `compile()`.
Convert octal literals to decimal or hex (e.g., 0777 -> 511 or 0x1FF).
Use ActionScript import statements: `import flash.display.Sprite;`
Increase initial memory size: `compileString(code, { memory: { initial: 512 } })`.