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_modulesfolder.Generate metadata of the project
Parse system and other modules inside
assembly/palletsdirectory to extract storage entries, calls and constants.Generate files:
metadata.tsContains a function that returns SCALE encoded metadata of the project
dispatcher.tsContains a function that is used to dispatch extrinsic calls of corresponding modules
Build
wasmfile:Compile AS project into
.wasmfile, 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
subsembly compileExamples
# creates new compiled wasm of the runtime in /build directory
subsembly compileAnd the result of this command is reflected in build folder:

Last updated
Was this helpful?