The W3bstream Applet SDK for AssemblyScript is a set of tools and libraries that enable developers to create W3bstream applets using the AssemblyScript programming language.
{% embed url="https://github.com/machinefi/w3bstream-wasm-assemblyscript-sdk#w3bstreamwasm-sdk" %}
Before you can use the W3bstream Applet Kit for AssemblyScript, you need to have the following tools installed on your system:
- Node.js (version 16 or later)
- AssemblyScript (version 0.26.0 or later)
Create an AssemblyScript project
To create an AssemblyScript project, follow these steps:
- Create a new directory for your project:
mkdir my-w3bstream-applet
cd my-w3bstream-applet
- Initialize a new Node.js project:
npm init -y
- Install AssemblyScript as a development dependency:
npm install --save-dev assemblyscript
- initialize the AssemblyScript project:
npx asinit . -y
Once you have created your AssemblyScript project, you can install the W3bstream Applet Kit by running the following command:
npm install @w3bstream/wasm-sdk
When it's time to build your applet, run the following:
npm run asbuild:release
The applet, in the form of a WASM file, is saved to the build
folder.
The source code of the W3bstream Applet Kit for AssemblyScript, including examples, can be found on GitHub at:
{% embed url="https://github.com/machinefi/w3bstream-wasm-assemblyscript-sdk" %}