docs: add workspace dependencies to reference

This commit is contained in:
LukaDev 2024-11-02 21:15:32 +01:00
parent c7a1b5328c
commit 34929cd386

View file

@ -99,7 +99,6 @@ A list of globs containing the members of this workspace.
href="/guides/workspaces/" href="/guides/workspaces/"
/> />
## `[target]` ## `[target]`
The `[target]` section contains information about the target platform for the The `[target]` section contains information about the target platform for the
@ -372,6 +371,25 @@ foo = { repo = "acme/packages", rev = "main", path = "foo" }
- `path`: The path within the repository to install. If not specified, the root - `path`: The path within the repository to install. If not specified, the root
of the repository is used. of the repository is used.
### Workspace
```toml
[dependencies]
foo = { workspace = "acme/foo", version = "^" }
```
**Workspace dependencies** contain the following fields:
- `workspace`: The name of the package in the workspace.
- `version`: The version requirement for the package. This can be `^`, `*`, `=`,
`~`, or a specific version requirement such as `^1.2.3`.
<LinkCard
title="Workspaces"
description="Learn more about workspace dependencies in pesde."
href="/guides/workspaces/#workspace-dependencies"
/>
## `[peer_dependencies]` ## `[peer_dependencies]`
The `[peer_dependencies]` section contains a list of peer dependencies for the The `[peer_dependencies]` section contains a list of peer dependencies for the