schema
stringclasses
471 values
key
stringlengths
0
203
description
stringlengths
0
4.37k
object
stringlengths
2
322k
foxx-manifest.json
name
The name of the Foxx service. This will be shown in the web interface.
{"type": "string"}
foxx-manifest.json
thumbnail
The filename of a thumbnail that will be used alongside the service in the web interface. This should be a JPEG or PNG image that looks good at sizes 50x50 and 160x160.
{"type": "string"}
foxx-manifest.json
version
The version number of the Foxx service. The version number must follow the semantic versioning format. This will be shown in the web interface.
{"type": "string"}
cargo.json
A schema for Cargo.toml.
{"$schema": "http://json-schema.org/draft-07/schema#", "definitions": {"Build": {"anyOf": [{"type": "string"}, {"type": "boolean", "enum": [true, false], "x-taplo": {"docs": {"enumValues": ["Automatically detect the build file (`build.rs`).", "Disable automatic detection of the build file."]}}}], "x-taplo": {"links": {...
cargo.json
Build
The `build` field specifies a file in the package root which is a [build script](https://doc.rust-lang.org/cargo/reference/build-scripts.html) for building native code. More information can be found in the [build script guide](https://doc.rust-lang.org/cargo/reference/build-scripts.html). ```toml [package] # ... buil...
{"anyOf": [{"type": "string"}, {"type": "boolean", "enum": [true, false], "x-taplo": {"docs": {"enumValues": ["Automatically detect the build file (`build.rs`).", "Disable automatic detection of the build file."]}}}], "x-taplo": {"links": {"key": "https://doc.rust-lang.org/cargo/reference/manifest.html#the-build-field"...
cargo.json
Build
Path to the build file.
{"type": "string"}
cargo.json
DebugLevel
The `debug` setting controls the [`-C debuginfo` flag](https://doc.rust-lang.org/rustc/codegen-options/index.html#debuginfo) which controls the amount of debug information included in the compiled binary.
{"enum": [0, 1, 2, true, false, "none", "line-directives-only", "line-tables-only", "limited", "full"], "x-taplo": {"docs": {"enumValues": ["No debug info at all, default for `release` profile", "Debug info without type or variable-level information. Generates more detailed module-level info than `line-tables-only`.", ...
cargo.json
branch
Specify the Git branch to use in case of a [Git dependency](https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#specifying-dependencies-from-git-repositories).
{"type": "string", "x-taplo": {"links": {"key": "https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#specifying-dependencies-from-git-repositories"}}}
cargo.json
default-features
Use the default features of the dependency.
{"type": "boolean", "x-taplo": {"links": {"key": "https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#choosing-features"}}}
cargo.json
features
List of features to activate in the dependency.
{"type": "array", "items": {"type": "string", "x-taplo": {"links": {"key": "https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#choosing-features"}, "plugins": ["crates"], "crates": {"schemas": "feature"}}}, "x-taplo": {"links": {"key": "https://doc.rust-lang.org/cargo/reference/specifying-dependenci...
cargo.json
items
List of features to activate in the dependency.
{"type": "string", "x-taplo": {"links": {"key": "https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#choosing-features"}, "plugins": ["crates"], "crates": {"schemas": "feature"}}}
cargo.json
git
To depend on a library located in a `git` repository, the minimum information you need to specify is the location of the repository with the `git` key: ```toml [dependencies] rand = { git = "https://github.com/rust-lang-nursery/rand" } ``` Cargo will fetch the `git` repository at this location then look for a `Cargo....
{"type": "string", "x-taplo": {"links": {"key": "https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#specifying-dependencies-from-git-repositories"}}}
cargo.json
optional
Mark the dependency as optional. Optional dependencies can be activated through features.
{"type": "boolean", "x-taplo": {"links": {"key": "https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#choosing-features"}}}
cargo.json
package
Specify the name of the package. When writing a `[dependencies]` section in `Cargo.toml` the key you write for a dependency typically matches up to the name of the crate you import from in the code. For some projects, though, you may wish to reference the crate with a different name in the code regardless of how it's ...
{"type": "string", "x-taplo": {"links": {"key": "https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#renaming-dependencies-in-cargotoml"}}}
cargo.json
path
Cargo supports **path dependencies** which are typically sub-crates that live within one repository. Let's start off by making a new crate inside of our `hello_world` package: ```console # inside of hello_world/ $ cargo new hello_utils ``` This will create a new folder `hello_utils` inside of which a `Cargo.toml` and...
{"type": "string", "x-taplo": {"links": {"key": "https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#specifying-path-dependencies"}}}
cargo.json
registry
To specify a dependency from a registry other than [crates.io](https://crates.io), first the registry must be configured in a `.cargo/config.toml` file. See the [registries documentation](https://doc.rust-lang.org/cargo/reference/registries.html) for more information. In the dependency, set the `registry` key to the na...
{"type": "string", "x-taplo": {"links": {"key": "https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#specifying-dependencies-from-other-registries"}}}
cargo.json
rev
Specify the Git revision to use in case of a [Git dependency](https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#specifying-dependencies-from-git-repositories).
{"type": "string", "x-taplo": {"links": {"key": "https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#specifying-dependencies-from-git-repositories"}}}
cargo.json
tag
Specify the Git tag to use in case of a [Git dependency](https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#specifying-dependencies-from-git-repositories).
{"type": "string", "x-taplo": {"links": {"key": "https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#specifying-dependencies-from-git-repositories"}}}
cargo.json
Edition
The `edition` key affects which edition your package is compiled with. Cargo will always generate packages via [`cargo new`](https://doc.rust-lang.org/cargo/commands/cargo-new.html) with the `edition` key set to the latest edition. Setting the `edition` key in `[package]` will affect all targets/crates in the package, ...
{"type": "string", "enum": ["2015", "2018", "2021"], "x-taplo": {"links": {"key": "https://doc.rust-lang.org/stable/edition-guide/introduction.html"}}}
cargo.json
Lto
The `lto` setting controls the [`-C lto` flag](https://doc.rust-lang.org/rustc/codegen-options/index.html#lto) which controls LLVM's [link time optimizations](https://llvm.org/docs/LinkTimeOptimization.html). LTO can produce better optimized code, using whole-program analysis, at the cost of longer linking time. ...
{"enum": ["fat", "thin", "off", true, false], "x-taplo": {"docs": {"enumValues": ["Performs \"fat\" LTO which attempts to perform optimizations across all crates within the dependency graph.", "Performs [\"thin\" LTO](http://blog.llvm.org/2016/06/thinlto-scalable-and-incremental-lto.html). This is similar to \"fat\", b...
cargo.json
Resolver
A different feature resolver algorithm can be used by specifying the resolver version in Cargo.toml like this: [package] name = "my-package" version = "1.0.0" resolver = "2" The version "1" resolver is the original resolver that shipped with Cargo up to version 1.50. The default is "2" if the root package specifies e...
{"type": "string", "enum": ["1", "2"], "x-taplo": {"links": {"key": "https://doc.rust-lang.org/cargo/reference/resolver.html#resolver-versions"}}}
cargo.json
OptLevel
The `opt-level` setting controls the [`-C opt-level` flag](https://doc.rust-lang.org/rustc/codegen-options/index.html#opt-level) which controls the level of optimization. Higher optimization levels may produce faster runtime code at the expense of longer compiler times. Higher levels may also change and rearrange the c...
{"enum": [0, 1, 2, 3, "s", "z"], "x-taplo": {"docs": {"enumValues": ["No optimizations, also turns on [`cfg(debug_assertions)`](https://doc.rust-lang.org/cargo/reference/profiles.html#debug-assertions).", "Basic optimizations.", "Some optimizations.", "All optimizations.", "Optimize for binary size.", "Optimize for bin...
cargo.json
Package
The only fields required by Cargo are [`name`](https://doc.rust-lang.org/cargo/reference/manifest.html#the-name-field) and [`version`](https://doc.rust-lang.org/cargo/reference/manifest.html#the-version-field). If publishing to a registry, the registry may require additional fields. See the notes below and [the publish...
{"type": "object", "required": ["name", "version"], "properties": {"authors": {"anyOf": [{}, {}]}, "autobenches": {"type": "boolean", "x-taplo": {"links": {"key": "https://doc.rust-lang.org/cargo/reference/cargo-targets.html#target-auto-discovery"}}}, "autobins": {"type": "boolean", "x-taplo": {"links": {"key": "https:...
cargo.json
autobenches
Disable automatic discovery of `bench` targets. Disabling automatic discovery should only be needed for specialized situations. For example, if you have a library where you want a *module* named `bin`, this would present a problem because Cargo would usually attempt to compile anything in the `bin` directory as an exe...
{"type": "boolean", "x-taplo": {"links": {"key": "https://doc.rust-lang.org/cargo/reference/cargo-targets.html#target-auto-discovery"}}}
cargo.json
autobins
Disable automatic discovery of `bin` targets. Disabling automatic discovery should only be needed for specialized situations. For example, if you have a library where you want a *module* named `bin`, this would present a problem because Cargo would usually attempt to compile anything in the `bin` directory as an execu...
{"type": "boolean", "x-taplo": {"links": {"key": "https://doc.rust-lang.org/cargo/reference/cargo-targets.html#target-auto-discovery"}}}
cargo.json
autoexamples
Disable automatic discovery of `example` targets. Disabling automatic discovery should only be needed for specialized situations. For example, if you have a library where you want a *module* named `bin`, this would present a problem because Cargo would usually attempt to compile anything in the `bin` directory as an e...
{"type": "boolean", "x-taplo": {"links": {"key": "https://doc.rust-lang.org/cargo/reference/cargo-targets.html#target-auto-discovery"}}}
cargo.json
autotests
Disable automatic discovery of `test` targets. Disabling automatic discovery should only be needed for specialized situations. For example, if you have a library where you want a *module* named `bin`, this would present a problem because Cargo would usually attempt to compile anything in the `bin` directory as an exec...
{"type": "boolean", "x-taplo": {"links": {"key": "https://doc.rust-lang.org/cargo/reference/cargo-targets.html#target-auto-discovery"}}}
cargo.json
default-run
The `default-run` field in the `[package]` section of the manifest can be used to specify a default binary picked by [`cargo run`](https://doc.rust-lang.org/cargo/commands/cargo-run.html). For example, when there is both `src/bin/a.rs` and `src/bin/b.rs`: ```toml [package] default-run = "a" ```
{"type": "string", "x-taplo": {"links": {"key": "https://doc.rust-lang.org/cargo/reference/manifest.html#the-default-run-field"}}}
cargo.json
im-a-teapot
Sets whether the current package is a teapot or something else that is not capable of brewing tea.
{"type": "boolean", "x-taplo": {"hidden": true}}
cargo.json
links
The `links` field specifies the name of a native library that is being linked to. More information can be found in the [`links`](https://doc.rust-lang.org/cargo/reference/build-scripts.html#the-links-manifest-key) section of the build script guide. ```toml [package] # ... links = "foo" ```
{"type": "string", "x-taplo": {"links": {"key": "https://doc.rust-lang.org/cargo/reference/manifest.html#the-links-field"}}}
cargo.json
metadata
Cargo by default will warn about unused keys in `Cargo.toml` to assist in detecting typos and such. The `package.metadata` table, however, is completely ignored by Cargo and will not be warned about. This section can be used for tools which would like to store package configuration in `Cargo.toml`. For example: ```tom...
{"type": "object", "additionalProperties": true, "x-taplo": {"links": {"key": "https://doc.rust-lang.org/cargo/reference/manifest.html#the-metadata-table"}}}
cargo.json
name
The package name is an identifier used to refer to the package. It is used when listed as a dependency in another package, and as the default name of inferred lib and bin targets. The name must use only [alphanumeric](https://doc.rust-lang.org/std/primitive.char.html#method.is_alphanumeric) characters or `-` or `_`, a...
{"type": "string", "x-taplo": {"links": {"key": "https://doc.rust-lang.org/cargo/reference/manifest.html#the-name-field"}}}
cargo.json
workspace
The `workspace` field can be used to configure the workspace that this package will be a member of. If not specified this will be inferred as the first Cargo.toml with `[workspace]` upwards in the filesystem. Setting this is useful if the member is not inside a subdirectory of the workspace root. ```toml [package] # ....
{"type": "string", "x-taplo": {"links": {"key": "https://doc.rust-lang.org/cargo/reference/manifest.html#the-workspace-field"}}}
cargo.json
Panic
The `panic` setting controls the [`-C panic` flag](https://doc.rust-lang.org/rustc/codegen-options/index.html#panic) which controls which panic strategy to use. When set to `"unwind"`, the actual value depends on the default of the target platform. For example, the NVPTX platform does not support unwinding, so it alwa...
{"type": "string", "enum": ["unwind", "abort"], "x-taplo": {"docs": {"enumValues": ["Unwind the stack upon panic.", "Terminate the process upon panic."]}, "links": {"key": "https://doc.rust-lang.org/cargo/reference/profiles.html#panic"}}}
cargo.json
build-dependencies
You can depend on other Cargo-based crates for use in your build scripts. Dependencies are declared through the `build-dependencies` section of the manifest: ```toml [build-dependencies] cc = "1.0.3" ``` The build script **does not** have access to the dependencies listed in the `dependencies` or `dev-dependencies` s...
{"type": "object", "additionalProperties": {}, "x-taplo": {"links": {"key": "https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#build-dependencies"}, "plugins": ["crates"], "crates": {"schemas": "dependencies"}}}
cargo.json
dependencies
Cargo is configured to look for dependencies on [crates.io](https://crates.io) by default. Only the name and a version string are required in this case. In [the cargo guide](https://doc.rust-lang.org/cargo/guide/index.html), we specified a dependency on the `time` crate: ```toml [dependencies] time = "0.1.12" ``` The...
{"type": "object", "additionalProperties": {}, "x-taplo": {"links": {"key": "https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html"}}}
cargo.json
dev-dependencies
The format of `[dev-dependencies]` is equivalent to `[dependencies]`: ```toml [dev-dependencies] tempdir = "0.3" ``` Dev-dependencies are not used when compiling a package for building, but are used for compiling tests, examples, and benchmarks. These dependencies are *not* propagated to other packages which depend ...
{"type": "object", "additionalProperties": {}, "x-taplo": {"links": {"key": "https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#development-dependencies"}, "plugins": ["crates"], "crates": {"schemas": "dependencies"}}}
cargo.json
BuildOverride
Profile settings can be overridden for specific packages and build-time crates. To override the settings for a specific package, use the `package` table to change the settings for the named package: ```toml # The `foo` package will use the -Copt-level=3 flag. [profile.dev.package.foo] opt-level = 3 ``` The package na...
{"type": "object", "allOf": [{}], "x-taplo": {"docs": {"main": "Profile settings can be overridden for specific packages and build-time\ncrates. To override the settings for a specific package, use the `package`\ntable to change the settings for the named package:\n\n```toml\n# The `foo` package will use the -Copt-leve...
cargo.json
codegen-units
The `codegen-units` setting controls the [`-C codegen-units` flag](https://doc.rust-lang.org/rustc/codegen-options/index.html#codegen-units) which controls how many "code generation units" a crate will be split into. More code generation units allows more of a crate to be processed in parallel possibly reducing compile...
{"type": "integer", "format": "uint32", "minimum": 0, "x-taplo": {"links": {"key": "https://doc.rust-lang.org/cargo/reference/profiles.html#codegen-units"}}}
cargo.json
debug-assertions
The `debug-assertions` setting controls the [`-C debug-assertions` flag](https://doc.rust-lang.org/rustc/codegen-options/index.html#debug-assertions) which turns `cfg(debug_assertions)` [conditional compilation](https://doc.rust-lang.org/reference/conditional-compilation.html#debug_assertions) on or off. Debug assertio...
{"type": "boolean", "x-taplo": {"links": {"key": "https://doc.rust-lang.org/cargo/reference/profiles.html#debug-assertions"}}}
cargo.json
incremental
The `incremental` setting controls the [`-C incremental` flag](https://doc.rust-lang.org/rustc/codegen-options/index.html#incremental) which controls whether or not incremental compilation is enabled. Incremental compilation causes `rustc` to to save additional information to disk which will be reused when recompiling ...
{"type": "boolean", "x-taplo": {"links": {"key": "https://doc.rust-lang.org/cargo/reference/profiles.html#incremental"}}}
cargo.json
overflow-checks
The `overflow-checks` setting controls the [`-C overflow-checks` flag](https://doc.rust-lang.org/rustc/codegen-options/index.html#overflow-checks) which controls the behavior of [runtime integer overflow](https://doc.rust-lang.org/reference/expressions/operator-expr.html#overflow). When overflow-checks are enabled, a p...
{"type": "boolean", "x-taplo": {"links": {"key": "https://doc.rust-lang.org/cargo/reference/profiles.html#overflow-checks"}}}
cargo.json
package
Package-specific overrides. The package name is a [Package ID Spec](https://doc.rust-lang.org/cargo/reference/pkgid-spec.html), so you can target individual versions of a package with syntax such as `[profile.dev.package."foo:2.1.0"]`.
{"type": "object", "additionalProperties": {}, "x-taplo": {"links": {"key": "https://doc.rust-lang.org/cargo/reference/profiles.html#overrides"}}}
cargo.json
rpath
The `rpath` setting controls the [`-C rpath` flag](https://doc.rust-lang.org/rustc/codegen-options/index.html#rpath) which controls whether or not [`rpath`](https://en.wikipedia.org/wiki/Rpath) is enabled.
{"type": "boolean", "x-taplo": {"links": {"key": "https://doc.rust-lang.org/cargo/reference/profiles.html#rpath"}}}
cargo.json
Profiles
Profiles provide a way to alter the compiler settings, influencing things like optimizations and debugging symbols. Cargo has 4 built-in profiles: dev, release, test, and bench. It automatically chooses the profile based on which command is being run, the package and target that is being built, and command-line flags ...
{"type": "object", "properties": {"bench": {}, "dev": {}, "release": {}, "test": {}}, "additionalProperties": {}, "x-taplo": {"links": {"key": "https://doc.rust-lang.org/cargo/reference/profiles.html"}}}
cargo.json
Publish
The `publish` field can be used to prevent a package from being published to a package registry (like *crates.io*) by mistake, for instance to keep a package private in a company. ```toml [package] # ... publish = false ``` The value may also be an array of strings which are registry names that are allowed to be publ...
{"anyOf": [{"type": "boolean", "enum": [true, false], "default": true, "x-taplo": {"docs": {"enumValues": ["The package can be published.", "The package cannot be published."]}}}, {"type": "array", "items": {"type": "string"}}], "x-taplo": {"links": {"key": "https://doc.rust-lang.org/cargo/reference/manifest.html#the-p...
cargo.json
Publish
A boolean indicating whether the package can be published.
{"type": "boolean", "enum": [true, false], "default": true, "x-taplo": {"docs": {"enumValues": ["The package can be published.", "The package cannot be published."]}}}
cargo.json
Publish
An array of registry names.
{"type": "array", "items": {"type": "string"}}
cargo.json
Readme
The `readme` field should be the path to a file in the package root (relative to this `Cargo.toml`) that contains general information about the package. This file will be transferred to the registry when you publish. [crates.io](https://crates.io) will interpret it as Markdown and render it on the crate's page. ```tom...
{"anyOf": [{"type": "string"}, {"type": "boolean", "enum": [true, false], "x-taplo": {"docs": {"enumValues": ["Use the `README.md` file.", "Do not use the default `README.md` file"]}}}], "x-taplo": {"links": {"key": "https://doc.rust-lang.org/cargo/reference/manifest.html#the-readme-field"}}}
cargo.json
Readme
The `readme` field should be the path to a file in the package root (relative to this `Cargo.toml`) that contains general information about the package.
{"type": "string"}
cargo.json
SemVer
Cargo bakes in the concept of [Semantic Versioning](https://semver.org/), so make sure you follow some basic rules: * Before you reach 1.0.0, anything goes, but if you make breaking changes, increment the minor version. In Rust, breaking changes include adding fields to structs or variants to enums. * After 1....
{"default": "0.1.0", "type": "string", "format": "semver", "x-taplo": {"links": {"key": "https://doc.rust-lang.org/cargo/reference/manifest.html#the-version-field"}}}
cargo.json
SemVerRequirement
The [version requirement](https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html) of the target dependency.
{"default": "*", "type": "string", "format": "semver-requirement", "x-taplo": {"links": {"key": "https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html"}, "plugins": ["crates"], "crates": {"schemas": "version"}}}
cargo.json
bench
The `bench` field indicates whether or not the target is benchmarked by default by [`cargo bench`](https://doc.rust-lang.org/cargo/commands/cargo-bench.html). The default is `true` for lib, bins, and benchmarks.
{"type": "boolean", "x-taplo": {"links": {"key": "https://doc.rust-lang.org/cargo/reference/cargo-targets.html#the-bench-field"}}}
cargo.json
crate-type
The `crate-type` field defines the [crate types](https://doc.rust-lang.org/reference/linkage.html) that will be generated by the target. It is an array of strings, allowing you to specify multiple crate types for a single target. This can only be specified for libraries and examples. Binaries, tests, and benchmarks are...
{"type": "array", "items": {"type": "string", "x-taplo": {"docs": {"enumValues": ["A runnable executable will be produced. This requires that there is a `main` function in the crate which\nwill be run when the program begins executing. This will link in all Rust and\nnative dependencies, producing a distributable binar...
cargo.json
items
The `crate-type` field defines the [crate types](https://doc.rust-lang.org/reference/linkage.html) that will be generated by the target. It is an array of strings, allowing you to specify multiple crate types for a single target. This can only be specified for libraries and examples. Binaries, tests, and benchmarks are...
{"type": "string", "x-taplo": {"docs": {"enumValues": ["A runnable executable will be produced. This requires that there is a `main` function in the crate which\nwill be run when the program begins executing. This will link in all Rust and\nnative dependencies, producing a distributable binary.", "A Rust library will b...
cargo.json
doc
The `doc` field indicates whether or not the target is included in the documentation generated by [`cargo doc`](https://doc.rust-lang.org/cargo/commands/cargo-doc.html) by default. The default is `true` for libraries and binaries. > **Note**: The binary will be skipped if its name is the same as the lib > target.
{"type": "boolean", "x-taplo": {"links": {"key": "https://doc.rust-lang.org/cargo/reference/cargo-targets.html#the-doc-field"}}}
cargo.json
doctest
The `doctest` field indicates whether or not [documentation examples](https://doc.rust-lang.org/rustdoc/documentation-tests.html) are tested by default by [`cargo test`](https://doc.rust-lang.org/cargo/commands/cargo-test.html). This is only relevant for libraries, it has no effect on other sections. The default is `tr...
{"type": "boolean", "x-taplo": {"links": {"key": "https://doc.rust-lang.org/cargo/reference/cargo-targets.html#the-doctest-field"}}}
cargo.json
harness
The `harness` field indicates that the [`--test` flag](https://doc.rust-lang.org/rustc/command-line-arguments.html#option-test) will be passed to `rustc` which will automatically include the libtest library which is the driver for collecting and running tests marked with the [`#[test]` attribute](https://doc.rust-lang....
{"type": "boolean", "x-taplo": {"links": {"key": "https://doc.rust-lang.org/cargo/reference/cargo-targets.html#the-harness-field"}}}
cargo.json
name
The `name` field specifies the name of the target, which corresponds to the filename of the artifact that will be generated. For a library, this is the crate name that dependencies will use to reference it. For the `[lib]` and the default binary (`src/main.rs`), this defaults to the name of the package, with any dashe...
{"type": "string", "x-taplo": {"links": {"key": "https://doc.rust-lang.org/cargo/reference/cargo-targets.html#the-name-field"}}}
cargo.json
path
The `path` field specifies where the source for the crate is located, relative to the `Cargo.toml` file. If not specified, the [inferred path](https://doc.rust-lang.org/cargo/reference/cargo-targets.html#target-auto-discovery) is used based on the target name.
{"type": "string", "x-taplo": {"links": {"key": "https://doc.rust-lang.org/cargo/reference/cargo-targets.html#the-path-field"}}}
cargo.json
proc-macro
The `proc-macro` field indicates that the library is a [procedural macro](https://doc.rust-lang.org/book/ch19-06-macros.html) ([reference](https://doc.rust-lang.org/reference/procedural-macros.html)). This is only valid for the `[lib]` target.
{"type": "boolean", "x-taplo": {"links": {"key": "https://doc.rust-lang.org/cargo/reference/cargo-targets.html#the-proc-macro-field"}}}
cargo.json
required-features
The `required-features` field specifies which [features](https://doc.rust-lang.org/cargo/reference/features.html) the target needs in order to be built. If any of the required features are not enabled, the target will be skipped. This is only relevant for the `[[bin]]`, `[[bench]]`, `[[test]]`, and `[[example]]` sectio...
{"type": "array", "items": {"type": "string", "x-taplo": {"links": {"key": "https://doc.rust-lang.org/cargo/reference/cargo-targets.html#the-required-features-field"}}}, "x-taplo": {"links": {"key": "https://doc.rust-lang.org/cargo/reference/cargo-targets.html#the-required-features-field"}}}
cargo.json
items
The `required-features` field specifies which [features](https://doc.rust-lang.org/cargo/reference/features.html) the target needs in order to be built. If any of the required features are not enabled, the target will be skipped. This is only relevant for the `[[bin]]`, `[[bench]]`, `[[test]]`, and `[[example]]` sectio...
{"type": "string", "x-taplo": {"links": {"key": "https://doc.rust-lang.org/cargo/reference/cargo-targets.html#the-required-features-field"}}}
cargo.json
test
The `test` field indicates whether or not the target is tested by default by [`cargo test`](https://doc.rust-lang.org/cargo/commands/cargo-test.html). The default is `true` for lib, bins, and tests. > **Note**: Examples are built by [`cargo test`](https://doc.rust-lang.org/cargo/commands/cargo-test.html) by default to...
{"type": "boolean", "x-taplo": {"links": {"key": "https://doc.rust-lang.org/cargo/reference/cargo-targets.html#the-test-field"}}}
cargo.json
Workspace
The `[workspace]` table in `Cargo.toml` defines which packages are members of the workspace: ```toml [workspace] members = ["member1", "path/to/member2", "crates/*"] exclude = ["crates/foo", "path/to/other"] ``` An empty `[workspace]` table can be used with a `[package]` to conveniently create a workspace with the pa...
{"type": "object", "properties": {"default-members": {"type": "array", "items": {"type": "string", "x-taplo": {"links": {"key": "https://doc.rust-lang.org/cargo/reference/workspaces.html#the-workspace-section"}}}, "x-taplo": {"links": {"key": "https://doc.rust-lang.org/cargo/reference/workspaces.html#the-workspace-sect...
cargo.json
default-members
The optional `default-members` key can be specified to set the members to operate on when in the workspace root and the package selection flags are not used: ```toml [workspace] members = ["path/to/member1", "path/to/member2", "path/to/member3/*"] default-members = ["path/to/member2", "path/to/member3/foo"] ``` When ...
{"type": "array", "items": {"type": "string", "x-taplo": {"links": {"key": "https://doc.rust-lang.org/cargo/reference/workspaces.html#the-workspace-section"}}}, "x-taplo": {"links": {"key": "https://doc.rust-lang.org/cargo/reference/workspaces.html#the-workspace-section"}}}
cargo.json
items
The optional `default-members` key can be specified to set the members to operate on when in the workspace root and the package selection flags are not used: ```toml [workspace] members = ["path/to/member1", "path/to/member2", "path/to/member3/*"] default-members = ["path/to/member2", "path/to/member3/foo"] ``` When ...
{"type": "string", "x-taplo": {"links": {"key": "https://doc.rust-lang.org/cargo/reference/workspaces.html#the-workspace-section"}}}
cargo.json
dependencies
The `workspace.dependencies` table is where you define dependencies to be inherited by members of a workspace. Specifying a workspace dependency is similar to [package dependencies](https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html) except: - Dependencies from this table cannot be declared as `opt...
{"type": "object", "additionalProperties": {}, "x-taplo": {"links": {"key": "https://doc.rust-lang.org/cargo/reference/workspaces.html#the-workspace-section"}}}
cargo.json
exclude
The `exclude` key can be used to prevent paths from being included in a workspace. This can be useful if some path dependencies aren't desired to be in the workspace at all, or using a glob pattern and you want to remove a directory.
{"type": "array", "items": {"type": "string", "x-taplo": {"links": {"key": "https://doc.rust-lang.org/cargo/reference/workspaces.html#the-workspace-section"}}}, "x-taplo": {"links": {"key": "https://doc.rust-lang.org/cargo/reference/workspaces.html#the-workspace-section"}}}
cargo.json
items
The `exclude` key can be used to prevent paths from being included in a workspace. This can be useful if some path dependencies aren't desired to be in the workspace at all, or using a glob pattern and you want to remove a directory.
{"type": "string", "x-taplo": {"links": {"key": "https://doc.rust-lang.org/cargo/reference/workspaces.html#the-workspace-section"}}}
cargo.json
members
All [`path` dependencies] residing in the workspace directory automatically become members. Additional members can be listed with the `members` key, which should be an array of strings containing directories with `Cargo.toml` files. The `members` list also supports [globs] to match multiple paths, using typical filena...
{"type": "array", "items": {"type": "string", "x-taplo": {"links": {"key": "https://doc.rust-lang.org/cargo/reference/workspaces.html#the-workspace-section"}}}, "x-taplo": {"links": {"key": "https://doc.rust-lang.org/cargo/reference/workspaces.html#the-workspace-section"}}}
cargo.json
items
All [`path` dependencies] residing in the workspace directory automatically become members. Additional members can be listed with the `members` key, which should be an array of strings containing directories with `Cargo.toml` files. The `members` list also supports [globs] to match multiple paths, using typical filena...
{"type": "string", "x-taplo": {"links": {"key": "https://doc.rust-lang.org/cargo/reference/workspaces.html#the-workspace-section"}}}
cargo.json
metadata
The `workspace.metadata` table is ignored by Cargo and will not be warned about. This section can be used for tools that would like to store workspace configuration in `Cargo.toml`. For example: ```toml [workspace] members = ["member1", "member2"] [workspace.metadata.webcontents] root = "path/to/webproject" tool = ["...
{"type": "object", "additionalProperties": true, "x-taplo": {"links": {"key": "https://doc.rust-lang.org/cargo/reference/workspaces.html#the-workspace-section"}}}
cargo.json
package
The `workspace.package` table is where you define keys that can be inherited by members of a workspace. These keys can be inherited by defining them in the member package with `{key}.workspace = true`. Keys that are supported: | | | |----------------|-----------------| | `authors` ...
{"type": "object", "properties": {"authors": {}, "categories": {}, "documentation": {}, "edition": {}, "exclude": {}, "homepage": {}, "include": {}, "keywords": {}, "license": {}, "license-file": {}, "publish": {}, "readme": {}, "repository": {}, "rust-version": {}, "version": {}}, "x-taplo": {"links": {"key": "https:/...
cargo.json
Authors
The `authors` field lists people or organizations that are considered the "authors" of the package. The exact meaning is open to interpretation — it may list the original or primary authors, current maintainers, or owners of the package. These names will be listed on the crate's page on [crates.io](https://crates.io). ...
{"type": "array", "items": {"type": "string", "x-taplo": {"links": {"key": "https://doc.rust-lang.org/cargo/reference/manifest.html#the-authors-field"}}}, "x-taplo": {"links": {"key": "https://doc.rust-lang.org/cargo/reference/manifest.html#the-authors-field"}}}
cargo.json
items
The `authors` field lists people or organizations that are considered the "authors" of the package. The exact meaning is open to interpretation — it may list the original or primary authors, current maintainers, or owners of the package. These names will be listed on the crate's page on [crates.io](https://crates.io). ...
{"type": "string", "x-taplo": {"links": {"key": "https://doc.rust-lang.org/cargo/reference/manifest.html#the-authors-field"}}}
cargo.json
Categories
The `categories` field is an array of strings of the categories this package belongs to. ```toml categories = ["command-line-utilities", "development-tools::cargo-plugins"] ``` > **Note**: [crates.io](https://crates.io) has a maximum of 5 categories. Each category should > match one of the strings available at https:...
{"type": "array", "items": {"type": "string", "x-taplo": {"links": {"key": "https://doc.rust-lang.org/cargo/reference/manifest.html#the-categories-field"}}}, "x-taplo": {"links": {"key": "https://doc.rust-lang.org/cargo/reference/manifest.html#the-categories-field"}}}
cargo.json
items
The `categories` field is an array of strings of the categories this package belongs to. ```toml categories = ["command-line-utilities", "development-tools::cargo-plugins"] ``` > **Note**: [crates.io](https://crates.io) has a maximum of 5 categories. Each category should > match one of the strings available at https:...
{"type": "string", "x-taplo": {"links": {"key": "https://doc.rust-lang.org/cargo/reference/manifest.html#the-categories-field"}}}
cargo.json
Description
The description is a short blurb about the package. [crates.io](https://crates.io) will display this with your package. This should be plain text (not Markdown). ```toml [package] # ... description = "A short description of my package" ``` > **Note**: [crates.io](https://crates.io) requires the `description` to be se...
{"type": "string", "x-taplo": {"links": {"key": "https://doc.rust-lang.org/cargo/reference/manifest.html#the-description-field"}}}
cargo.json
Documentation
The `documentation` field specifies a URL to a website hosting the crate's documentation. If no URL is specified in the manifest file, [crates.io](https://crates.io) will automatically link your crate to the corresponding [docs.rs](https://docs.rs) page. ```toml [package] # ... documentation = "https://docs.rs/bitfla...
{"type": "string", "x-taplo": {"links": {"key": "https://doc.rust-lang.org/cargo/reference/manifest.html#the-documentation-field"}}}
cargo.json
Exclude
You can explicitly specify that a set of file patterns should be ignored or included for the purposes of packaging. The patterns specified in the `exclude` field identify a set of files that are not included, and the patterns in `include` specify files that are explicitly included. The patterns should be [gitignore](h...
{"type": "array", "items": {"type": "string", "x-taplo": {"links": {"key": "https://doc.rust-lang.org/cargo/reference/manifest.html#the-exclude-and-include-fields"}}}, "x-taplo": {"links": {"key": "https://doc.rust-lang.org/cargo/reference/manifest.html#the-exclude-and-include-fields"}}}
cargo.json
items
You can explicitly specify that a set of file patterns should be ignored or included for the purposes of packaging. The patterns specified in the `exclude` field identify a set of files that are not included, and the patterns in `include` specify files that are explicitly included. The patterns should be [gitignore](h...
{"type": "string", "x-taplo": {"links": {"key": "https://doc.rust-lang.org/cargo/reference/manifest.html#the-exclude-and-include-fields"}}}
cargo.json
Homepage
The `homepage` field should be a URL to a site that is the home page for your package. ```toml [package] # ... homepage = "https://serde.rs/" ```
{"type": "string", "x-taplo": {"links": {"key": "https://doc.rust-lang.org/cargo/reference/manifest.html#the-homepage-field"}}}
cargo.json
Include
You can explicitly specify that a set of file patterns should be ignored or included for the purposes of packaging. The patterns specified in the `exclude` field identify a set of files that are not included, and the patterns in `include` specify files that are explicitly included. The patterns should be [gitignore](h...
{"type": "array", "items": {"type": "string", "x-taplo": {"links": {"key": "https://doc.rust-lang.org/cargo/reference/manifest.html#the-exclude-and-include-fields"}}}, "x-taplo": {"links": {"key": "https://doc.rust-lang.org/cargo/reference/manifest.html#the-exclude-and-include-fields"}}}
cargo.json
items
You can explicitly specify that a set of file patterns should be ignored or included for the purposes of packaging. The patterns specified in the `exclude` field identify a set of files that are not included, and the patterns in `include` specify files that are explicitly included. The patterns should be [gitignore](h...
{"type": "string", "x-taplo": {"links": {"key": "https://doc.rust-lang.org/cargo/reference/manifest.html#the-exclude-and-include-fields"}}}
cargo.json
Keywords
The `keywords` field is an array of strings that describe this package. This can help when searching for the package on a registry, and you may choose any words that would help someone find this crate. ```toml [package] # ... keywords = ["gamedev", "graphics"] ``` > **Note**: [crates.io](https://crates.io) has a maxi...
{"type": "array", "items": {"type": "string", "x-taplo": {"links": {"key": "https://doc.rust-lang.org/cargo/reference/manifest.html#the-keywords-field"}}}, "x-taplo": {"links": {"key": "https://doc.rust-lang.org/cargo/reference/manifest.html#the-keywords-field"}}}
cargo.json
items
The `keywords` field is an array of strings that describe this package. This can help when searching for the package on a registry, and you may choose any words that would help someone find this crate. ```toml [package] # ... keywords = ["gamedev", "graphics"] ``` > **Note**: [crates.io](https://crates.io) has a maxi...
{"type": "string", "x-taplo": {"links": {"key": "https://doc.rust-lang.org/cargo/reference/manifest.html#the-keywords-field"}}}
cargo.json
License
The `license` field contains the name of the software license that the package is released under. [crates.io](https://crates.io/) interprets the `license` field as an [SPDX 2.1 license expression](https://spdx.org/spdx-specification-21-web-version#h.jxpfx0ykyb60). The name must be a known license from the [SPDX licens...
{"type": "string", "x-taplo": {"links": {"key": "https://doc.rust-lang.org/cargo/reference/manifest.html#the-license-and-license-file-fields"}}}
cargo.json
LicenseFile
The `license-file` field contains the path to a file containing the text of the license (relative to this `Cargo.toml`). ```toml [package] # ... license-file = "LICENSE.txt" ``` > **Note**: [crates.io](https://crates.io) requires either `license` or `license-file` to be set.
{"type": "string", "x-taplo": {"links": {"key": "https://doc.rust-lang.org/cargo/reference/manifest.html#the-license-and-license-file-fields"}}}
cargo.json
Repository
The `repository` field should be a URL to the source repository for your package. ```toml [package] # ... repository = "https://github.com/rust-lang/cargo/" ```
{"type": "string", "x-taplo": {"links": {"key": "https://doc.rust-lang.org/cargo/reference/manifest.html#the-repository-field"}}}
cargo.json
RustVersion
The `rust-version` field is an optional key that tells cargo what version of the Rust language and compiler your package can be compiled with. If the currently selected version of the Rust compiler is older than the stated version, cargo will exit with an error, telling the user what version is required. The first ver...
{"type": "string", "x-taplo": {"links": {"key": "https://doc.rust-lang.org/cargo/reference/manifest.html#the-rust-version-field"}}}
cargo.json
WorkspaceInheritance
The `workspace` field allow keys to be inherited by defining them in the member package with `{key}.workspace = true`
{"type": "object", "properties": {"workspace": {"type": "boolean", "enum": [true]}}}
cargo.json
badges
[crates.io](https://crates.io) can display various badges for build status, test coverage, etc. for each crate. All badges are optional. - The badges pertaining to build status that are currently available are Appveyor, CircleCI, Cirrus CI, GitLab, Azure DevOps, Travis CI and Bitbucket Pipelines. - Available badge...
{"type": "object", "additionalProperties": {"type": "object", "additionalProperties": {"type": "string"}}, "x-taplo": {"links": {"key": "https://doc.rust-lang.org/cargo/reference/manifest.html#the-badges-section"}}}
cargo.json
bench
Benchmarks provide a way to test the performance of your code using the [`cargo bench`](https://doc.rust-lang.org/cargo/commands/cargo-bench.html) command. They follow the same structure as [tests](https://doc.rust-lang.org/cargo/reference/cargo-targets.html#tests), with each benchmark function annotated with the `#[be...
{"type": "array", "items": {"x-taplo": {"links": {"key": "https://doc.rust-lang.org/cargo/reference/cargo-targets.html#benchmarks"}}}, "x-taplo": {"links": {"key": "https://doc.rust-lang.org/cargo/reference/cargo-targets.html#benchmarks"}}}
cargo.json
items
Benchmarks provide a way to test the performance of your code using the [`cargo bench`](https://doc.rust-lang.org/cargo/commands/cargo-bench.html) command. They follow the same structure as [tests](https://doc.rust-lang.org/cargo/reference/cargo-targets.html#tests), with each benchmark function annotated with the `#[be...
{"x-taplo": {"links": {"key": "https://doc.rust-lang.org/cargo/reference/cargo-targets.html#benchmarks"}}}
cargo.json
bin
Binary targets are executable programs that can be run after being compiled. The default binary filename is `src/main.rs`, which defaults to the name of the package. Additional binaries are stored in the [`src/bin/` directory](https://doc.rust-lang.org/cargo/guide/project-layout.html). The settings for each binary can ...
{"type": "array", "items": {"x-taplo": {"links": {"key": "https://doc.rust-lang.org/cargo/reference/cargo-targets.html#binaries"}}}, "x-taplo": {"links": {"key": "https://doc.rust-lang.org/cargo/reference/cargo-targets.html#binaries"}}}
cargo.json
items
Binary targets are executable programs that can be run after being compiled. The default binary filename is `src/main.rs`, which defaults to the name of the package. Additional binaries are stored in the [`src/bin/` directory](https://doc.rust-lang.org/cargo/guide/project-layout.html). The settings for each binary can ...
{"x-taplo": {"links": {"key": "https://doc.rust-lang.org/cargo/reference/cargo-targets.html#binaries"}}}
cargo.json
build-dependencies
You can depend on other Cargo-based crates for use in your build scripts. Dependencies are declared through the `build-dependencies` section of the manifest: ```toml [build-dependencies] cc = "1.0.3" ``` The build script **does not** have access to the dependencies listed in the `dependencies` or `dev-dependencies` s...
{"type": "object", "additionalProperties": {}, "x-taplo": {"links": {"key": "https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#build-dependencies"}, "plugins": ["crates"], "crates": {"schemas": "dependencies"}}}
cargo.json
dependencies
Cargo is configured to look for dependencies on [crates.io](https://crates.io) by default. Only the name and a version string are required in this case. In [the cargo guide](https://doc.rust-lang.org/cargo/guide/index.html), we specified a dependency on the `time` crate: ```toml [dependencies] time = "0.1.12" ``` The...
{"type": "object", "additionalProperties": {}, "x-taplo": {"links": {"key": "https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html"}}}
cargo.json
dev-dependencies
The format of `[dev-dependencies]` is equivalent to `[dependencies]`: ```toml [dev-dependencies] tempdir = "0.3" ``` Dev-dependencies are not used when compiling a package for building, but are used for compiling tests, examples, and benchmarks. These dependencies are *not* propagated to other packages which depend ...
{"type": "object", "additionalProperties": {}, "x-taplo": {"links": {"key": "https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#development-dependencies"}, "plugins": ["crates"], "crates": {"schemas": "dependencies"}}}