Skip to content

Latest commit

 

History

History
71 lines (43 loc) · 1.55 KB

File metadata and controls

71 lines (43 loc) · 1.55 KB

AssemblyScript

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.

Reference Docs

{% embed url="https://github.com/machinefi/w3bstream-wasm-assemblyscript-sdk#w3bstreamwasm-sdk" %}

Requirements

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:

  1. Create a new directory for your project:
mkdir my-w3bstream-applet
cd my-w3bstream-applet
  1. Initialize a new Node.js project:
npm init -y
  1. Install AssemblyScript as a development dependency:
npm install --save-dev assemblyscript
  1. initialize the AssemblyScript project:
npx asinit . -y

Installation

Once you have created your AssemblyScript project, you can install the W3bstream Applet Kit by running the following command:

npm install @w3bstream/wasm-sdk

Build

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.

Contribute

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" %}