Skip to content

Commit 53b71fc

Browse files
committed
Extend NATIVE_INSTALLATION.md
1 parent a2741e2 commit 53b71fc

File tree

2 files changed

+41
-21
lines changed

2 files changed

+41
-21
lines changed

CAIRO_NATIVE.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Running Cairo Native
2+
3+
<!-- TOC -->
4+
* [Running Cairo Native](#running-cairo-native)
5+
* [Installing Starknet Foundry With Cairo Native Support](#installing-starknet-foundry-with-cairo-native-support)
6+
* [LLVM](#llvm)
7+
* [`ld`](#ld)
8+
* [Linux](#linux)
9+
* [MacOS](#macos)
10+
* [Running Tests](#running-tests)
11+
<!-- TOC -->
12+
13+
## Installing Starknet Foundry With Cairo Native Support
14+
15+
Cairo Native introduces additional dependencies outside of the Rust ecosystem.
16+
17+
### LLVM
18+
19+
LLVM is linked into Starknet Foundry binary, so it doesn't have to be installed separately at the cost an incrased
20+
binary size.
21+
22+
### `ld`
23+
24+
Cairo Native crate makes direct calls to `ld`, which must in turn be installed on the system.
25+
26+
#### Linux
27+
28+
The package `binutils` contains `ld`, install it with package manager relevant to your distribution or build it
29+
from source.
30+
31+
#### MacOS
32+
33+
`ld` is part of the Xcode command line tools. Install it with `xcode-select --install`.
34+
35+
## Running Tests
36+
37+
To run tests run `snforge test --run-native`, without the flag, the execution will still run in the VM.
38+
39+
When running native features that rely on VM trace like test backtrace, profiler, coverage will not work.
40+
Running native enforces the test to run with `sierra-gas` as tracked resource. Tracking vm resources is not possible
41+
with the native execution.

NATIVE_INSTALLATION.md

Lines changed: 0 additions & 21 deletions
This file was deleted.

0 commit comments

Comments
 (0)