#l1x #build-tool #cargo #template #create #com

build cargo-l1x

L1X build tool

3 releases

0.1.2 Jun 10, 2024
0.1.1 May 2, 2024
0.1.0 Apr 26, 2024

#399 in Build Utils

Apache-2.0

31KB
690 lines

cargo-l1x

L1X build tool

L1X Documentation

https://l1x-sdk.gitbook.io/

Installation

Install dependencies

Ubuntu 23.10

sudo apt install clang llvm-15-dev libpolly-15-dev llvm-17 cmake

Ubuntu 22.04

sudo add-apt-repository 'deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-15 main' && \
(wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - ) && \
sudo apt-get update && \
sudo apt-get install -y clang-15 llvm-15-dev libpolly-15-dev cmake

sudo add-apt-repository 'deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-17 main' && \
(wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - ) && \
sudo apt-get update && \
sudo apt-get install -y llvm-17

Ubuntu 20.04

sudo add-apt-repository 'deb http://apt.llvm.org/focal/ llvm-toolchain-focal-15 main' && \
(wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - ) && \
sudo apt-get update && \
sudo apt-get install -y clang-15 llvm-15-dev libpolly-15-dev cmake

sudo add-apt-repository 'deb http://apt.llvm.org/focal/ llvm-toolchain-focal-17 main' && \
(wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - ) && \
sudo apt-get update && \
sudo apt-get install -y llvm-17

Mac

Install dependencies on Mac

Add a compiler wasm32 target

rustup target add wasm32-unknown-unknown

Install cargo-l1x

cargo install cargo-l1x --force

Usage

Create a project

cargo l1x create some_project

Create a project from a template

cargo l1x create some_project --template ft

List of available templates is here: https://github.com/L1X-Foundation/cargo-l1x-templates

Build the project

cd some_project
cargo l1x build

Clean the project

cargo clean

Help messages

cargo l1x --help
cargo l1x build --help
cargo l1x create --help

Dependencies

~35–53MB
~856K SLoC