@btc-vision/assemblyscript
v0.29.2
Published
A TypeScript-like language for WebAssembly.
Maintainers
Readme
WARNING: EXPERIMENTAL FORK
This is an experimental fork of AssemblyScript maintained by btc-vision. It includes features that are not yet available in the official AssemblyScript release:
Experimental Features
- Closures - Full closure support with captured variables
- Try-Catch-Finally - Exception handling with try-catch-finally blocks
- Binaryen 125 - Updated to the latest Binaryen version (125.0.0)
- Enhanced Shadow Stack - Improved shadow stack pass for better GC integration
Changes from Upstream
Closure Support
- Closure capture analysis and recompilation logic
Exception Handling
- Try-catch-finally statement support
- Enforced Error type in throw statements
Binaryen Upgrade (123 → 125)
- Updated ExpressionId enum values to match Binaryen 125
- Fixed shadow stack pass timing to handle lazy function compilation
- Moved
compileVisitGlobals/compileVisitMembersafter shadow stack pass - Added iterative shadow stack transformation for newly compiled functions
Installation
npm install @btc-vision/assemblyscriptUsage
This fork is a drop-in replacement for AssemblyScript. Simply replace your import:
{
"dependencies": {
"@btc-vision/assemblyscript": "^0.29.0"
}
}Or if migrating from official AssemblyScript:
npm uninstall assemblyscript
npm install @btc-vision/assemblyscriptThe CLI commands remain the same:
npx asc your-file.ts --outFile output.wasmOriginal README
Development instructions
A development environment can be set up by cloning the repository:
git clone https://github.com/btc-vision/assemblyscript.git
cd assemblyscript
npm install
npm linkThe link step is optional and makes the development instance available globally. The full process is documented as part of the repository:
