Getting Started

Installing

Prerequisites

AssemblyLift currently requires that you have the Rust toolchain installed. The easiest way to do this is via rustup. In addition to the "default" toolchain targeting your system, you will also need to install the wasm32 toolchain with rustup toolchain install wasm32-unknown-unknown.

Installing the CLI

AssemblyLift provides a Command Line Interface (CLI) called asml. The CLI is primarily responsible for building & deploying your application.
You can install asml using cargo with:
1
$ cargo install assemblylift-cli
Copied!
Running asml help will print the CLI version, as well as a list of commands:
1
$ asml help
2
asml 0.3.0
3
4
USAGE:
5
asml [SUBCOMMAND]
6
7
FLAGS:
8
-h, --help Prints help information
9
-V, --version Prints version information
10
11
SUBCOMMANDS:
12
bind Bind the application to the cloud backend
13
burn Destroy all infrastructure created by 'bind'
14
cast Build the AssemblyLift application
15
help Prints this message or the help of the given subcommand(s)
16
init Initialize a basic AssemblyLift application
17
make Make a new service or function
18
pack Pack artifacts for publishing
19
push Push artifacts to a registry
20
user User authentication & information
Copied!

Getting an AWS Account

The default infrastructure provider for AssemblyLift is AWS Lambda + API Gateway, which require an Amazon AWS account.
Creating an account is free, and both AWS Lambda and Amazon API Gateway are free tier eligible.

Hello World!

You can create a new project with the init command. This will scaffold a basic project structure with a single service, containing a single function.
1
$ asml init --name myapp
2
$ tree myapp
3
myapp
4
├── assemblylift.toml
5
└── services
6
└── my-service
7
├── my-function
8
│   ├── Cargo.toml
9
│   └── src
10
│   └── lib.rs
11
└── service.toml
Copied!
If you like, you can verify everything is working by building the project with cast and then deploying it with bind.

Project Structure

AssemblyLift projects and services are defined in TOML documents called manifests. Each project must have a manifest at the project root called assemblylift.toml, and each service must have a manifest at the service root called service.toml.
Each function is stored in a sub-directory under the service directory. Function directories are structured according to the given programming language.
Last modified 1mo ago