# Install Cargo L1X

**Install Dependencies**

Please make sure to install dependencies based on OS version for smooth cargo installation.

* [Ubuntu](https://l1x-sdk.gitbook.io/l1x-developer-interface/interface-essentials/l1x-vm-sdk/l1x-native-sdk-for-l1x-vm/set-up-environment/installation/install-cargo-l1x/ubuntu-and-windows-wsl)
* [Mac](https://l1x-sdk.gitbook.io/l1x-developer-interface/interface-essentials/l1x-vm-sdk/l1x-native-sdk-for-l1x-vm/set-up-environment/installation/install-cargo-l1x/mac-intel-and-silicon)

**Install Cargo**

Cargo is the package manager for Rust. To install Cargo, use the command below.

```bash
curl https://sh.rustup.rs -sSf | sh
```

This command downloads and runs the Rustup installer script, which includes Cargo along with the Rust compiler and other tools necessary for Rust development.

**Install cargo l1x plugin**

This command fetches the Cargo plugin from the crates.io repository and installs it locally, enabling you to use the `cargo l1x` commands for managing L1X-specific tasks and projects within your Rust development environment.

```bash
cargo install cargo-l1x --force
```

**Create Project**

You can create a new project named "project\_name" within the current directory.

```bash
cargo l1x create project_name
```

**Build Project**

Navigate to the project directory to build the project.

```bash
cd project_name
cargo l1x build
```

This command triggers the build process defined for the project, compiling the source code, resolving dependencies, and generating the executable or output specified by the project configuration. It ensures that the project is ready for execution or deployment, verifying that it compiles without errors and functions as intended.&#x20;

The contract object file is created as the output of this command, at the location target/l1x/release/\<l1x\_contract.o> in cargo.

**Clean Project**

Resets the project directory to its initial state, removing any generated files or temporary artifacts, ensuring a fresh start for development.

```bash
cargo clean
```
