Mac (Intel and Silicon)

Overview

This guide outlines the steps to install the L1X Cargo plugin for Mac within the L1X SDK environment. The process includes setting up your environment, installing necessary tools, and configuring Cargo for L1X.

Pre-requisites

Install Homebrew

First, install Homebrew, which is necessary for managing packages on macOS.

/bin/bash -c "$(curl -fsSL <https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh>)"

Install LLVM 15 (WASM to LLVM-IR Dependency by Inkwell)

LLVM version 15 is required, and it can be installed via Homebrew. Note that this is a keg-only version.

brew install llvm@15

Configure Environment Variables for LLVM 17

Since LLVM 15 is keg-only and not symlinked into /opt/homebrew, you'll need to adjust your environment variables to use LLVM 15 explicitly.

Set PATH for LLVM

This ensures that the system uses LLVM 17's binaries.

Configure Compiler and Linker Flags

To use the bundled libc++, set the following LDFLAGS and include directory settings:

Install LLVM 17 (To Build Object File)

LLVM version 17 is required, and it can be installed via Homebrew. Note that this is a keg-only version.

Configure Environment Variables for LLVM 17

Since LLVM 17 is keg-only and not symlinked into /opt/homebrew, you'll need to adjust your environment variables to use LLVM 17 explicitly.

Set PATH for LLVM

This ensures that the system uses LLVM 17's binaries.

Configure Compiler and Linker Flags

To use the bundled libc++, set the following LDFLAGS and include directory settings:

Make LLVM17 as Default

Install Cargo L1X Plugin

The L1X plugin for Cargo is essential for managing L1X-specific tasks in your Rust projects.

Create Project from a Template

Use a template to quickly start a new project with pre-configured settings.

Build Project

Navigate to your project directory and build the project to ensure everything is set up correctly.

In case you have any issues with the above pre-requisites, please install the below dependencies.

Last updated