Skip to content

Commit

Permalink
Add workspace section to Anchor.toml reference (coral-xyz#2105)
Browse files Browse the repository at this point in the history
  • Loading branch information
coszio authored and yf-castel committed Aug 15, 2022
1 parent b6b526c commit 0863308
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions docs/src/pages/docs/manifest.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,38 @@ Example:
url = "https://anchor.projectserum.com"
```

## workspace

#### types

Adds a directory where you want the `<idl>.ts` file to be copied when running `anchor build` or `anchor idl parse`. This is helpful when you want to keep this file in version control, like when using it on the frontend, which will probably not have access to the `target` directory generated by anchor.

Example:

```toml
[workspace]
types = "app/src/idl/"
```

#### members

Sets the paths --relative to the `Anchor.toml`--
to all programs in the local
workspace, i.e., the path to the `Cargo.toml` manifest associated with each
program that can be compiled by the `anchor` CLI. For programs using the
standard Anchor workflow, this can be ommitted. For programs not written in Anchor
but still want to publish, this should be added.

Example:

```toml
[workspace]
members = [
"programs/*",
"other_place/my_program"
]
```

## programs

Example:
Expand Down

0 comments on commit 0863308

Please sign in to comment.