Skip to content

Commit

Permalink
add instructions in doc/building.md
Browse files Browse the repository at this point in the history
  • Loading branch information
martinfouilleul committed Apr 8, 2024
1 parent fa41c80 commit 66ef64a
Showing 1 changed file with 38 additions and 3 deletions.
41 changes: 38 additions & 3 deletions doc/building.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Building

The following instructions are only relevant for those who want to develop the orca runtime or orca cli tool.

### Requirements
## Requirements

All of the installation requirements for regular users also apply for developers, with these additions:

Expand All @@ -11,9 +13,42 @@ All of the installation requirements for regular users also apply for developers
- Xcode command-line tools (Mac only)
- These can be installed with `xcode-select --install`.

### Building
## Building from source


First clone the orca repo: `git clone https://github.com/orca-app/orca.git`

#### Angle and Dawn

Orca depends on Angle for OpenGL ES, and Dawn for WebGPU. You can either build them locally, or grab a precompiled binary built in CI:

- To build locally:
- `cd` to the orca directory
- run `./orcadev build-angle --release`
- run `./orcadev build-dawn --release`

- To use a precompiled binary:
- Go to [https://github.com/orca-app/orca/actions/workflows/build-all.yaml](https://github.com/orca-app/orca/actions/workflows/build-all.yaml)
- Download the artifacts from a previous run.
- On ARM macs, download `angle-mac-arm64` and `dawn-mac-arm64`.
- On Intel macs, download `angle-mac-x64` and `dawn-mac-x64`.
- On Windows, download `angle-windows-x64` and `dawn-windows-x64`.
- Unzip the artifacts and put their content in the `build` directory at the root of the orca repo (you can create that directory if it doesn't exist).

You only need to do this once, until we change the Angle or Dawn versions we depend on.

#### Building Orca

- `cd` to the orca directory and run `./orcadev build` (macOS) or `orcadev build` (Windows)
- If this is the first time you build orca, and you have skipped the previous section, this will print a message telling you you first need to build Angle and Dawn.

#### Installing a dev version of the tooling and SDK

- Inside the repo, run `./orcadev install directory`. This will install a dev version of the tooling and SDK into `directory`.
- Make sure `directory` is in your `PATH` environment variable.

You can then use this dev version normally through the `orca` command line tool.

TODO

### FAQ

Expand Down

0 comments on commit 66ef64a

Please sign in to comment.