Skip to content

Commit

Permalink
add readme for runtime and a make target (#414)
Browse files Browse the repository at this point in the history
  • Loading branch information
edg-l authored Jan 4, 2024
1 parent 16b36c8 commit 82884eb
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,5 @@ corelib

cairo-*.tar
/cairo2
*.dylib
*.so
11 changes: 10 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: usage build book build-dev build-native coverage check test bench bench-ci doc doc-open install clean install-scarb install-scarb-macos build-alexandria
.PHONY: usage build book build-dev build-native coverage check test bench bench-ci doc doc-open install clean install-scarb install-scarb-macos build-alexandria runtime

#
# Environment detection.
Expand Down Expand Up @@ -127,3 +127,12 @@ install-scarb-macos:

build-alexandria:
cd tests/alexandria; scarb build

runtime:
cargo b --release -p cairo-native-runtime
ifeq ($(UNAME), Linux)
cp target/release/libcairo_native_runtime.so .
endif
ifeq ($(UNAME), Darwin)
cp target/release/libcairo_native_runtime.dylib .
endif
14 changes: 14 additions & 0 deletions runtime/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
## The cairo native runtime

This runtime is used automatically when using JIT, but when using AOT, the library needs to be shipped and put in a path where it can be found by a linker.

### Getting the library for use in AOT

```bash
git clone https://github.com/lambdaclass/cairo_native
cd cairo_native
make runtime
ls libcairo_native_runtime.*

# copy it where you need it, such as /usr/local/lib where it will be found by the linker
```

0 comments on commit 82884eb

Please sign in to comment.