subsembly compile
Project compilation
Overview
Compiles current Subsembly
project. More specifically it installs the dependencies and generates the required files for the Runtime to support the metadata
interface used by PolkadotJS. Lastly, it compiles the Subsembly
Runtime into the hex encoded wasm
binary file (WASM blob).
Workflow
The workflow of the compile command is following:
Make sure the dependencies are installed by checking
node_modules
folder.Generate metadata of the project
Parse system and other modules inside
assembly/pallets
directory to extract storage entries, calls and constants.Generate files:
metadata.ts
Contains a function that returns SCALE encoded metadata of the project
dispatcher.ts
Contains a function that is used to dispatch extrinsic calls of corresponding modules
Build
wasm
file:Compile AS project into
.wasm
file, hex encode the binary and save it in build directory.
Build folder
AssemblyScript places compiled wasm
files inside the build folder in the root directory. The hex encoded wasm
bytecode of Subsembly
runtime is also placed in the same folder.
Syntax
Examples
And the result of this command is reflected in build folder:
Last updated