From 505a166366489a651746867e938c0fc2d2a008e1 Mon Sep 17 00:00:00 2001 From: Isaac Neuhaus Date: Tue, 15 Sep 2026 17:13:20 -0400 Subject: [PATCH 1/4] Add CanvasXpress figure + cxplot schemas (#6305) * Add CanvasXpress figure + cxplot schemas * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * catalog: drop trailing periods from CanvasXpress descriptions (validate rule) --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- src/api/json/catalog.json | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/api/json/catalog.json b/src/api/json/catalog.json index f4b07a9534c..175a8fcb088 100644 --- a/src/api/json/catalog.json +++ b/src/api/json/catalog.json @@ -1634,6 +1634,18 @@ ], "url": "https://raw.githubusercontent.com/usecannon/cannon/main/packages/lsp/src/schema.json" }, + { + "name": "CanvasXpress cxplot", + "description": "CanvasXpress materialized grammar-of-graphics figure (layers, scales, coordinates, facets)", + "fileMatch": ["*.cxplot.json"], + "url": "https://www.canvasxpress.org/schema/cxplot-1.0.schema.json" + }, + { + "name": "CanvasXpress figure", + "description": "Portable, self-describing CanvasXpress figure ({data, config}): a reproducible chart interchange format", + "fileMatch": ["*.cxfigure.json", "*.cx.json"], + "url": "https://www.canvasxpress.org/schema/cxfigure-1.0.schema.json" + }, { "name": "Carafe", "description": "Carafe compatible JavaScript Bundles", From 8b994c014937a9332f2fb53d993eb1a30705677c Mon Sep 17 00:00:00 2001 From: Kaj Kowalski Date: Tue, 15 Sep 2026 23:15:42 +0200 Subject: [PATCH 2/4] fix(github-workflow): reject read access for id-token (#6358) --- .../github-workflow/permissions-id-token-read.yaml | 9 +++++++++ .../permissions-job-id-token-read.yaml | 9 +++++++++ src/schemas/json/github-workflow.json | 3 ++- src/test/github-workflow/permissions-id-token.yaml | 11 +++++++++++ 4 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 src/negative_test/github-workflow/permissions-id-token-read.yaml create mode 100644 src/negative_test/github-workflow/permissions-job-id-token-read.yaml create mode 100644 src/test/github-workflow/permissions-id-token.yaml diff --git a/src/negative_test/github-workflow/permissions-id-token-read.yaml b/src/negative_test/github-workflow/permissions-id-token-read.yaml new file mode 100644 index 00000000000..a16f0bcd8c3 --- /dev/null +++ b/src/negative_test/github-workflow/permissions-id-token-read.yaml @@ -0,0 +1,9 @@ +# yaml-language-server: $schema=../../schemas/json/github-workflow.json +on: push +permissions: + id-token: read +jobs: + example: + runs-on: ubuntu-latest + steps: + - run: echo example diff --git a/src/negative_test/github-workflow/permissions-job-id-token-read.yaml b/src/negative_test/github-workflow/permissions-job-id-token-read.yaml new file mode 100644 index 00000000000..6bcb6281cc6 --- /dev/null +++ b/src/negative_test/github-workflow/permissions-job-id-token-read.yaml @@ -0,0 +1,9 @@ +# yaml-language-server: $schema=../../schemas/json/github-workflow.json +on: push +jobs: + example: + runs-on: ubuntu-latest + permissions: + id-token: read + steps: + - run: echo example diff --git a/src/schemas/json/github-workflow.json b/src/schemas/json/github-workflow.json index 3377945f3b6..aee6350228d 100644 --- a/src/schemas/json/github-workflow.json +++ b/src/schemas/json/github-workflow.json @@ -267,7 +267,8 @@ "$ref": "#/definitions/permissions-level" }, "id-token": { - "$ref": "#/definitions/permissions-level" + "type": "string", + "enum": ["write", "none"] }, "issues": { "$ref": "#/definitions/permissions-level" diff --git a/src/test/github-workflow/permissions-id-token.yaml b/src/test/github-workflow/permissions-id-token.yaml new file mode 100644 index 00000000000..a531015bd70 --- /dev/null +++ b/src/test/github-workflow/permissions-id-token.yaml @@ -0,0 +1,11 @@ +# yaml-language-server: $schema=../../schemas/json/github-workflow.json +on: push +permissions: + id-token: none +jobs: + example: + runs-on: ubuntu-latest + permissions: + id-token: write + steps: + - run: echo example From e4130c6bf3b3550a25285a5ba6830bc9c1b9247c Mon Sep 17 00:00:00 2001 From: Kaj Kowalski Date: Wed, 16 Sep 2026 01:09:33 +0200 Subject: [PATCH 3/4] Add Cargo configuration schema (#6361) * feat: add Cargo configuration schema * test(cargo-config): add upstream project configurations --- src/api/json/catalog.json | 6 + .../cargo-config/conflicting-source.toml | 4 + src/negative_test/cargo-config/jobs-type.toml | 3 + .../cargo-config/negative-timeout.toml | 3 + src/schemas/json/cargo-config.json | 3251 +++++++++++++++++ src/test/cargo-config/cargo.toml | 13 + src/test/cargo-config/config.toml | 25 + src/test/cargo-config/deno.toml | 76 + src/test/cargo-config/inherited.toml | 6 + src/test/cargo-config/rust-analyzer.toml | 18 + src/test/cargo-config/servo.toml | 38 + src/test/cargo-config/unstable.toml | 13 + src/test/cargo-config/zed.toml | 48 + 13 files changed, 3504 insertions(+) create mode 100644 src/negative_test/cargo-config/conflicting-source.toml create mode 100644 src/negative_test/cargo-config/jobs-type.toml create mode 100644 src/negative_test/cargo-config/negative-timeout.toml create mode 100644 src/schemas/json/cargo-config.json create mode 100644 src/test/cargo-config/cargo.toml create mode 100644 src/test/cargo-config/config.toml create mode 100644 src/test/cargo-config/deno.toml create mode 100644 src/test/cargo-config/inherited.toml create mode 100644 src/test/cargo-config/rust-analyzer.toml create mode 100644 src/test/cargo-config/servo.toml create mode 100644 src/test/cargo-config/unstable.toml create mode 100644 src/test/cargo-config/zed.toml diff --git a/src/api/json/catalog.json b/src/api/json/catalog.json index 175a8fcb088..99bce3325dd 100644 --- a/src/api/json/catalog.json +++ b/src/api/json/catalog.json @@ -1655,6 +1655,12 @@ "draft-01": "https://carafe.fm/schema/draft-01/bundle.schema.json" } }, + { + "name": "Cargo Config", + "description": "Configuration for Cargo, the Rust package manager and build tool", + "fileMatch": ["**/.cargo/config", "**/.cargo/config.toml"], + "url": "https://www.schemastore.org/cargo-config.json" + }, { "name": "Cargo Manifest", "description": "Manifest for Cargo, the Rust package manager and build tool", diff --git a/src/negative_test/cargo-config/conflicting-source.toml b/src/negative_test/cargo-config/conflicting-source.toml new file mode 100644 index 00000000000..e5525a24d76 --- /dev/null +++ b/src/negative_test/cargo-config/conflicting-source.toml @@ -0,0 +1,4 @@ +#:schema ../../schemas/json/cargo-config.json +[source.vendor] +directory = "vendor" +git = "https://example.com/repo" diff --git a/src/negative_test/cargo-config/jobs-type.toml b/src/negative_test/cargo-config/jobs-type.toml new file mode 100644 index 00000000000..d0f8ab162b1 --- /dev/null +++ b/src/negative_test/cargo-config/jobs-type.toml @@ -0,0 +1,3 @@ +#:schema ../../schemas/json/cargo-config.json +[build] +jobs = "4" diff --git a/src/negative_test/cargo-config/negative-timeout.toml b/src/negative_test/cargo-config/negative-timeout.toml new file mode 100644 index 00000000000..ae32ecf1d46 --- /dev/null +++ b/src/negative_test/cargo-config/negative-timeout.toml @@ -0,0 +1,3 @@ +#:schema ../../schemas/json/cargo-config.json +[http] +timeout = -1 diff --git a/src/schemas/json/cargo-config.json b/src/schemas/json/cargo-config.json new file mode 100644 index 00000000000..24d8548bcca --- /dev/null +++ b/src/schemas/json/cargo-config.json @@ -0,0 +1,3251 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "https://www.schemastore.org/cargo-config.json", + "$comment": "Adapted from https://github.com/kjanat/cargo-config-schema/tree/19e81de1b99b7026d1df11ec1fd02a1a308eb588 (MIT), on 2026-09-15. Audited against Cargo cc5596f058e623d22be718adf541a9bd766d9417. Unstable options are labelled; partial inherited configurations are supported.\n\nMIT License\n\nCopyright (c) 2026 Kaj Kowalski\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.", + "title": "cargo configuration", + "description": "Configuration for Cargo, the Rust package manager and build tool\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/config.html)", + "type": "object", + "x-tombi-toml-version": "v1.0.0", + "x-tombi-string-formats": ["uri", "uri-reference"], + "x-tombi-table-keys-order": { + "properties": "schema" + }, + "x-taplo": { + "links": { + "key": "https://doc.rust-lang.org/cargo/reference/config.html" + }, + "initKeys": ["build", "target", "registries"] + }, + "examples": [ + { + "build": { + "jobs": 4, + "target": "x86_64-unknown-linux-gnu", + "rustflags": ["-C", "target-cpu=native"] + }, + "term": { + "color": "auto", + "progress": { + "when": "auto" + } + } + }, + { + "include": [ + "shared.toml", + { + "path": "local-overrides.toml", + "optional": true + } + ], + "env": { + "OPENSSL_DIR": { + "value": "vendor/openssl", + "relative": true + }, + "RUST_LOG": "info" + } + }, + { + "registries": { + "my-registry": { + "index": "https://example.com/git/index", + "credential-provider": "cargo:token" + }, + "crates-io": { + "protocol": "sparse" + } + }, + "registry": { + "default": "my-registry", + "global-credential-providers": ["cargo:token"] + } + }, + { + "target": { + "x86_64-unknown-linux-gnu": { + "linker": "clang", + "runner": ["qemu-x86_64", "-L", "/usr/x86_64-linux-gnu"], + "rustflags": ["-C", "link-arg=-fuse-ld=lld"] + }, + "thumbv7m-none-eabi": { + "linker": "arm-none-eabi-gcc" + } + } + } + ], + "properties": { + "include": { + "description": "Additional Cargo configuration files to include. Paths are relative to the including configuration file and must end with .toml.\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/config.html#include)", + "type": "array", + "items": { + "$ref": "#/definitions/includeEntry" + } + }, + "paths": { + "description": "Local package paths used as dependency overrides.\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/config.html#paths)", + "type": "array", + "items": { + "type": "string" + }, + "examples": [["../local-crate"], ["/path/to/override"]] + }, + "alias": { + "$ref": "#/definitions/alias" + }, + "build": { + "$ref": "#/definitions/build" + }, + "cache": { + "$ref": "#/definitions/cache" + }, + "cargo-new": { + "$ref": "#/definitions/cargoNew" + }, + "credential-alias": { + "$ref": "#/definitions/credentialAlias" + }, + "doc": { + "$ref": "#/definitions/doc" + }, + "env": { + "$ref": "#/definitions/env" + }, + "future-incompat-report": { + "$ref": "#/definitions/futureIncompatReport" + }, + "http": { + "$ref": "#/definitions/http" + }, + "install": { + "$ref": "#/definitions/install" + }, + "net": { + "$ref": "#/definitions/net" + }, + "patch": { + "$ref": "#/definitions/patch" + }, + "profile": { + "$ref": "#/definitions/profiles" + }, + "registries": { + "$ref": "#/definitions/registries" + }, + "registry": { + "$ref": "#/definitions/registry" + }, + "resolver": { + "$ref": "#/definitions/resolver" + }, + "source": { + "$ref": "#/definitions/sources" + }, + "target": { + "$ref": "#/definitions/targets" + }, + "term": { + "$ref": "#/definitions/term" + }, + "target-applies-to-host": { + "type": "boolean", + "description": "UNSTABLE: Apply target settings to host builds; requires -Z target-applies-to-host." + }, + "path-bases": { + "type": "object", + "description": "UNSTABLE: Named path bases; requires path-bases support.", + "additionalProperties": { + "type": "string" + }, + "x-tombi-table-keys-order": { + "additionalProperties": "ascending" + } + }, + "publish": { + "type": "object", + "description": "UNSTABLE: Publish settings; timeout requires -Z publish-timeout.", + "properties": { + "timeout": { + "type": "integer", + "minimum": 0 + } + }, + "x-tombi-table-keys-order": { + "properties": "schema" + } + }, + "host": { + "$ref": "#/definitions/hostConfig", + "description": "UNSTABLE: Host platform overrides; requires -Z host-config and -Z target-applies-to-host." + }, + "unstable": { + "type": "object", + "description": "Nightly feature switches. Stable Cargo does not enable these. Pinned to cc5596f058e623d22be718adf541a9bd766d9417", + "properties": { + "allow-features": { + "type": "array", + "items": { + "type": "string" + }, + "description": "UNSTABLE: allow-features. See\n\n[Cargo source](https://github.com/rust-lang/cargo/blob/cc5596f058e623d22be718adf541a9bd766d9417/src/workspace/features.rs)" + }, + "embed-metadata": { + "type": "boolean", + "description": "UNSTABLE: embed-metadata. See\n\n[Cargo source](https://github.com/rust-lang/cargo/blob/cc5596f058e623d22be718adf541a9bd766d9417/src/workspace/features.rs)" + }, + "print-im-a-teapot": { + "type": "boolean", + "description": "UNSTABLE: print-im-a-teapot. See\n\n[Cargo source](https://github.com/rust-lang/cargo/blob/cc5596f058e623d22be718adf541a9bd766d9417/src/workspace/features.rs)" + }, + "advanced-env": { + "type": "boolean", + "description": "UNSTABLE: advanced-env. See\n\n[Cargo source](https://github.com/rust-lang/cargo/blob/cc5596f058e623d22be718adf541a9bd766d9417/src/workspace/features.rs)" + }, + "any-build-script-metadata": { + "type": "boolean", + "description": "UNSTABLE: any-build-script-metadata. See\n\n[Cargo source](https://github.com/rust-lang/cargo/blob/cc5596f058e623d22be718adf541a9bd766d9417/src/workspace/features.rs)" + }, + "asymmetric-token": { + "type": "boolean", + "description": "UNSTABLE: asymmetric-token. See\n\n[Cargo source](https://github.com/rust-lang/cargo/blob/cc5596f058e623d22be718adf541a9bd766d9417/src/workspace/features.rs)" + }, + "avoid-dev-deps": { + "type": "boolean", + "description": "UNSTABLE: avoid-dev-deps. See\n\n[Cargo source](https://github.com/rust-lang/cargo/blob/cc5596f058e623d22be718adf541a9bd766d9417/src/workspace/features.rs)" + }, + "binary-dep-depinfo": { + "type": "boolean", + "description": "UNSTABLE: binary-dep-depinfo. See\n\n[Cargo source](https://github.com/rust-lang/cargo/blob/cc5596f058e623d22be718adf541a9bd766d9417/src/workspace/features.rs)" + }, + "bindeps": { + "type": "boolean", + "description": "UNSTABLE: bindeps. See\n\n[Cargo source](https://github.com/rust-lang/cargo/blob/cc5596f058e623d22be718adf541a9bd766d9417/src/workspace/features.rs)" + }, + "build-analysis": { + "type": "boolean", + "description": "UNSTABLE: build-analysis. See\n\n[Cargo source](https://github.com/rust-lang/cargo/blob/cc5596f058e623d22be718adf541a9bd766d9417/src/workspace/features.rs)" + }, + "build-dir-new-layout": { + "type": "boolean", + "description": "UNSTABLE: build-dir-new-layout. See\n\n[Cargo source](https://github.com/rust-lang/cargo/blob/cc5596f058e623d22be718adf541a9bd766d9417/src/workspace/features.rs)" + }, + "build-std": { + "type": "array", + "items": { + "type": "string" + }, + "description": "UNSTABLE: build-std. See\n\n[Cargo source](https://github.com/rust-lang/cargo/blob/cc5596f058e623d22be718adf541a9bd766d9417/src/workspace/features.rs)" + }, + "build-std-features": { + "type": "array", + "items": { + "type": "string" + }, + "description": "UNSTABLE: build-std-features. See\n\n[Cargo source](https://github.com/rust-lang/cargo/blob/cc5596f058e623d22be718adf541a9bd766d9417/src/workspace/features.rs)" + }, + "checksum-freshness": { + "type": "boolean", + "description": "UNSTABLE: checksum-freshness. See\n\n[Cargo source](https://github.com/rust-lang/cargo/blob/cc5596f058e623d22be718adf541a9bd766d9417/src/workspace/features.rs)" + }, + "codegen-backend": { + "type": "boolean", + "description": "UNSTABLE: codegen-backend. See\n\n[Cargo source](https://github.com/rust-lang/cargo/blob/cc5596f058e623d22be718adf541a9bd766d9417/src/workspace/features.rs)" + }, + "direct-minimal-versions": { + "type": "boolean", + "description": "UNSTABLE: direct-minimal-versions. See\n\n[Cargo source](https://github.com/rust-lang/cargo/blob/cc5596f058e623d22be718adf541a9bd766d9417/src/workspace/features.rs)" + }, + "dual-proc-macros": { + "type": "boolean", + "description": "UNSTABLE: dual-proc-macros. See\n\n[Cargo source](https://github.com/rust-lang/cargo/blob/cc5596f058e623d22be718adf541a9bd766d9417/src/workspace/features.rs)" + }, + "feature-unification": { + "type": "boolean", + "description": "UNSTABLE: feature-unification. See\n\n[Cargo source](https://github.com/rust-lang/cargo/blob/cc5596f058e623d22be718adf541a9bd766d9417/src/workspace/features.rs)" + }, + "features": { + "type": "array", + "items": { + "type": "string" + }, + "description": "UNSTABLE: features. See\n\n[Cargo source](https://github.com/rust-lang/cargo/blob/cc5596f058e623d22be718adf541a9bd766d9417/src/workspace/features.rs)" + }, + "fine-grain-locking": { + "type": "boolean", + "description": "UNSTABLE: fine-grain-locking. See\n\n[Cargo source](https://github.com/rust-lang/cargo/blob/cc5596f058e623d22be718adf541a9bd766d9417/src/workspace/features.rs)" + }, + "fix-edition": { + "oneOf": [ + { + "type": "object", + "required": ["Start"], + "properties": { + "Start": { + "enum": ["2015", "2018", "2021", "2024"] + } + }, + "additionalProperties": false, + "x-tombi-table-keys-order": { + "properties": "schema" + } + }, + { + "type": "object", + "required": ["End"], + "properties": { + "End": { + "type": "object", + "properties": { + "initial": { + "enum": ["2015", "2018", "2021", "2024"] + }, + "next": { + "enum": ["2015", "2018", "2021", "2024"] + } + }, + "required": ["initial", "next"], + "x-tombi-table-keys-order": { + "properties": "schema" + } + } + }, + "additionalProperties": false, + "x-tombi-table-keys-order": { + "properties": "schema" + } + } + ], + "description": "UNSTABLE: fix-edition. See\n\n[Cargo source](https://github.com/rust-lang/cargo/blob/cc5596f058e623d22be718adf541a9bd766d9417/src/workspace/features.rs)" + }, + "gc": { + "type": "boolean", + "description": "UNSTABLE: gc. See\n\n[Cargo source](https://github.com/rust-lang/cargo/blob/cc5596f058e623d22be718adf541a9bd766d9417/src/workspace/features.rs)" + }, + "git": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "string" + }, + { + "type": "object", + "properties": { + "shallow_index": { + "type": "boolean" + }, + "shallow_deps": { + "type": "boolean" + } + }, + "x-tombi-table-keys-order": { + "properties": "schema" + } + } + ], + "description": "UNSTABLE: git. See\n\n[Cargo source](https://github.com/rust-lang/cargo/blob/cc5596f058e623d22be718adf541a9bd766d9417/src/workspace/features.rs)" + }, + "gitoxide": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "string" + }, + { + "type": "object", + "properties": { + "fetch": { + "type": "boolean" + }, + "checkout": { + "type": "boolean" + } + }, + "x-tombi-table-keys-order": { + "properties": "schema" + } + } + ], + "description": "UNSTABLE: gitoxide. See\n\n[Cargo source](https://github.com/rust-lang/cargo/blob/cc5596f058e623d22be718adf541a9bd766d9417/src/workspace/features.rs)" + }, + "hint-msrv": { + "type": "boolean", + "description": "UNSTABLE: hint-msrv. See\n\n[Cargo source](https://github.com/rust-lang/cargo/blob/cc5596f058e623d22be718adf541a9bd766d9417/src/workspace/features.rs)" + }, + "host-config": { + "type": "boolean", + "description": "UNSTABLE: host-config. See\n\n[Cargo source](https://github.com/rust-lang/cargo/blob/cc5596f058e623d22be718adf541a9bd766d9417/src/workspace/features.rs)" + }, + "json-target-spec": { + "type": "boolean", + "description": "UNSTABLE: json-target-spec. See\n\n[Cargo source](https://github.com/rust-lang/cargo/blob/cc5596f058e623d22be718adf541a9bd766d9417/src/workspace/features.rs)" + }, + "minimal-versions": { + "type": "boolean", + "description": "UNSTABLE: minimal-versions. See\n\n[Cargo source](https://github.com/rust-lang/cargo/blob/cc5596f058e623d22be718adf541a9bd766d9417/src/workspace/features.rs)" + }, + "msrv-policy": { + "type": "boolean", + "description": "UNSTABLE: msrv-policy. See\n\n[Cargo source](https://github.com/rust-lang/cargo/blob/cc5596f058e623d22be718adf541a9bd766d9417/src/workspace/features.rs)" + }, + "mtime-on-use": { + "type": "boolean", + "description": "UNSTABLE: mtime-on-use. See\n\n[Cargo source](https://github.com/rust-lang/cargo/blob/cc5596f058e623d22be718adf541a9bd766d9417/src/workspace/features.rs)" + }, + "next-lockfile-bump": { + "type": "boolean", + "description": "UNSTABLE: next-lockfile-bump. See\n\n[Cargo source](https://github.com/rust-lang/cargo/blob/cc5596f058e623d22be718adf541a9bd766d9417/src/workspace/features.rs)" + }, + "no-index-update": { + "type": "boolean", + "description": "UNSTABLE: no-index-update. See\n\n[Cargo source](https://github.com/rust-lang/cargo/blob/cc5596f058e623d22be718adf541a9bd766d9417/src/workspace/features.rs)" + }, + "panic-abort-tests": { + "type": "boolean", + "description": "UNSTABLE: panic-abort-tests. See\n\n[Cargo source](https://github.com/rust-lang/cargo/blob/cc5596f058e623d22be718adf541a9bd766d9417/src/workspace/features.rs)" + }, + "panic-immediate-abort": { + "type": "boolean", + "description": "UNSTABLE: panic-immediate-abort. See\n\n[Cargo source](https://github.com/rust-lang/cargo/blob/cc5596f058e623d22be718adf541a9bd766d9417/src/workspace/features.rs)" + }, + "profile-hint-mostly-unused": { + "type": "boolean", + "description": "UNSTABLE: profile-hint-mostly-unused. See\n\n[Cargo source](https://github.com/rust-lang/cargo/blob/cc5596f058e623d22be718adf541a9bd766d9417/src/workspace/features.rs)" + }, + "profile-rustflags": { + "type": "boolean", + "description": "UNSTABLE: profile-rustflags. See\n\n[Cargo source](https://github.com/rust-lang/cargo/blob/cc5596f058e623d22be718adf541a9bd766d9417/src/workspace/features.rs)" + }, + "public-dependency": { + "type": "boolean", + "description": "UNSTABLE: public-dependency. See\n\n[Cargo source](https://github.com/rust-lang/cargo/blob/cc5596f058e623d22be718adf541a9bd766d9417/src/workspace/features.rs)" + }, + "publish-timeout": { + "type": "boolean", + "description": "UNSTABLE: publish-timeout. See\n\n[Cargo source](https://github.com/rust-lang/cargo/blob/cc5596f058e623d22be718adf541a9bd766d9417/src/workspace/features.rs)" + }, + "root-dir": { + "type": "string", + "description": "UNSTABLE: root-dir. See\n\n[Cargo source](https://github.com/rust-lang/cargo/blob/cc5596f058e623d22be718adf541a9bd766d9417/src/workspace/features.rs)" + }, + "rustc-unicode": { + "type": "boolean", + "description": "UNSTABLE: rustc-unicode. See\n\n[Cargo source](https://github.com/rust-lang/cargo/blob/cc5596f058e623d22be718adf541a9bd766d9417/src/workspace/features.rs)" + }, + "rustdoc-depinfo": { + "type": "boolean", + "description": "UNSTABLE: rustdoc-depinfo. See\n\n[Cargo source](https://github.com/rust-lang/cargo/blob/cc5596f058e623d22be718adf541a9bd766d9417/src/workspace/features.rs)" + }, + "rustdoc-map": { + "type": "boolean", + "description": "UNSTABLE: rustdoc-map. See\n\n[Cargo source](https://github.com/rust-lang/cargo/blob/cc5596f058e623d22be718adf541a9bd766d9417/src/workspace/features.rs)" + }, + "rustdoc-mergeable-info": { + "type": "boolean", + "description": "UNSTABLE: rustdoc-mergeable-info. See\n\n[Cargo source](https://github.com/rust-lang/cargo/blob/cc5596f058e623d22be718adf541a9bd766d9417/src/workspace/features.rs)" + }, + "rustdoc-scrape-examples": { + "type": "boolean", + "description": "UNSTABLE: rustdoc-scrape-examples. See\n\n[Cargo source](https://github.com/rust-lang/cargo/blob/cc5596f058e623d22be718adf541a9bd766d9417/src/workspace/features.rs)" + }, + "sbom": { + "type": "boolean", + "description": "UNSTABLE: sbom. See\n\n[Cargo source](https://github.com/rust-lang/cargo/blob/cc5596f058e623d22be718adf541a9bd766d9417/src/workspace/features.rs)" + }, + "script": { + "type": "boolean", + "description": "UNSTABLE: script. See\n\n[Cargo source](https://github.com/rust-lang/cargo/blob/cc5596f058e623d22be718adf541a9bd766d9417/src/workspace/features.rs)" + }, + "section-timings": { + "type": "boolean", + "description": "UNSTABLE: section-timings. See\n\n[Cargo source](https://github.com/rust-lang/cargo/blob/cc5596f058e623d22be718adf541a9bd766d9417/src/workspace/features.rs)" + }, + "separate-nightlies": { + "type": "boolean", + "description": "UNSTABLE: separate-nightlies. See\n\n[Cargo source](https://github.com/rust-lang/cargo/blob/cc5596f058e623d22be718adf541a9bd766d9417/src/workspace/features.rs)" + }, + "skip-rustdoc-fingerprint": { + "type": "boolean", + "description": "UNSTABLE: skip-rustdoc-fingerprint. See\n\n[Cargo source](https://github.com/rust-lang/cargo/blob/cc5596f058e623d22be718adf541a9bd766d9417/src/workspace/features.rs)" + }, + "target-applies-to-host": { + "type": "boolean", + "description": "UNSTABLE: target-applies-to-host. See\n\n[Cargo source](https://github.com/rust-lang/cargo/blob/cc5596f058e623d22be718adf541a9bd766d9417/src/workspace/features.rs)" + }, + "trim-paths": { + "type": "boolean", + "description": "UNSTABLE: trim-paths. See\n\n[Cargo source](https://github.com/rust-lang/cargo/blob/cc5596f058e623d22be718adf541a9bd766d9417/src/workspace/features.rs)" + }, + "unstable-options": { + "type": "boolean", + "description": "UNSTABLE: unstable-options. See\n\n[Cargo source](https://github.com/rust-lang/cargo/blob/cc5596f058e623d22be718adf541a9bd766d9417/src/workspace/features.rs)" + } + }, + "x-tombi-table-keys-order": { + "properties": "ascending", + "additionalProperties": "ascending" + } + } + }, + "definitions": { + "includeEntry": { + "examples": [ + "shared.toml", + { + "path": "optional-local.toml", + "optional": true + } + ], + "oneOf": [ + { + "description": "Path to a Cargo configuration file to include.", + "type": "string", + "pattern": "\\.toml$" + }, + { + "description": "Inline include table. Use optional = true to silently ignore missing files.", + "type": "object", + "required": ["path"], + "x-tombi-table-keys-order": { + "properties": "schema" + }, + "properties": { + "path": { + "type": "string", + "pattern": "\\.toml$" + }, + "optional": { + "type": "boolean", + "default": false + } + } + } + ] + }, + "stringOrStringArray": { + "examples": [ + "run --release", + ["run", "--release", "--", "argument with spaces"] + ], + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "credentialProvider": { + "$ref": "#/definitions/stringOrStringArray", + "description": "Credential provider name, command string, or command with arguments.\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/registry-authentication.html)", + "examples": ["cargo:token", ["cargo-credential-example", "--flag"]] + }, + "alias": { + "title": "[alias]", + "description": "Cargo command aliases. Each key is a subcommand name; the value is the command to run, either a single string (split on whitespace) or an array of arguments. Aliases are recursive and may not redefine existing built-in Cargo commands. Per-alias values can also be set via the `CARGO_ALIAS_` environment variable.\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/config.html#alias)", + "type": "object", + "x-tombi-additional-key-label": "alias", + "x-tombi-table-keys-order": { + "additionalProperties": "ascending" + }, + "x-taplo": { + "docs": { + "main": "Defines [Cargo command aliases](https://doc.rust-lang.org/cargo/reference/config.html#alias).\n\nEach key is the subcommand name and the value is what `cargo ` expands to. Use a string (split on whitespace) or an array (preserves whitespace inside arguments).\n\n**Built-in aliases** (may be overridden): `b` → `build`, `c` → `check`, `d` → `doc`, `t` → `test`, `r` → `run`, `rm` → `remove`.\n\nAliases are recursive — one alias may invoke another. Aliases may **not** redefine existing built-in Cargo commands.\n\nEach alias may also be set via the `CARGO_ALIAS_` environment variable." + }, + "links": { + "key": "https://doc.rust-lang.org/cargo/reference/config.html#alias" + } + }, + "propertyNames": { + "description": "Cargo subcommand name. Must be a non-empty token containing no whitespace.", + "type": "string", + "pattern": "^[^\\s]+$", + "minLength": 1 + }, + "additionalProperties": { + "$ref": "#/definitions/stringOrStringArray", + "title": "alias expansion", + "description": "Command the alias expands to. A string is split on whitespace; an array is passed through verbatim (use the array form to preserve arguments containing spaces)." + }, + "default": { + "b": "build", + "c": "check", + "d": "doc", + "t": "test", + "r": "run", + "rm": "remove" + }, + "examples": [ + { + "b": "build", + "rr": "run --release", + "recursive_example": "rr --example recursions", + "space_example": ["run", "--release", "--", "argument with spaces"] + } + ] + }, + "build": { + "title": "[build]", + "description": "Build-time operations and compiler settings.\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/config.html#build)", + "type": "object", + "x-tombi-table-keys-order": { + "properties": "schema" + }, + "x-taplo": { + "links": { + "key": "https://doc.rust-lang.org/cargo/reference/config.html#build" + }, + "initKeys": ["target", "jobs", "rustflags"] + }, + "examples": [ + { + "jobs": 8, + "target": "x86_64-unknown-linux-gnu", + "target-dir": "target", + "rustflags": ["-C", "target-cpu=native"], + "incremental": true + }, + { + "rustc-wrapper": "sccache", + "target": ["x86_64-unknown-linux-gnu", "aarch64-unknown-linux-gnu"] + } + ], + "properties": { + "warnings": { + "description": "Adjust the effective level of lint warnings for local packages. MSRV: respected as of Rust 1.97.\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/config.html#buildwarnings)", + "type": "string", + "enum": ["warn", "allow", "deny"], + "default": "warn", + "examples": ["warn", "allow", "deny"], + "x-intellij-enum-metadata": { + "warn": { + "description": "Continue to emit the lints as warnings (default)." + }, + "allow": { + "description": "Hide the lints." + }, + "deny": { + "description": "Emit an error for a crate that has lint warnings." + } + }, + "x-taplo": { + "links": { + "key": "https://doc.rust-lang.org/cargo/reference/config.html#buildwarnings" + }, + "docs": { + "enumValues": [ + "Continue to emit the lints as warnings (default).", + "Hide the lints.", + "Emit an error for a crate that has lint warnings. Use `--keep-going` to see the lint warnings for all dependent crates." + ] + } + } + }, + "jobs": { + "description": "Maximum number of compiler processes to run in parallel. Negative values are relative to the number of logical CPUs. The string \"default\" resets to Cargo defaults. Defaults to the number of logical CPUs.\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/config.html#buildjobs)", + "oneOf": [ + { + "type": "integer", + "not": { + "const": 0 + }, + "minimum": -2147483648, + "maximum": 2147483647 + }, + { + "const": "default" + } + ], + "examples": [8, -1, "default"], + "x-taplo": { + "links": { + "key": "https://doc.rust-lang.org/cargo/reference/config.html#buildjobs" + } + } + }, + "rustc": { + "description": "Executable to use for rustc.\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/config.html#buildrustc)", + "type": "string", + "minLength": 1, + "default": "rustc", + "examples": ["rustc", "/usr/local/bin/rustc"], + "x-taplo": { + "links": { + "key": "https://doc.rust-lang.org/cargo/reference/config.html#buildrustc" + } + } + }, + "rustc-wrapper": { + "description": "Wrapper executable to run instead of rustc. The first argument passed to the wrapper is the path to the actual rustc executable.\nhttps://doc.rust-lang.org/cargo/reference/config.html#buildrustc-wrapper An empty string disables the wrapper.", + "type": "string", + "examples": ["sccache"], + "x-taplo": { + "links": { + "key": "https://doc.rust-lang.org/cargo/reference/config.html#buildrustc-wrapper" + } + } + }, + "rustc-workspace-wrapper": { + "description": "Wrapper executable to run instead of rustc for workspace members only. If both rustc-wrapper and rustc-workspace-wrapper are set, invocations are nested: $RUSTC_WRAPPER $RUSTC_WORKSPACE_WRAPPER $RUSTC.\nhttps://doc.rust-lang.org/cargo/reference/config.html#buildrustc-workspace-wrapper An empty string disables the wrapper.", + "type": "string", + "examples": ["clippy-driver"], + "x-taplo": { + "links": { + "key": "https://doc.rust-lang.org/cargo/reference/config.html#buildrustc-workspace-wrapper" + } + } + }, + "rustdoc": { + "description": "Executable to use for rustdoc.\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/config.html#buildrustdoc)", + "type": "string", + "minLength": 1, + "default": "rustdoc", + "examples": ["rustdoc"], + "x-taplo": { + "links": { + "key": "https://doc.rust-lang.org/cargo/reference/config.html#buildrustdoc" + } + } + }, + "target": { + "description": "Default target platform triple, custom target spec path, \"host-tuple\", or list of targets. Defaults to the host platform when unset.\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/config.html#buildtarget)", + "oneOf": [ + { + "type": "string", + "minLength": 1 + }, + { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + } + ], + "examples": [ + "x86_64-unknown-linux-gnu", + "host-tuple", + "./custom-target.json", + ["x86_64-unknown-linux-gnu", "aarch64-unknown-linux-gnu"] + ], + "x-taplo": { + "links": { + "key": "https://doc.rust-lang.org/cargo/reference/config.html#buildtarget" + } + } + }, + "target-dir": { + "description": "Directory where all compiler output is placed. Defaults to a directory named `target` at the workspace root.\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/config.html#buildtarget-dir)", + "type": "string", + "minLength": 1, + "default": "target", + "examples": ["target", "/tmp/cargo-target"], + "x-taplo": { + "links": { + "key": "https://doc.rust-lang.org/cargo/reference/config.html#buildtarget-dir" + } + } + }, + "build-dir": { + "description": "Directory where intermediate build artifacts are stored. Defaults to the value of `build.target-dir`. Supports path templating with `{workspace-root}`, `{cargo-cache-home}`, and `{workspace-path-hash}`.\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/config.html#buildbuild-dir)", + "type": "string", + "minLength": 1, + "examples": [ + "{workspace-root}/target/intermediate", + "{cargo-cache-home}/build/{workspace-path-hash}" + ], + "x-taplo": { + "links": { + "key": "https://doc.rust-lang.org/cargo/reference/config.html#buildbuild-dir" + } + } + }, + "rustflags": { + "$ref": "#/definitions/stringOrStringArray", + "description": "Extra command-line flags passed to rustc. May be an array of strings or a space-separated string.\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/config.html#buildrustflags)" + }, + "rustdocflags": { + "$ref": "#/definitions/stringOrStringArray", + "description": "Extra command-line flags passed to rustdoc. May be an array of strings or a space-separated string.\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/config.html#buildrustdocflags)" + }, + "incremental": { + "description": "Whether to enable incremental compilation. When unset, the value from the active profile is used; when set, this overrides every profile.\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/config.html#buildincremental)", + "type": "boolean", + "examples": [true, false], + "x-taplo": { + "links": { + "key": "https://doc.rust-lang.org/cargo/reference/config.html#buildincremental" + } + } + }, + "dep-info-basedir": { + "description": "Config-relative path prefix stripped from dep-info file paths, used to convert absolute paths to relative paths for downstream tools.\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/config.html#builddep-info-basedir)", + "type": "string", + "minLength": 1, + "examples": [".", ".."], + "x-taplo": { + "links": { + "key": "https://doc.rust-lang.org/cargo/reference/config.html#builddep-info-basedir" + } + } + }, + "pipelining": { + "description": "DEPRECATED. This option is unused. Cargo always has pipelining enabled.\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/config.html#buildpipelining)", + "type": "boolean", + "deprecated": true, + "x-taplo": { + "hidden": true, + "links": { + "key": "https://doc.rust-lang.org/cargo/reference/config.html#buildpipelining" + } + } + }, + "artifact-dir": { + "type": "string", + "description": "UNSTABLE: Copy final artifacts to this directory; requires -Z unstable-options." + }, + "sbom": { + "type": "boolean", + "description": "UNSTABLE: Generate SBOM precursor files; requires -Z sbom." + }, + "fingerprint": { + "type": "string", + "description": "UNSTABLE: Freshness comparison method; requires -Z checksum-freshness.", + "enum": ["mtime", "content"] + }, + "analysis": { + "type": "object", + "description": "UNSTABLE: Persist build metrics; requires -Z build-analysis.", + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": ["enabled"], + "x-tombi-table-keys-order": { + "properties": "schema" + } + } + } + }, + "cache": { + "title": "[cache]", + "description": "Settings for Cargo caches.\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/config.html#cache)", + "type": "object", + "x-tombi-table-keys-order": { + "properties": "schema" + }, + "x-taplo": { + "links": { + "key": "https://doc.rust-lang.org/cargo/reference/config.html#cache" + } + }, + "examples": [ + { + "auto-clean-frequency": "1 day" + }, + { + "auto-clean-frequency": "never" + } + ], + "properties": { + "auto-clean-frequency": { + "description": "How often Cargo checks whether unused global cache files should be deleted. Accepts \"never\", \"always\", or an integer followed by \"seconds\", \"minutes\", \"hours\", \"days\", \"weeks\", or \"months\" (e.g. \"1 day\", \"2 weeks\").\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/config.html#cacheauto-clean-frequency)", + "type": "string", + "default": "1 day", + "pattern": "^(never|always|[0-9]+ (second|minute|hour|day|week|month)s?)$", + "examples": ["never", "always", "1 day", "2 weeks", "3 months"], + "x-taplo": { + "docs": { + "main": "How often Cargo checks whether unused global cache files should be deleted.\n\nAccepts:\n- `\"never\"` --- never delete old files.\n- `\"always\"` --- check on every Cargo run.\n- ` ` where unit is one of `seconds`, `minutes`, `hours`, `days`, `weeks`, or `months` (e.g. `\"1 day\"`, `\"2 weeks\"`).\n\nDefault: `\"1 day\"`. Environment: `CARGO_CACHE_AUTO_CLEAN_FREQUENCY`." + } + } + }, + "global-clean": { + "type": "object", + "description": "UNSTABLE: Global cache retention; requires -Z gc.", + "properties": { + "max-src-age": { + "type": "string" + }, + "max-crate-age": { + "type": "string" + }, + "max-index-age": { + "type": "string" + }, + "max-git-co-age": { + "type": "string" + }, + "max-git-db-age": { + "type": "string" + } + }, + "x-tombi-table-keys-order": { + "properties": "schema" + } + } + } + }, + "cargoNew": { + "title": "[cargo-new]", + "description": "Defaults for cargo new.\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/config.html#cargo-new)", + "type": "object", + "x-tombi-table-keys-order": { + "properties": "schema" + }, + "x-taplo": { + "links": { + "key": "https://doc.rust-lang.org/cargo/reference/config.html#cargo-new" + } + }, + "examples": [ + { + "vcs": "git" + }, + { + "vcs": "none" + } + ], + "properties": { + "name": { + "description": "DEPRECATED. This option is unused.\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/config.html#cargo-newname)", + "type": "string", + "deprecated": true + }, + "email": { + "description": "DEPRECATED. This option is unused.\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/config.html#cargo-newemail)", + "type": "string", + "deprecated": true + }, + "vcs": { + "description": "Source control system used when initializing a new repository.\nDefaults to `git`, or `none` when run inside an existing VCS repository. Overridable via `cargo new --vcs`.\nEnvironment: `CARGO_CARGO_NEW_VCS`.\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/config.html#cargo-newvcs)", + "type": "string", + "enum": ["git", "hg", "pijul", "fossil", "none"], + "default": "git", + "examples": ["git", "hg", "pijul", "fossil", "none"], + "x-intellij-enum-metadata": { + "git": { + "description": "Initialize a Git repository (https://git-scm.com)." + }, + "hg": { + "description": "Initialize a Mercurial repository (https://www.mercurial-scm.org)." + }, + "pijul": { + "description": "Initialize a Pijul repository (https://pijul.org)." + }, + "fossil": { + "description": "Initialize a Fossil repository (https://fossil-scm.org)." + }, + "none": { + "description": "Do not initialize any VCS repository (also the implicit default when nested inside an existing repo)." + } + }, + "x-taplo": { + "docs": { + "enumValues": [ + "Initialize a Git repository (https://git-scm.com).", + "Initialize a Mercurial repository (https://www.mercurial-scm.org).", + "Initialize a Pijul repository (https://pijul.org).", + "Initialize a Fossil repository (https://fossil-scm.org).", + "Do not initialize any VCS repository (also the implicit default when nested inside an existing repo)." + ] + }, + "links": { + "enumValues": [ + "https://git-scm.com", + "https://www.mercurial-scm.org", + "https://pijul.org", + "https://fossil-scm.org", + null + ] + } + } + } + } + }, + "credentialAlias": { + "title": "[credential-alias]", + "description": "Credential provider aliases.\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/config.html#credential-alias)", + "type": "object", + "x-tombi-additional-key-label": "credential-alias", + "x-tombi-table-keys-order": { + "additionalProperties": "ascending" + }, + "x-taplo": { + "links": { + "key": "https://doc.rust-lang.org/cargo/reference/config.html#credential-alias" + } + }, + "additionalProperties": { + "$ref": "#/definitions/stringOrStringArray", + "description": "Credential provider command for this alias: an executable path with optional arguments. If given as a string, it is split on spaces into path and arguments. Reference the alias name from `registry.global-credential-providers` or `registries..credential-provider`.\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/config.html#credential-alias)" + }, + "examples": [ + { + "my-alias": [ + "/usr/bin/cargo-credential-example", + "--argument", + "value", + "--flag" + ], + "my-alias-string": "/usr/bin/cargo-credential-example --flag" + } + ] + }, + "doc": { + "title": "[doc]", + "description": "Options for cargo doc.\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/config.html#doc)", + "type": "object", + "x-tombi-table-keys-order": { + "properties": "schema" + }, + "x-taplo": { + "links": { + "key": "https://doc.rust-lang.org/cargo/reference/config.html#doc" + } + }, + "examples": [ + { + "browser": "chromium" + }, + { + "browser": ["firefox", "--new-window"] + } + ], + "properties": { + "browser": { + "$ref": "#/definitions/stringOrStringArray", + "description": "Browser command used by cargo doc --open, overriding the BROWSER environment variable. Either a single program path or an array of [program, ...args].\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/config.html#docbrowser)", + "examples": [ + "firefox", + "chromium", + ["firefox", "--new-window"], + ["google-chrome", "--incognito"] + ] + }, + "extern-map": { + "type": "object", + "description": "UNSTABLE: External rustdoc links; requires -Z rustdoc-map.", + "properties": { + "std": { + "type": "string" + }, + "registries": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "x-tombi-table-keys-order": { + "properties": "schema" + } + } + } + }, + "env": { + "title": "[env]", + "description": "Environment variables set for build scripts, rustc invocations, cargo run, and cargo build.\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/config.html#env)", + "type": "object", + "x-tombi-additional-key-label": "variable", + "x-tombi-table-keys-order": { + "additionalProperties": "ascending" + }, + "x-taplo": { + "links": { + "key": "https://doc.rust-lang.org/cargo/reference/config.html#env" + } + }, + "propertyNames": { + "pattern": "^[A-Za-z_][A-Za-z0-9_]*$" + }, + "additionalProperties": { + "$ref": "#/definitions/envEntry" + }, + "examples": [ + { + "RUST_LOG": "info", + "OPENSSL_DIR": { + "value": "vendor/openssl", + "relative": true + }, + "TMPDIR": { + "value": "/tmp/cargo", + "force": true + } + } + ] + }, + "envEntry": { + "title": "env entry", + "description": "Value for an environment variable injected into build scripts, rustc, `cargo run`, and `cargo build`. Either a bare string or an inline table that opts into `force` (override an existing env var) or `relative` (resolve `value` relative to the config file's directory).\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/config.html#env)", + "x-tombi-table-keys-order": { + "properties": "schema" + }, + "x-taplo": { + "docs": { + "main": "Environment variable value.\n\nUse a bare string for a literal value, or an inline table to opt into:\n\n- `force = true` — override an existing variable in the parent environment (default leaves it untouched).\n- `relative = true` — resolve `value` as a path relative to the parent directory of the `.cargo/` directory containing this config file; the exported variable holds the resulting absolute path.\n\n[Cargo reference](https://doc.rust-lang.org/cargo/reference/config.html#env)" + } + }, + "examples": [ + "value", + { + "value": "vendor/openssl", + "relative": true + }, + { + "value": "/tmp/cargo", + "force": true + } + ], + "oneOf": [ + { + "title": "literal value", + "description": "Literal string assigned to the environment variable.", + "type": "string" + }, + { + "title": "expanded value", + "description": "Inline table form. Required: `value`. Optional flags: `force`, `relative`.", + "type": "object", + "required": ["value"], + "additionalProperties": false, + "x-taplo": { + "initKeys": ["value"] + }, + "properties": { + "value": { + "title": "variable value", + "description": "String exported as the variable's value. When `relative = true`, this is interpreted as a path relative to the parent directory of the `.cargo/` directory containing this config file, and the exported value is the resolved absolute path.", + "type": "string" + }, + "force": { + "title": "force", + "description": "When `true`, override the variable even if it is already present in the parent environment. Defaults to `false` (existing values win).", + "type": "boolean", + "default": false + }, + "relative": { + "title": "relative", + "description": "When `true`, treat `value` as a path relative to the parent directory of the `.cargo/` directory containing this config file. Cargo resolves it to an absolute path before exporting. Defaults to `false`.", + "type": "boolean", + "default": false + } + }, + "x-tombi-table-keys-order": { + "properties": "schema" + } + } + ] + }, + "futureIncompatReport": { + "title": "[future-incompat-report]", + "description": "Settings for future incompatibility reports.\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/config.html#future-incompat-report)", + "type": "object", + "x-tombi-table-keys-order": { + "properties": "schema" + }, + "x-taplo": { + "links": { + "key": "https://doc.rust-lang.org/cargo/reference/config.html#future-incompat-report" + }, + "initKeys": ["frequency"] + }, + "examples": [ + { + "frequency": "always" + }, + { + "frequency": "never" + } + ], + "properties": { + "frequency": { + "description": "How often Cargo displays future incompatibility report notifications.\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/config.html#future-incompat-reportfrequency)", + "type": "string", + "enum": ["always", "never"], + "default": "always", + "examples": ["always", "never"], + "x-intellij-enum-metadata": { + "always": { + "description": "Always display a notification." + }, + "never": { + "description": "Never display a notification." + } + }, + "x-taplo": { + "docs": { + "main": "Controls how often Cargo displays a notification to the terminal when a future incompat report is available.\n\nPossible values:\n- `\"always\"` --- always display a notification when a command (e.g. `cargo build`) produces a future incompat report.\n- `\"never\"` --- never display a notification.\n\nDefault: `\"always\"`. Environment: `CARGO_FUTURE_INCOMPAT_REPORT_FREQUENCY`.", + "enumValues": [ + "Always display a notification.", + "Never display a notification." + ] + } + } + } + } + }, + "http": { + "title": "[http]", + "description": "HTTP behavior for fetching crates and accessing remote git repositories.\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/config.html#http)", + "type": "object", + "x-tombi-table-keys-order": { + "properties": "schema" + }, + "x-taplo": { + "links": { + "key": "https://doc.rust-lang.org/cargo/reference/config.html#http" + } + }, + "examples": [ + { + "timeout": 60, + "multiplexing": true, + "user-agent": "my-cargo-wrapper/1.0" + }, + { + "proxy": "http://proxy.example.com:8080", + "cainfo": "certs/ca.pem", + "ssl-version": { + "min": "tlsv1.2", + "max": "tlsv1.3" + } + } + ], + "properties": { + "debug": { + "description": "Enable HTTP debugging. Combine with `CARGO_LOG=network=debug` (or `network=trace`) to see request details. Logs may contain authentication tokens, do not share publicly.\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/config.html#httpdebug)", + "type": "boolean", + "default": false, + "examples": [false, true] + }, + "proxy": { + "description": "HTTP and HTTPS proxy in libcurl format `[protocol://]host[:port]`. Falls back to git's `http.proxy`, then to `HTTPS_PROXY`/`https_proxy`/`http_proxy` env vars.\nhttps://doc.rust-lang.org/cargo/reference/config.html#httpproxy An empty string disables proxy use.", + "type": "string", + "examples": [ + "http://proxy.example.com:8080", + "https://user:pass@proxy.example.com:8443", + "proxy.example.com:8080" + ] + }, + "timeout": { + "description": "Timeout for each HTTP request, in seconds.\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/config.html#httptimeout)", + "type": "integer", + "minimum": 0, + "default": 30, + "examples": [30, 60, 120] + }, + "cainfo": { + "description": "Path to a Certificate Authority (CA) bundle file used to verify TLS certificates. If unset, Cargo uses the system trust store.\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/config.html#httpcainfo)", + "type": "string", + "minLength": 1, + "examples": ["certs/ca.pem", "/etc/ssl/certs/ca-bundle.crt"] + }, + "proxy-cainfo": { + "description": "Path to a Certificate Authority (CA) bundle file used to verify proxy TLS certificates. Falls back to `http.cainfo` if unset.\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/config.html#httpproxy-cainfo)", + "type": "string", + "minLength": 1, + "examples": ["certs/proxy-ca.pem"] + }, + "check-revoke": { + "description": "Whether TLS certificate revocation checks are performed. Only works on Windows. Default: `true` on Windows, `false` elsewhere.\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/config.html#httpcheck-revoke)", + "type": "boolean", + "examples": [true, false] + }, + "ssl-version": { + "$ref": "#/definitions/sslVersion", + "description": "Minimum TLS version, or a table with `min`/`max` TLS version bounds. Cargo's default range is `min = \"tlsv1.0\"`, `max` = newest supported (typically `tlsv1.3`).\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/config.html#httpssl-version)" + }, + "low-speed-limit": { + "description": "Average transfer speed threshold, in bytes per second. If the transfer rate stays below this for `http.timeout` seconds, Cargo aborts and retries.\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/config.html#httplow-speed-limit)", + "type": "integer", + "minimum": 0, + "default": 10, + "examples": [10, 1024] + }, + "multiplexing": { + "description": "Whether Cargo attempts to use HTTP/2 with multiplexing. If `false`, falls back to HTTP/1.1 without pipelining.\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/config.html#httpmultiplexing)", + "type": "boolean", + "default": true, + "examples": [true, false] + }, + "user-agent": { + "description": "Custom HTTP user-agent header. Default is a string including Cargo's version.\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/config.html#httpuser-agent)", + "type": "string", + "minLength": 1, + "examples": [ + "my-cargo-wrapper/1.0", + "ci-runner (+https://example.com/ci)" + ] + } + } + }, + "sslVersion": { + "examples": [ + "tlsv1.3", + { + "min": "tlsv1.2", + "max": "tlsv1.3" + } + ], + "oneOf": [ + { + "$ref": "#/definitions/tlsVersion", + "title": "Minimum TLS version", + "description": "Minimum TLS version to use; cargo accepts any newer version up to the platform maximum." + }, + { + "title": "TLS version range", + "description": "Explicit minimum/maximum TLS version bounds.", + "type": "object", + "x-tombi-table-keys-order": { + "properties": "schema" + }, + "properties": { + "min": { + "$ref": "#/definitions/tlsVersion", + "description": "Minimum TLS version to negotiate." + }, + "max": { + "$ref": "#/definitions/tlsVersion", + "description": "Maximum TLS version to negotiate." + } + }, + "examples": [ + { + "min": "tlsv1.2", + "max": "tlsv1.3" + }, + { + "min": "tlsv1.2" + }, + { + "max": "tlsv1.3" + } + ] + } + ] + }, + "tlsVersion": { + "type": "string", + "enum": ["default", "tlsv1", "tlsv1.0", "tlsv1.1", "tlsv1.2", "tlsv1.3"], + "examples": ["default", "tlsv1.2", "tlsv1.3"], + "x-intellij-enum-metadata": { + "default": { + "description": "System-default TLS version selection (cargo's built-in defaults: min `tlsv1.0`, max newest supported)." + }, + "tlsv1": { + "description": "TLS 1.x family (system-chosen minor version). Prefer an explicit `tlsv1.2` or `tlsv1.3`." + }, + "tlsv1.0": { + "description": "TLS 1.0 (deprecated by RFC 8996; insecure — avoid)." + }, + "tlsv1.1": { + "description": "TLS 1.1 (deprecated by RFC 8996; insecure — avoid)." + }, + "tlsv1.2": { + "description": "TLS 1.2 (recommended minimum)." + }, + "tlsv1.3": { + "description": "TLS 1.3 (recommended)." + } + }, + "x-taplo": { + "docs": { + "enumValues": [ + "System-default TLS version selection (cargo's built-in defaults: min `tlsv1.0`, max newest supported).", + "TLS 1.x family (system-chosen minor version). Prefer an explicit `tlsv1.2` or `tlsv1.3`.", + "TLS 1.0 (deprecated by RFC 8996; insecure — avoid).", + "TLS 1.1 (deprecated by RFC 8996; insecure — avoid).", + "TLS 1.2 (recommended minimum).", + "TLS 1.3 (recommended)." + ] + } + } + }, + "install": { + "title": "[install]", + "description": "Defaults for cargo install.\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/config.html#install)", + "type": "object", + "x-tombi-table-keys-order": { + "properties": "schema" + }, + "x-taplo": { + "links": { + "key": "https://doc.rust-lang.org/cargo/reference/config.html#install" + } + }, + "examples": [ + { + "root": "/opt/cargo" + } + ], + "properties": { + "root": { + "description": "Root directory for installed executables. Executables go into a `bin` directory underneath the root, alongside tracking files `.crates.toml` and `.crates2.json`. Defaults to Cargo's home directory (typically `~/.cargo`). Overridable with `--root` or `CARGO_INSTALL_ROOT`.\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/config.html#installroot)", + "type": "string", + "minLength": 1, + "examples": ["/opt/cargo", "~/.local"], + "x-taplo": { + "links": { + "key": "https://doc.rust-lang.org/cargo/reference/config.html#installroot" + } + } + } + } + }, + "net": { + "title": "[net]", + "description": "Networking configuration.\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/config.html#net)", + "type": "object", + "x-tombi-table-keys-order": { + "properties": "schema" + }, + "x-taplo": { + "links": { + "key": "https://doc.rust-lang.org/cargo/reference/config.html#net" + } + }, + "examples": [ + { + "retry": 3, + "git-fetch-with-cli": true, + "offline": false + }, + { + "ssh": { + "known-hosts": [ + "example.com ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFO4Q5T0UV0SQevair9PFwoxY9dl4pQl3u5phoqJH3cF" + ] + } + } + ], + "properties": { + "retry": { + "description": "Number of times to retry possibly spurious network errors.\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/config.html#netretry)", + "type": "integer", + "minimum": 0, + "default": 3, + "examples": [3] + }, + "git-fetch-with-cli": { + "description": "Use the git executable for fetching registry indexes and git dependencies.\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/config.html#netgit-fetch-with-cli)", + "type": "boolean", + "default": false + }, + "offline": { + "description": "Avoid accessing the network and use locally cached data where possible.\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/config.html#netoffline)", + "type": "boolean", + "default": false + }, + "ssh": { + "description": "SSH connection settings.\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/config.html#netssh)", + "type": "object", + "x-tombi-table-keys-order": { + "properties": "schema" + }, + "properties": { + "known-hosts": { + "description": "SSH host keys accepted by Cargo.\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/config.html#netsshknown-hosts)", + "type": "array", + "items": { + "type": "string", + "pattern": "^\\S+[ \\t]+\\S+[ \\t]+\\S+", + "examples": [ + "example.com ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFO4Q5T0UV0SQevair9PFwoxY9dl4pQl3u5phoqJH3cF" + ] + }, + "uniqueItems": true, + "x-tombi-array-values-order": "ascending", + "examples": [ + [ + "example.com ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFO4Q5T0UV0SQevair9PFwoxY9dl4pQl3u5phoqJH3cF" + ] + ] + } + } + } + } + }, + "patch": { + "title": "[patch]", + "description": "Dependency patch overrides. Outer key is the registry name being patched (typically `crates-io`, or a name from `[registries]`); inner key is the package name being replaced; innermost table is the replacement dependency specification, using the same format as Cargo.toml `[patch]`.\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/config.html#patch)", + "type": "object", + "x-tombi-additional-key-label": "registry", + "x-tombi-table-keys-order": { + "additionalProperties": "ascending" + }, + "x-taplo": { + "links": { + "key": "https://doc.rust-lang.org/cargo/reference/config.html#patch" + } + }, + "additionalProperties": { + "description": "Patches keyed by registry name. The conventional key is `crates-io`; user-defined registry names from `[registries]` are also valid.\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/overriding-dependencies.html#the-patch-section)", + "type": "object", + "x-tombi-additional-key-label": "dependency", + "x-tombi-table-keys-order": { + "additionalProperties": "ascending" + }, + "additionalProperties": { + "$ref": "#/definitions/dep-spec" + } + }, + "examples": [ + { + "crates-io": { + "foo": { + "path": "../foo" + }, + "serde": { + "git": "https://github.com/serde-rs/serde.git", + "branch": "master" + } + } + } + ] + }, + "dep-spec": { + "description": "Replacement dependency: version string or dependency table. Cargo validates source conflicts and resolves the replacement crate.", + "x-tombi-table-keys-order": { + "properties": "schema", + "additionalProperties": "ascending" + }, + "x-taplo": { + "initKeys": ["version"] + }, + "examples": [ + { + "path": "../foo" + }, + { + "git": "https://github.com/serde-rs/serde.git", + "branch": "master" + }, + { + "version": "1.0", + "registry": "my-registry" + } + ], + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "version": { + "description": "Semver requirement matched against the patched package.\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html)", + "type": "string", + "examples": ["1.0", "^1.2.3", "=0.5.0"] + }, + "path": { + "description": "Filesystem path to the replacement crate. Relative paths resolve relative to the config file containing this `[patch]` section.\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/config.html#patch)", + "type": "string", + "examples": ["../foo"] + }, + "git": { + "description": "Git repository URL providing the replacement crate.\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#specifying-dependencies-from-git-repositories)", + "type": "string", + "format": "uri", + "examples": ["https://github.com/serde-rs/serde.git"] + }, + "branch": { + "description": "Git branch to use. Mutually exclusive with `tag` and `rev`.", + "type": "string", + "examples": ["main", "master"] + }, + "tag": { + "description": "Git tag to use. Mutually exclusive with `branch` and `rev`.", + "type": "string", + "examples": ["v1.0.0"] + }, + "rev": { + "description": "Git revision (commit-ish) to use. Mutually exclusive with `branch` and `tag`.", + "type": "string", + "examples": ["abcdef1234567890"] + }, + "package": { + "description": "Real package name when the patch entry's key is a rename. Lets you patch a crate while referring to it under a different name in your manifest.\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#renaming-dependencies-in-cargotoml)", + "type": "string" + }, + "registry": { + "description": "Name of the registry the replacement is fetched from when using `version`. Refers to a key under `[registries]`.", + "type": "string", + "examples": ["crates-io"] + }, + "default-features": { + "description": "Parsed but ignored for patch selection; configure features on the dependency that uses this patch.", + "type": "boolean", + "default": true + }, + "features": { + "description": "Parsed but ignored for patch selection; configure features on the dependency that uses this patch.", + "type": "array", + "items": { + "type": "string" + }, + "x-tombi-array-values-order": "ascending", + "examples": [["serde", "std"]] + }, + "optional": { + "description": "Whether the dependency is optional. Rarely meaningful inside `[patch]`; included for parity with the dependency-table format.", + "type": "boolean", + "default": false + }, + "public": { + "description": "Whether the dependency is part of the public API (unstable nightly feature).", + "type": "boolean", + "default": false + }, + "registry-index": { + "type": "string", + "description": "Internal registry index URL used by Cargo when publishing." + }, + "base": { + "type": "string", + "description": "UNSTABLE: Named path base; requires path-bases support." + }, + "artifact": { + "description": "UNSTABLE: Artifact dependency; requires -Z bindeps.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "lib": { + "type": "boolean", + "description": "UNSTABLE: Also use the artifact dependency as a library; requires -Z bindeps." + }, + "target": { + "type": "string", + "description": "UNSTABLE: Artifact target platform; requires -Z bindeps." + }, + "default_features": { + "type": "boolean", + "deprecated": true, + "description": "Deprecated underscore spelling of default-features." + } + } + } + ] + }, + "profiles": { + "title": "[profile.*]", + "description": "Profile configuration overlays workspace/manifest profiles. Custom profiles require inherits after merging, but a configuration overlay may omit it.\n\n[Cargo source](https://github.com/rust-lang/cargo/blob/cc5596f058e623d22be718adf541a9bd766d9417/src/workspace/profiles.rs)", + "type": "object", + "x-tombi-additional-key-label": "profile name", + "x-tombi-table-keys-order": { + "properties": "schema", + "additionalProperties": "ascending" + }, + "x-taplo": { + "links": { + "key": "https://doc.rust-lang.org/cargo/reference/config.html#profile" + } + }, + "propertyNames": { + "description": "Cargo profile name: Unicode letters/numbers, underscore or hyphen; Cargo checks reserved names." + }, + "properties": { + "dev": { + "$ref": "#/definitions/builtinProfile", + "description": "Built-in `dev` profile (used by `cargo build` and `cargo run`).\nDefaults: `opt-level = 0`, `debug = true`, `debug-assertions = true`, `overflow-checks = true`, `lto = false`, `panic = \"unwind\"`, `incremental = true`, `codegen-units = 256`, `rpath = false`.\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/profiles.html#dev)" + }, + "release": { + "$ref": "#/definitions/builtinProfile", + "description": "Built-in `release` profile (used by `cargo build --release`, `cargo install`).\nDefaults: `opt-level = 3`, `debug = false`, `debug-assertions = false`, `overflow-checks = false`, `lto = false`, `panic = \"unwind\"`, `incremental = false`, `codegen-units = 16`, `rpath = false`.\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/profiles.html#release)" + }, + "test": { + "$ref": "#/definitions/builtinProfile", + "description": "Built-in `test` profile (used by `cargo test`). Inherits from `dev`.\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/profiles.html#test)" + }, + "bench": { + "$ref": "#/definitions/builtinProfile", + "description": "Built-in `bench` profile (used by `cargo bench`). Inherits from `release`.\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/profiles.html#bench)" + } + }, + "additionalProperties": { + "$ref": "#/definitions/customProfile" + }, + "examples": [ + { + "release": { + "opt-level": 3, + "lto": "thin", + "codegen-units": 1 + }, + "dev": { + "debug": true, + "incremental": true + } + }, + { + "release-lto": { + "inherits": "release", + "lto": "fat", + "codegen-units": 1, + "strip": "symbols" + } + } + ] + }, + "builtinProfile": { + "description": "Settings for one of the four built-in Cargo profiles. Cargo errors out if `inherits` is set on a built-in profile.\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/profiles.html)", + "type": "object", + "x-tombi-table-keys-order": { + "properties": "schema" + }, + "not": { + "required": ["inherits"], + "properties": { + "inherits": {} + } + }, + "properties": { + "opt-level": { + "$ref": "#/definitions/optLevel" + }, + "debug": { + "$ref": "#/definitions/debugLevel" + }, + "split-debuginfo": { + "$ref": "#/definitions/splitDebuginfo" + }, + "strip": { + "$ref": "#/definitions/strip" + }, + "debug-assertions": { + "$ref": "#/definitions/debugAssertions" + }, + "overflow-checks": { + "$ref": "#/definitions/overflowChecks" + }, + "lto": { + "$ref": "#/definitions/lto" + }, + "panic": { + "$ref": "#/definitions/panic" + }, + "incremental": { + "$ref": "#/definitions/incremental" + }, + "codegen-units": { + "$ref": "#/definitions/codegenUnits" + }, + "rpath": { + "$ref": "#/definitions/rpath" + }, + "build-override": { + "$ref": "#/definitions/buildOverride" + }, + "package": { + "$ref": "#/definitions/packageOverrides" + }, + "rustflags": { + "type": "array", + "description": "UNSTABLE: Extra compiler flags; requires -Z profile-rustflags.", + "items": { + "type": "string" + } + }, + "codegen-backend": { + "type": "string", + "description": "UNSTABLE: Compiler codegen backend; requires -Z codegen-backend." + }, + "trim-paths": { + "type": "string", + "description": "UNSTABLE: Trim filesystem paths; requires -Z trim-paths.", + "enum": ["none", "object", "all"] + }, + "hint-mostly-unused": { + "type": "boolean", + "description": "UNSTABLE: Mark crates mostly unused; requires -Z profile-hint-mostly-unused." + }, + "dir-name": { + "not": {}, + "description": "Removed: directory names follow the profile name." + } + } + }, + "customProfile": { + "description": "Settings for a user-defined Cargo profile. Custom profiles must declare `inherits` naming an existing (built-in or previously-defined) profile.\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/profiles.html#custom-profiles)", + "type": "object", + "x-tombi-table-keys-order": { + "properties": "schema" + }, + "properties": { + "inherits": { + "description": "Name of the profile this one inherits from. Required for every custom profile. The four built-ins (`dev`, `release`, `test`, `bench`) are always valid; you may also inherit from another custom profile.\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/profiles.html#custom-profiles)", + "type": "string", + "examples": ["dev", "release", "test", "bench"], + "x-intellij-enum-metadata": { + "dev": { + "description": "Inherit from the built-in `dev` profile." + }, + "release": { + "description": "Inherit from the built-in `release` profile." + }, + "test": { + "description": "Inherit from the built-in `test` profile." + }, + "bench": { + "description": "Inherit from the built-in `bench` profile." + } + } + }, + "opt-level": { + "$ref": "#/definitions/optLevel" + }, + "debug": { + "$ref": "#/definitions/debugLevel" + }, + "split-debuginfo": { + "$ref": "#/definitions/splitDebuginfo" + }, + "strip": { + "$ref": "#/definitions/strip" + }, + "debug-assertions": { + "$ref": "#/definitions/debugAssertions" + }, + "overflow-checks": { + "$ref": "#/definitions/overflowChecks" + }, + "lto": { + "$ref": "#/definitions/lto" + }, + "panic": { + "$ref": "#/definitions/panic" + }, + "incremental": { + "$ref": "#/definitions/incremental" + }, + "codegen-units": { + "$ref": "#/definitions/codegenUnits" + }, + "rpath": { + "$ref": "#/definitions/rpath" + }, + "build-override": { + "$ref": "#/definitions/buildOverride" + }, + "package": { + "$ref": "#/definitions/packageOverrides" + }, + "rustflags": { + "type": "array", + "description": "UNSTABLE: Extra compiler flags; requires -Z profile-rustflags.", + "items": { + "type": "string" + } + }, + "codegen-backend": { + "type": "string", + "description": "UNSTABLE: Compiler codegen backend; requires -Z codegen-backend." + }, + "trim-paths": { + "type": "string", + "description": "UNSTABLE: Trim filesystem paths; requires -Z trim-paths.", + "enum": ["none", "object", "all"] + }, + "hint-mostly-unused": { + "type": "boolean", + "description": "UNSTABLE: Mark crates mostly unused; requires -Z profile-hint-mostly-unused." + }, + "dir-name": { + "not": {}, + "description": "Removed: directory names follow the profile name." + } + } + }, + "buildOverride": { + "description": "Override profile settings for build scripts, proc-macros, and their dependencies. Accepts the same keys as a normal profile (excluding nested `package` and `build-override`).\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/profiles.html#overrides)", + "type": "object", + "x-tombi-table-keys-order": { + "properties": "schema" + }, + "examples": [ + { + "opt-level": 0, + "codegen-units": 256 + } + ], + "properties": { + "opt-level": { + "$ref": "#/definitions/optLevel" + }, + "debug": { + "$ref": "#/definitions/debugLevel" + }, + "split-debuginfo": { + "$ref": "#/definitions/splitDebuginfo" + }, + "strip": { + "$ref": "#/definitions/strip" + }, + "debug-assertions": { + "$ref": "#/definitions/debugAssertions" + }, + "overflow-checks": { + "$ref": "#/definitions/overflowChecks" + }, + "lto": { + "not": {}, + "description": "Not permitted in profile overrides." + }, + "panic": { + "not": {}, + "description": "Not permitted in profile overrides." + }, + "incremental": { + "$ref": "#/definitions/incremental" + }, + "codegen-units": { + "$ref": "#/definitions/codegenUnits" + }, + "rpath": { + "not": {}, + "description": "Not permitted in profile overrides." + }, + "rustflags": { + "type": "array", + "description": "UNSTABLE: Extra compiler flags; requires -Z profile-rustflags.", + "items": { + "type": "string" + } + }, + "codegen-backend": { + "type": "string", + "description": "UNSTABLE: Compiler codegen backend; requires -Z codegen-backend." + }, + "trim-paths": { + "type": "string", + "description": "UNSTABLE: Trim filesystem paths; requires -Z trim-paths.", + "enum": ["none", "object", "all"] + }, + "hint-mostly-unused": { + "type": "boolean", + "description": "UNSTABLE: Mark crates mostly unused; requires -Z profile-hint-mostly-unused." + }, + "package": { + "not": {}, + "description": "Not permitted in profile overrides." + }, + "build-override": { + "not": {}, + "description": "Not permitted in profile overrides." + }, + "dir-name": { + "not": {}, + "description": "Removed: directory names follow the profile name." + } + } + }, + "packageOverrides": { + "description": "Per-package profile overrides. Each key is a package name (or `\"*\"` for all dependencies, or a [`PackageId` spec](https://doc.rust-lang.org/cargo/reference/pkgid-spec.html) like `\"serde@1.0.0\"`).\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/profiles.html#overrides)", + "type": "object", + "x-tombi-additional-key-label": "package", + "x-tombi-table-keys-order": { + "additionalProperties": "ascending" + }, + "examples": [ + { + "image": { + "opt-level": 3 + } + }, + { + "*": { + "opt-level": 2 + } + } + ], + "propertyNames": { + "pattern": "^(\\*|[A-Za-z0-9_][A-Za-z0-9_+.@:-]*)$" + }, + "additionalProperties": { + "$ref": "#/definitions/profilePackageSettings" + } + }, + "profilePackageSettings": { + "description": "Per-package profile override. Cargo does not support `panic`, `lto`, or `rpath` here, and nested `build-override`/`package` are not allowed.\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/profiles.html#overrides)", + "type": "object", + "x-tombi-table-keys-order": { + "properties": "schema" + }, + "examples": [ + { + "opt-level": 3, + "debug": false, + "codegen-units": 1 + } + ], + "properties": { + "opt-level": { + "$ref": "#/definitions/optLevel" + }, + "debug": { + "$ref": "#/definitions/debugLevel" + }, + "split-debuginfo": { + "$ref": "#/definitions/splitDebuginfo" + }, + "strip": { + "$ref": "#/definitions/strip" + }, + "debug-assertions": { + "$ref": "#/definitions/debugAssertions" + }, + "overflow-checks": { + "$ref": "#/definitions/overflowChecks" + }, + "incremental": { + "$ref": "#/definitions/incremental" + }, + "codegen-units": { + "$ref": "#/definitions/codegenUnits" + }, + "rustflags": { + "type": "array", + "description": "UNSTABLE: Extra compiler flags; requires -Z profile-rustflags.", + "items": { + "type": "string" + } + }, + "codegen-backend": { + "type": "string", + "description": "UNSTABLE: Compiler codegen backend; requires -Z codegen-backend." + }, + "trim-paths": { + "type": "string", + "description": "UNSTABLE: Trim filesystem paths; requires -Z trim-paths.", + "enum": ["none", "object", "all"] + }, + "hint-mostly-unused": { + "type": "boolean", + "description": "UNSTABLE: Mark crates mostly unused; requires -Z profile-hint-mostly-unused." + }, + "panic": { + "not": {}, + "description": "Not permitted in profile overrides." + }, + "lto": { + "not": {}, + "description": "Not permitted in profile overrides." + }, + "rpath": { + "not": {}, + "description": "Not permitted in profile overrides." + }, + "package": { + "not": {}, + "description": "Not permitted in profile overrides." + }, + "build-override": { + "not": {}, + "description": "Not permitted in profile overrides." + }, + "dir-name": { + "not": {}, + "description": "Removed: directory names follow the profile name." + } + } + }, + "optLevel": { + "title": "opt-level", + "description": "Optimization level. Integers `0`-`3` set increasing optimization; `\"s\"` optimizes for binary size; `\"z\"` optimizes for size while disabling loop vectorization.\nDefaults: `0` for `dev`/`test`, `3` for `release`/`bench`.\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/profiles.html#opt-level)", + "examples": [0, 1, 2, 3, "s", "z"], + "oneOf": [ + { + "type": "integer", + "minimum": 0, + "maximum": 3 + }, + { + "type": "string", + "enum": ["s", "z"], + "x-intellij-enum-metadata": { + "s": { + "description": "Optimize for binary size." + }, + "z": { + "description": "Optimize for binary size, disabling loop vectorization." + } + }, + "x-taplo": { + "docs": { + "enumValues": [ + "Optimize for binary size.", + "Optimize for binary size, disabling loop vectorization." + ] + } + } + } + ] + }, + "debugLevel": { + "title": "debug", + "description": "Debug information: false/0/none disables it; 1/limited includes limited information; line-tables-only and line-directives-only are distinct modes; true/2/full includes full information.", + "examples": [ + true, + false, + 0, + 1, + 2, + "none", + "line-tables-only", + "line-directives-only", + "limited", + "full" + ], + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "integer", + "minimum": 0, + "maximum": 2 + }, + { + "type": "string", + "enum": [ + "none", + "line-directives-only", + "line-tables-only", + "limited", + "full" + ], + "x-intellij-enum-metadata": { + "none": { + "description": "No debug info." + }, + "line-directives-only": { + "description": "Line info directives only (useful for profilers)." + }, + "line-tables-only": { + "description": "Line tables only — backtraces with file/line, no variables/types." + }, + "limited": { + "description": "Limited debug information, equivalent to integer 1; distinct from line-tables-only." + }, + "full": { + "description": "Full debug info." + } + } + } + ] + }, + "splitDebuginfo": { + "title": "split-debuginfo", + "description": "Whether and how debug information is split out of the main executable.\nPlatform defaults: `\"unpacked\"` on macOS, `\"packed\"` on Windows MSVC, `\"off\"` elsewhere.\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/profiles.html#split-debuginfo)", + "type": "string", + "enum": ["off", "packed", "unpacked"], + "examples": ["off", "packed", "unpacked"], + "x-intellij-enum-metadata": { + "off": { + "description": "Debug info embedded in the main artifact (or omitted on macOS)." + }, + "packed": { + "description": "Debug info packaged into a single separate file (`.dwp`/`.dSYM`/`.pdb`)." + }, + "unpacked": { + "description": "Debug info left in per-object files alongside the artifact." + } + }, + "x-taplo": { + "docs": { + "enumValues": [ + "Debug info embedded in the main artifact (or omitted on macOS).", + "Debug info packaged into a single separate file (`.dwp`/`.dSYM`/`.pdb`).", + "Debug info left in per-object files alongside the artifact." + ] + } + } + }, + "strip": { + "title": "strip", + "description": "Whether to strip symbols and/or debug info from the final binary. `true` is equivalent to `\"symbols\"`; `false` to `\"none\"`.\nDefault: `\"none\"`.\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/profiles.html#strip)", + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "string", + "enum": ["none", "debuginfo", "symbols"], + "x-intellij-enum-metadata": { + "none": { + "description": "Do not strip anything." + }, + "debuginfo": { + "description": "Strip debug information." + }, + "symbols": { + "description": "Strip both debug info and symbols." + } + }, + "x-taplo": { + "docs": { + "enumValues": [ + "Do not strip anything.", + "Strip debug information.", + "Strip both debug info and symbols." + ] + } + } + } + ], + "examples": [true, false, "none", "debuginfo", "symbols"] + }, + "lto": { + "title": "lto", + "description": "Link-time optimization. `false` disables LTO with the local ThinLTO equivalent; `true`/`\"fat\"` performs fat LTO over the full dependency graph; `\"thin\"` is faster cross-crate ThinLTO; `\"off\"` disables LTO entirely (including local ThinLTO).\nDefault: `false`.\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/profiles.html#lto)", + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "string", + "enum": ["off", "thin", "fat"], + "x-intellij-enum-metadata": { + "off": { + "description": "Disable link-time optimization (including local ThinLTO)." + }, + "thin": { + "description": "Thin LTO across crates — faster than fat, similar runtime gains." + }, + "fat": { + "description": "Fat LTO across the whole dependency graph — slowest build, smallest/fastest binary." + } + }, + "x-taplo": { + "docs": { + "enumValues": [ + "Disable link-time optimization (including local ThinLTO).", + "Thin LTO across crates — faster than fat, similar runtime gains.", + "Fat LTO across the whole dependency graph — slowest build, smallest/fastest binary." + ] + } + } + } + ], + "examples": [true, false, "off", "thin", "fat"] + }, + "panic": { + "title": "panic", + "description": "Panic strategy: unwind or abort. immediate-abort requires unstable panic-immediate-abort support. Ignored for test/bench profiles.", + "type": "string", + "enum": ["unwind", "abort", "immediate-abort"], + "examples": ["unwind", "abort"], + "x-intellij-enum-metadata": { + "unwind": { + "description": "Unwind the stack on panic, running destructors." + }, + "abort": { + "description": "Terminate the process on panic without unwinding." + } + }, + "x-taplo": { + "docs": { + "enumValues": [ + "Unwind the stack on panic, running destructors.", + "Terminate the process on panic without unwinding." + ] + } + } + }, + "debugAssertions": { + "title": "debug-assertions", + "description": "Whether `debug_assert!` and related checks are compiled in.\nDefaults: `true` for `dev`/`test`, `false` for `release`/`bench`.\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/profiles.html#debug-assertions)", + "type": "boolean", + "examples": [true, false] + }, + "overflowChecks": { + "title": "overflow-checks", + "description": "Whether runtime integer overflow checks are emitted.\nDefaults: `true` for `dev`/`test`, `false` for `release`/`bench`.\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/profiles.html#overflow-checks)", + "type": "boolean", + "examples": [true, false] + }, + "incremental": { + "title": "incremental", + "description": "Whether incremental compilation is enabled. May be overridden by the `CARGO_INCREMENTAL` env var or `build.incremental`.\nDefaults: `true` for `dev`/`test`, `false` for `release`/`bench`.\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/profiles.html#incremental)", + "type": "boolean", + "examples": [true, false] + }, + "codegenUnits": { + "title": "codegen-units", + "description": "Number of parallel code generation units per crate. Defaults depend on incremental compilation: 256 when enabled, 16 otherwise.", + "type": "integer", + "minimum": 1, + "examples": [1, 16, 256] + }, + "rpath": { + "title": "rpath", + "description": "Whether the compiler embeds an `rpath` into the final binary.\nDefault: `false`.\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/profiles.html#rpath)", + "type": "boolean", + "examples": [true, false] + }, + "registries": { + "title": "[registries.*]", + "description": "Additional registries and crates.io registry protocol settings.\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/config.html#registries)", + "type": "object", + "x-tombi-additional-key-label": "registry", + "x-tombi-table-keys-order": { + "properties": "schema", + "additionalProperties": "ascending" + }, + "x-taplo": { + "links": { + "key": "https://doc.rust-lang.org/cargo/reference/config.html#registries" + } + }, + "examples": [ + { + "my-registry": { + "index": "https://example.com/git/index", + "credential-provider": "cargo:token" + }, + "crates-io": { + "protocol": "sparse" + } + } + ], + "properties": { + "crates-io": { + "$ref": "#/definitions/cratesIoRegistryConfig" + } + }, + "additionalProperties": { + "$ref": "#/definitions/customRegistryConfig" + } + }, + "cratesIoRegistryConfig": { + "description": "Settings for the official `crates-io` registry. Adds the `protocol` key (sparse vs. git index) on top of the shared registry properties. The default index URL is built into Cargo, so `index` is rarely set here.\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/config.html#registriescrates-ioprotocol)", + "type": "object", + "x-tombi-table-keys-order": { + "properties": "schema" + }, + "examples": [ + { + "protocol": "sparse" + }, + { + "protocol": "sparse", + "credential-provider": "cargo:token" + } + ], + "properties": { + "index": { + "description": "URL of the registry index. Rarely set under `[registries.crates-io]` because Cargo ships the canonical URL. Environment: `CARGO_REGISTRIES_CRATES_IO_INDEX`.\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/config.html#registriesnameindex)", + "type": "string", + "format": "uri", + "examples": ["https://github.com/rust-lang/crates.io-index"] + }, + "token": { + "description": "Authentication token for crates.io. Normally lives in `credentials.toml`, not `config.toml`. Environment: `CARGO_REGISTRIES_CRATES_IO_TOKEN`.\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/config.html#registriesnametoken)", + "type": "string", + "examples": ["example-private-registry-token"] + }, + "credential-provider": { + "$ref": "#/definitions/credentialProvider", + "description": "Credential provider for crates.io. If unset, falls back to `registry.global-credential-providers`. Environment: `CARGO_REGISTRIES_CRATES_IO_CREDENTIAL_PROVIDER`.\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/config.html#registriesnamecredential-provider)" + }, + "protocol": { + "description": "Protocol used to access crates.io. Only valid under `[registries.crates-io]`; user-defined registries advertise their protocol via the index URL itself (`sparse+https://...` or a git URL). Defaults to `\"sparse\"` since Cargo 1.70.\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/config.html#registriescrates-ioprotocol)", + "type": "string", + "enum": ["git", "sparse"], + "default": "sparse", + "examples": ["sparse", "git"], + "x-intellij-enum-metadata": { + "git": { + "description": "Clone the full git index from https://github.com/rust-lang/crates.io-index/. Slower for fresh resolves but mirrors the legacy behaviour." + }, + "sparse": { + "description": "Use the sparse HTTP index at https://index.crates.io/, fetching only the crates needed. Default since Cargo 1.70." + } + }, + "x-taplo": { + "docs": { + "enumValues": [ + "Clone the full git index from https://github.com/rust-lang/crates.io-index/. Slower for fresh resolves but mirrors the legacy behaviour.", + "Use the sparse HTTP index at https://index.crates.io/, fetching only the crates needed. Default since Cargo 1.70." + ] + } + } + }, + "min-publish-age": { + "type": "string", + "description": "Minimum publish age, for example \"7 days\" or \"0\". Requires Cargo 1.100+." + }, + "secret-key": { + "type": "string", + "description": "UNSTABLE: Asymmetric credential secret key; requires -Z asymmetric-token. Store in credentials.toml." + }, + "secret-key-subject": { + "type": "string", + "description": "UNSTABLE: Subject for asymmetric credentials; requires -Z asymmetric-token." + } + } + }, + "customRegistryConfig": { + "description": "Settings for a user-defined registry (any name other than `crates-io`). `protocol` is omitted: non-crates.io registries select their protocol through the `index` URL scheme (`sparse+https://...` for sparse, plain URL for git).\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/config.html#registriesname)", + "type": "object", + "x-tombi-table-keys-order": { + "properties": "schema" + }, + "x-taplo": { + "initKeys": ["index"] + }, + "examples": [ + { + "index": "https://example.com/git/index", + "credential-provider": "cargo:token" + }, + { + "index": "sparse+https://example.com/index/", + "token": "example-private-registry-token" + } + ], + "properties": { + "index": { + "description": "URL of the registry index. For sparse registries use `sparse+https://...`; for git registries use a plain `https://...` URL. Environment: `CARGO_REGISTRIES__INDEX`.\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/config.html#registriesnameindex)", + "type": "string", + "format": "uri", + "examples": [ + "https://example.com/git/index", + "sparse+https://example.com/index/" + ] + }, + "token": { + "description": "Authentication token for the registry. Normally lives in `credentials.toml`, not `config.toml`. Environment: `CARGO_REGISTRIES__TOKEN`.\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/config.html#registriesnametoken)", + "type": "string", + "examples": ["example-private-registry-token"] + }, + "credential-provider": { + "$ref": "#/definitions/credentialProvider", + "description": "Credential provider for this registry. If unset, falls back to `registry.global-credential-providers`. Environment: `CARGO_REGISTRIES__CREDENTIAL_PROVIDER`.\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/config.html#registriesnamecredential-provider)" + }, + "min-publish-age": { + "type": "string", + "description": "Minimum publish age, for example \"7 days\" or \"0\". Requires Cargo 1.100+." + }, + "secret-key": { + "type": "string", + "description": "UNSTABLE: Asymmetric credential secret key; requires -Z asymmetric-token. Store in credentials.toml." + }, + "secret-key-subject": { + "type": "string", + "description": "UNSTABLE: Subject for asymmetric credentials; requires -Z asymmetric-token." + } + } + }, + "registry": { + "title": "[registry]", + "description": "Default registry and crates.io credential settings.\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/config.html#registry)", + "type": "object", + "x-tombi-table-keys-order": { + "properties": "schema" + }, + "x-taplo": { + "links": { + "key": "https://doc.rust-lang.org/cargo/reference/config.html#registry" + } + }, + "examples": [ + { + "default": "my-registry" + }, + { + "token": "example-crates-io-token", + "credential-provider": "cargo:token", + "global-credential-providers": ["cargo:token"] + } + ], + "properties": { + "index": { + "not": {}, + "description": "REMOVED: registry.index is no longer accepted. Use registries..index or source configuration." + }, + "default": { + "description": "Name of the registry (from the `registries` table) to use by default for registry commands like `cargo publish`. Can be overridden with `--registry`. Environment: `CARGO_REGISTRY_DEFAULT`.\nhttps://doc.rust-lang.org/cargo/reference/config.html#registrydefault", + "type": "string", + "default": "crates-io", + "examples": ["crates-io", "my-registry"], + "x-taplo": { + "links": { + "key": "https://doc.rust-lang.org/cargo/reference/config.html#registrydefault" + } + } + }, + "credential-provider": { + "$ref": "#/definitions/credentialProvider", + "description": "Credential provider for crates.io. If unset, falls back to `registry.global-credential-providers`. If the value matches a key in `[credential-alias]`, the alias is used. Environment: `CARGO_REGISTRY_CREDENTIAL_PROVIDER`.\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/config.html#registrycredential-provider)", + "x-taplo": { + "links": { + "key": "https://doc.rust-lang.org/cargo/reference/config.html#registrycredential-provider" + } + } + }, + "token": { + "description": "Authentication token for crates.io. Should normally only appear in `credentials.toml`. Can be overridden with `--token`. Environment: `CARGO_REGISTRY_TOKEN`.\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/config.html#registrytoken)", + "type": "string", + "examples": ["example-crates-io-token"], + "x-taplo": { + "links": { + "key": "https://doc.rust-lang.org/cargo/reference/config.html#registrytoken" + } + } + }, + "global-credential-providers": { + "description": "Ordered list of global credential providers used when a registry does not configure its own. Order is significant: providers toward the END of the list have precedence. Path and arguments split on spaces; for paths/args containing spaces, define an alias in `[credential-alias]` and reference it here. Environment: `CARGO_REGISTRY_GLOBAL_CREDENTIAL_PROVIDERS`.\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/config.html#registryglobal-credential-providers)", + "type": "array", + "items": { + "$ref": "#/definitions/credentialProvider" + }, + "default": ["cargo:token"], + "examples": [["cargo:token"], ["cargo:token", "my-alias"]], + "x-taplo": { + "links": { + "key": "https://doc.rust-lang.org/cargo/reference/config.html#registryglobal-credential-providers" + } + } + }, + "global-min-publish-age": { + "type": "string", + "description": "Minimum publish age, for example \"7 days\" or \"0\". Requires Cargo 1.100+.", + "default": "0" + }, + "secret-key": { + "type": "string", + "description": "UNSTABLE: Asymmetric credential secret key; requires -Z asymmetric-token. Store in credentials.toml." + }, + "secret-key-subject": { + "type": "string", + "description": "UNSTABLE: Subject for asymmetric credentials; requires -Z asymmetric-token." + } + } + }, + "resolver": { + "title": "[resolver]", + "description": "Dependency resolver behavior for local development.\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/config.html#resolver)", + "type": "object", + "x-tombi-table-keys-order": { + "properties": "schema" + }, + "x-taplo": { + "links": { + "key": "https://doc.rust-lang.org/cargo/reference/config.html#resolver" + } + }, + "examples": [ + { + "incompatible-rust-versions": "fallback" + }, + { + "lockfile-path": "locks/Cargo.lock" + } + ], + "properties": { + "lockfile-path": { + "description": "Path to the lockfile to use when resolving dependencies. Useful with read-only source directories. The path must end with `Cargo.lock`. Requires Cargo 1.97+. Environment: `CARGO_RESOLVER_LOCKFILE_PATH`.\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/config.html#resolverlockfile-path)", + "type": "string", + "minLength": 1, + "pattern": "Cargo\\.lock$", + "examples": [ + "Cargo.lock", + "locks/Cargo.lock", + "/abs/path/Cargo.lock" + ], + "x-taplo": { + "links": { + "key": "https://doc.rust-lang.org/cargo/reference/config.html#resolverlockfile-path" + } + } + }, + "incompatible-rust-versions": { + "description": "How dependency versions with incompatible package.rust-version values are treated.\nhttps://doc.rust-lang.org/cargo/reference/config.html#resolverincompatible-rust-versions Default is allow for resolver 1/2 and fallback for resolver 3.", + "type": "string", + "enum": ["allow", "fallback"], + "examples": ["allow", "fallback"], + "x-intellij-enum-metadata": { + "allow": { + "description": "Treat rust-version-incompatible versions like any other version." + }, + "fallback": { + "description": "Only consider rust-version-incompatible versions if no compatible version matched." + } + }, + "x-taplo": { + "docs": { + "enumValues": [ + "Treat rust-version-incompatible versions like any other version.", + "Only consider rust-version-incompatible versions if no compatible version matched." + ] + } + } + }, + "incompatible-publish-age": { + "type": "string", + "enum": ["allow", "deny"], + "default": "deny", + "description": "How to handle versions younger than the minimum publish age. Requires Cargo 1.100+." + }, + "feature-unification": { + "type": "string", + "description": "UNSTABLE: Feature unification scope; requires -Z feature-unification.", + "enum": ["package", "selected", "workspace"] + } + } + }, + "sources": { + "title": "[source.*]", + "description": "Named registry source definitions and source replacement.\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/config.html#source)", + "type": "object", + "x-tombi-additional-key-label": "source", + "x-tombi-table-keys-order": { + "additionalProperties": "ascending" + }, + "x-taplo": { + "links": { + "key": "https://doc.rust-lang.org/cargo/reference/config.html#source" + } + }, + "additionalProperties": { + "$ref": "#/definitions/source" + }, + "examples": [ + { + "crates-io": { + "replace-with": "vendored-sources" + }, + "vendored-sources": { + "directory": "vendor" + } + } + ], + "properties": { + "crates-io": { + "$ref": "#/definitions/source" + } + } + }, + "source": { + "description": "Source definition. At most one source location; crates-io can use its implicit location. Other sources require a location after merging. replace-with redirects the identified source.", + "type": "object", + "x-tombi-table-keys-order": { + "properties": "schema" + }, + "x-taplo": { + "initKeys": ["replace-with"] + }, + "examples": [ + { + "replace-with": "vendored-sources" + }, + { + "directory": "vendor" + }, + { + "git": "https://example.com/repo.git", + "branch": "main" + } + ], + "properties": { + "replace-with": { + "description": "Replacement source name. The source location still identifies what is replaced.", + "type": "string", + "minLength": 1, + "examples": ["vendored-sources"] + }, + "directory": { + "description": "Path to a directory source.\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/config.html#sourcenamedirectory)", + "type": "string", + "minLength": 1, + "examples": ["vendor"] + }, + "registry": { + "description": "URL of a registry source.\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/config.html#sourcenameregistry)", + "type": "string", + "format": "uri", + "examples": ["https://example.com/git/index"] + }, + "local-registry": { + "description": "Path to a local registry source.\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/config.html#sourcenamelocal-registry)", + "type": "string", + "minLength": 1, + "examples": ["local-registry"] + }, + "git": { + "description": "URL of a git repository source.\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/config.html#sourcenamegit)", + "type": "string", + "format": "uri", + "examples": ["https://example.com/repo.git"] + }, + "branch": { + "description": "Git reference selector. Cargo prefers branch, then tag, then rev when multiple are present; otherwise uses the default branch.", + "type": "string", + "minLength": 1, + "examples": ["main"] + }, + "tag": { + "description": "Git reference selector. Cargo prefers branch, then tag, then rev when multiple are present; otherwise uses the default branch.", + "type": "string", + "minLength": 1, + "examples": ["v1.0.0"] + }, + "rev": { + "description": "Git reference selector. Cargo prefers branch, then tag, then rev when multiple are present; otherwise uses the default branch.", + "type": "string", + "minLength": 1, + "examples": ["abcdef1234567890"] + } + }, + "allOf": [ + { + "not": { + "required": ["registry", "local-registry"], + "properties": { + "registry": {}, + "local-registry": {} + } + } + }, + { + "not": { + "required": ["registry", "directory"], + "properties": { + "registry": {}, + "directory": {} + } + } + }, + { + "not": { + "required": ["registry", "git"], + "properties": { + "registry": {}, + "git": {} + } + } + }, + { + "not": { + "required": ["local-registry", "directory"], + "properties": { + "local-registry": {}, + "directory": {} + } + } + }, + { + "not": { + "required": ["local-registry", "git"], + "properties": { + "local-registry": {}, + "git": {} + } + } + }, + { + "not": { + "required": ["directory", "git"], + "properties": { + "directory": {}, + "git": {} + } + } + } + ] + }, + "targets": { + "title": "[target.*]", + "description": "Target-specific platform settings. Keys are target triples, cfg expressions, or custom target names.\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/config.html#target)", + "type": "object", + "x-tombi-additional-key-label": "target", + "x-tombi-table-keys-order": { + "additionalProperties": "ascending" + }, + "x-taplo": { + "links": { + "key": "https://doc.rust-lang.org/cargo/reference/config.html#target" + } + }, + "propertyNames": { + "description": "Target triple (e.g. `x86_64-unknown-linux-gnu`), `cfg(...)` expression, or the filename stem of a custom target spec JSON file. Must be non-empty and start with a non-whitespace character.", + "type": "string", + "pattern": "^\\S.*$", + "minLength": 1 + }, + "additionalProperties": { + "$ref": "#/definitions/target" + }, + "examples": [ + { + "x86_64-unknown-linux-gnu": { + "linker": "clang", + "runner": ["qemu-x86_64", "-L", "/usr/x86_64-linux-gnu"], + "rustflags": ["-C", "link-arg=-fuse-ld=lld"] + }, + "thumbv7m-none-eabi": { + "linker": "arm-none-eabi-gcc" + } + } + ] + }, + "target": { + "title": "target entry", + "description": "Settings applied when building for a single target. The owning key is a target triple (e.g. `x86_64-unknown-linux-gnu`), a `cfg(...)` expression, or a custom JSON target name. Recognised properties configure the linker, runner, and rustc/rustdoc flags; any additional key is treated as a `links` library override (build script metadata).\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/config.html#target)", + "type": "object", + "x-tombi-table-keys-order": { + "properties": "schema", + "additionalProperties": "ascending" + }, + "x-taplo": { + "links": { + "key": "https://doc.rust-lang.org/cargo/reference/config.html#target" + } + }, + "examples": [ + { + "linker": "clang", + "runner": "qemu-x86_64", + "rustflags": ["-C", "target-cpu=native"] + }, + { + "runner": ["qemu-arm", "-L", "/usr/arm-linux-gnueabihf"], + "rustdocflags": ["--cfg", "docsrs"] + }, + { + "foo": { + "rustc-link-lib": ["foo"], + "rustc-link-search": ["/path/to/foo"], + "rustc-env": { + "FOO_SYS_STATIC": "1" + }, + "metadata_version": "1.2.3" + } + } + ], + "properties": { + "ar": { + "description": "DEPRECATED. This option is unused.\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/config.html#targettriplear)", + "type": "string", + "deprecated": true + }, + "linker": { + "description": "Linker passed to rustc for this target.\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/config.html#targettriplelinker)", + "type": "string", + "examples": ["clang", "arm-none-eabi-gcc"] + }, + "runner": { + "$ref": "#/definitions/stringOrStringArray", + "description": "Runner command used to execute target binaries.\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/config.html#targettriplerunner)" + }, + "rustflags": { + "$ref": "#/definitions/stringOrStringArray", + "description": "Extra rustc flags for this target.\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/config.html#targettriplerustflags)" + }, + "rustdocflags": { + "$ref": "#/definitions/stringOrStringArray", + "description": "Extra rustdoc flags for this target.\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/config.html#targettriplerustdocflags)" + } + }, + "x-tombi-additional-key-label": "links", + "additionalProperties": { + "$ref": "#/definitions/targetLinksOverride" + } + }, + "targetLinksOverride": { + "title": "links library override", + "description": "Build script override for a target `links` library. When present, the build script for the named library is skipped and these values are used instead. Arbitrary keys beyond the recognised `rustc-*` set become opaque metadata exposed to dependents as `DEP__` env vars.\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/config.html#targettriplelinks)", + "type": "object", + "x-tombi-table-keys-order": { + "properties": "schema", + "additionalProperties": "ascending" + }, + "x-taplo": { + "links": { + "key": "https://doc.rust-lang.org/cargo/reference/config.html#targettriplelinks" + } + }, + "examples": [ + { + "rustc-link-lib": ["foo"], + "rustc-link-search": ["/path/to/foo"], + "rustc-env": { + "FOO_SYS_STATIC": "1" + }, + "metadata_version": "1.2.3" + } + ], + "properties": { + "rustc-link-lib": { + "title": "rustc-link-lib", + "description": "Libraries to link, equivalent to passing `-l ` to `rustc`. Order is preserved and may affect symbol resolution.", + "type": "array", + "items": { + "type": "string", + "minLength": 1 + }, + "examples": [["foo"]] + }, + "rustc-link-search": { + "title": "rustc-link-search", + "description": "Library search paths, equivalent to passing `-L ` to `rustc`. Searched in the listed order.", + "type": "array", + "items": { + "type": "string", + "minLength": 1 + }, + "examples": [["/path/to/foo"]] + }, + "rustc-flags": { + "title": "rustc-flags", + "description": "Extra `rustc` flags. Whitespace-separated string; only `-l` and `-L` flags are accepted.", + "type": "string", + "examples": ["-L /some/path"] + }, + "rustc-cfg": { + "title": "rustc-cfg", + "description": "Custom `--cfg` flags enabled while compiling dependents of this links library. Order is preserved.", + "type": "array", + "items": { + "type": "string", + "minLength": 1 + }, + "examples": [["key=\"value\""]] + }, + "rustc-env": { + "title": "rustc-env", + "description": "Environment variables exposed to `rustc` while compiling dependents of this links library.", + "type": "object", + "x-tombi-additional-key-label": "variable", + "x-tombi-table-keys-order": { + "additionalProperties": "ascending" + }, + "additionalProperties": { + "type": "string" + }, + "examples": [ + { + "FOO_SYS_STATIC": "1" + } + ] + }, + "rustc-cdylib-link-arg": { + "title": "rustc-cdylib-link-arg", + "description": "Extra link args appended when building a `cdylib` that depends on this links library. Order is preserved (passed to the linker positionally).", + "type": "array", + "items": { + "type": "string", + "minLength": 1 + }, + "examples": [["-Wl,--as-needed"]] + }, + "rustc-check-cfg": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Build-script override for rustc-check-cfg." + }, + "rustc-link-arg": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Build-script override for rustc-link-arg." + }, + "rustc-link-arg-cdylib": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Build-script override for rustc-link-arg-cdylib." + }, + "rustc-link-arg-bins": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Build-script override for rustc-link-arg-bins." + }, + "rustc-link-arg-tests": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Build-script override for rustc-link-arg-tests." + }, + "rustc-link-arg-benches": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Build-script override for rustc-link-arg-benches." + }, + "rustc-link-arg-examples": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Build-script override for rustc-link-arg-examples." + }, + "warning": { + "not": {}, + "description": "Not supported in build-script overrides." + }, + "rerun-if-changed": { + "not": {}, + "description": "Not supported in build-script overrides." + }, + "rerun-if-env-changed": { + "not": {}, + "description": "Not supported in build-script overrides." + } + }, + "x-tombi-additional-key-label": "metadata", + "additionalProperties": { + "type": "string", + "description": "Build-script metadata value." + } + }, + "hostConfig": { + "type": "object", + "properties": { + "ar": { + "description": "DEPRECATED. This option is unused.\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/config.html#targettriplear)", + "type": "string", + "deprecated": true + }, + "linker": { + "description": "Linker passed to rustc for this target.\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/config.html#targettriplelinker)", + "type": "string", + "examples": ["clang", "arm-none-eabi-gcc"] + }, + "runner": { + "$ref": "#/definitions/stringOrStringArray", + "description": "Runner command used to execute target binaries.\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/config.html#targettriplerunner)" + }, + "rustflags": { + "$ref": "#/definitions/stringOrStringArray", + "description": "Extra rustc flags for this target.\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/config.html#targettriplerustflags)" + }, + "rustdocflags": { + "$ref": "#/definitions/stringOrStringArray", + "description": "Extra rustdoc flags for this target.\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/config.html#targettriplerustdocflags)" + } + }, + "additionalProperties": { + "$ref": "#/definitions/target" + }, + "x-tombi-table-keys-order": { + "properties": "schema" + } + }, + "term": { + "title": "[term]", + "description": "Terminal output and interaction settings.\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/config.html#term)", + "type": "object", + "x-tombi-table-keys-order": { + "properties": "schema" + }, + "x-taplo": { + "links": { + "key": "https://doc.rust-lang.org/cargo/reference/config.html#term" + } + }, + "examples": [ + { + "quiet": false, + "verbose": true, + "color": "always" + }, + { + "unicode": true, + "hyperlinks": true, + "progress": { + "when": "auto", + "width": 80, + "term-integration": true + } + } + ], + "not": { + "properties": { + "quiet": { + "const": true + }, + "verbose": { + "const": true + } + }, + "required": ["quiet", "verbose"] + }, + "properties": { + "quiet": { + "description": "Whether Cargo output is quiet.\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/config.html#termquiet)", + "type": "boolean", + "default": false, + "examples": [false, true], + "x-taplo": { + "docs": { + "main": "Controls whether or not log messages are displayed by Cargo.\n\nMutually exclusive with `term.verbose` --- they cannot both be `true`. The `--quiet` CLI flag overrides and forces quiet output; `--verbose` overrides and disables it.\n\nDefault: `false`. Environment: `CARGO_TERM_QUIET`." + } + } + }, + "verbose": { + "description": "Whether Cargo output is verbose.\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/config.html#termverbose)", + "type": "boolean", + "default": false, + "examples": [false, true], + "x-taplo": { + "docs": { + "main": "Controls whether or not extra detailed messages are displayed by Cargo.\n\nMutually exclusive with `term.quiet` --- they cannot both be `true`. The `--verbose` CLI flag overrides and forces verbose output; `--quiet` overrides and disables it.\n\nDefault: `false`. Environment: `CARGO_TERM_VERBOSE`." + } + } + }, + "color": { + "$ref": "#/definitions/terminalWhen", + "description": "Whether Cargo colorizes terminal output.\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/config.html#termcolor)", + "default": "auto", + "x-taplo": { + "docs": { + "main": "Controls whether or not colored output is used in the terminal.\n\n- `\"auto\"` --- automatically detect if color support is available.\n- `\"always\"` --- always display colors.\n- `\"never\"` --- never display colors.\n\nCan be overridden with the `--color` CLI option. Default: `\"auto\"`. Environment: `CARGO_TERM_COLOR`." + } + } + }, + "hyperlinks": { + "description": "Whether Cargo uses hyperlinks in terminal output. Auto-detected when unset.\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/config.html#termhyperlinks)", + "type": "boolean", + "examples": [true, false], + "x-taplo": { + "docs": { + "main": "Controls whether or not hyperlinks are used in the terminal.\n\nWhen unset, Cargo auto-detects terminal support --- there is no static default. Environment: `CARGO_TERM_HYPERLINKS`." + } + } + }, + "unicode": { + "description": "Whether Cargo can render non-ASCII Unicode characters. Auto-detected when unset.\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/config.html#termunicode)", + "type": "boolean", + "examples": [true, false], + "x-taplo": { + "docs": { + "main": "Controls whether output can be rendered using non-ASCII Unicode characters.\n\nWhen unset, Cargo auto-detects terminal support --- there is no static default. Environment: `CARGO_TERM_UNICODE`." + } + } + }, + "progress": { + "description": "Progress bar configuration.\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/config.html#termprogresswhen)", + "type": "object", + "x-tombi-table-keys-order": { + "properties": "schema" + }, + "x-taplo": { + "links": { + "key": "https://doc.rust-lang.org/cargo/reference/config.html#termprogresswhen" + } + }, + "examples": [ + { + "when": "auto", + "width": 80, + "term-integration": true + }, + { + "when": "never" + } + ], + "properties": { + "when": { + "$ref": "#/definitions/terminalWhen", + "description": "Whether Cargo shows a progress bar.\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/config.html#termprogresswhen)", + "default": "auto", + "x-taplo": { + "docs": { + "main": "Controls whether or not the progress bar is shown in the terminal.\n\n- `\"auto\"` --- intelligently guess whether to show the progress bar.\n- `\"always\"` --- always show the progress bar.\n- `\"never\"` --- never show the progress bar; `term.progress.width` then has no effect.\n\nDefault: `\"auto\"`. Environment: `CARGO_TERM_PROGRESS_WHEN`." + } + } + }, + "width": { + "description": "Progress width in columns (non-negative). Required when when = \"always\".", + "type": "integer", + "minimum": 0, + "examples": [80, 100, 120] + }, + "term-integration": { + "description": "Whether Cargo reports progress to the terminal emulator (e.g. taskbar). Auto-detected when unset.\n\n[Cargo documentation](https://doc.rust-lang.org/cargo/reference/config.html#termprogressterm-integration)", + "type": "boolean", + "examples": [true, false], + "x-taplo": { + "docs": { + "main": "Reports progress to the terminal emulator for display in places like the taskbar.\n\nWhen unset, Cargo auto-detects terminal support --- there is no static default. Environment: `CARGO_TERM_PROGRESS_TERM_INTEGRATION`." + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "when": { + "const": "always" + } + }, + "required": ["when"] + }, + "then": { + "required": ["width"], + "properties": { + "width": {} + } + } + } + ] + } + } + }, + "terminalWhen": { + "type": "string", + "enum": ["auto", "always", "never"], + "examples": ["auto", "always", "never"], + "x-intellij-enum-metadata": { + "auto": { + "description": "Automatically detect behavior." + }, + "always": { + "description": "Always enable behavior." + }, + "never": { + "description": "Never enable behavior." + } + }, + "x-taplo": { + "docs": { + "enumValues": [ + "Automatically detect behavior.", + "Always enable behavior.", + "Never enable behavior." + ] + } + } + } + } +} diff --git a/src/test/cargo-config/cargo.toml b/src/test/cargo-config/cargo.toml new file mode 100644 index 00000000000..fb60ce7ef34 --- /dev/null +++ b/src/test/cargo-config/cargo.toml @@ -0,0 +1,13 @@ +#:schema ../../schemas/json/cargo-config.json +# Source: https://github.com/rust-lang/cargo/blob/30754e087c97c58c6c36d0440d4cf1aecb3330a9/.cargo/config.toml +[alias] +build-man = "run --package xtask-build-man --" +stale-label = "run --package xtask-stale-label --" +bump-check = "run --package xtask-bump-check --" +lint-docs = "run --package xtask-lint-docs --" +spellcheck = "run --package xtask-spellcheck --" + +[env] +# HACK: Until this is stabilized, `snapbox`s polyfill could get confused +# inside of the rust-lang/rust repo because it looks for the furthest-away `Cargo.toml` +CARGO_RUSTC_CURRENT_DIR = { value = "", relative = true } diff --git a/src/test/cargo-config/config.toml b/src/test/cargo-config/config.toml new file mode 100644 index 00000000000..9a19945b5e7 --- /dev/null +++ b/src/test/cargo-config/config.toml @@ -0,0 +1,25 @@ +#:schema ../../schemas/json/cargo-config.json +[build] +jobs = -1 +rustc-wrapper = "" +target = ["x86_64-unknown-linux-gnu"] + +[env] +RUST_LOG = "info" +OPENSSL_DIR = { value = "vendor/openssl", relative = true } + +[http] +proxy = "localhost:8080" +timeout = 0 + +[source.crates-io] +replace-with = "vendor" +[source.vendor] +directory = "vendor" + +[profile.release] +debug = "limited" + +[term.progress] +when = "always" +width = 0 diff --git a/src/test/cargo-config/deno.toml b/src/test/cargo-config/deno.toml new file mode 100644 index 00000000000..c14d39547b2 --- /dev/null +++ b/src/test/cargo-config/deno.toml @@ -0,0 +1,76 @@ +#:schema ../../schemas/json/cargo-config.json +# Source: https://github.com/denoland/deno/blob/7a83c980a9e8ece2e784334b77e1526e5df94271/.cargo/config.toml +[target.x86_64-pc-windows-msvc] +rustflags = [ + "-C", + "target-feature=+crt-static", + "-C", + "symbol-mangling-version=v0", +] + +# Cargo evaluates `target.'cfg(...)'` specs against `rustc --print cfg --target +# `, whose output always contains `debug_assertions` no matter which +# profile is being built. So `cfg(all(windows, debug_assertions))` matches every +# Windows build and `cfg(all(windows, not(debug_assertions)))` matches none of +# them, with no warning either way. Don't try to gate rustflags on the profile +# here — there is no stable way to do it. +# +# This section was previously spelled cfg(all(windows, debug_assertions)) with a +# debug-only intent, so per the above it has always applied to release builds +# too. That's what we want (see below); cfg(windows) just says so honestly. +# A cfg(all(windows, not(debug_assertions))) section setting link-arg=/OPT:ICF +# was removed: it never matched, and it was redundant anyway because rustc +# already passes /OPT:REF,ICF whenever optimizations are enabled. +[target.'cfg(windows)'] +rustflags = [ + "-C", + "target-feature=+crt-static", + "-C", + # On Windows a thread created without an explicit stack size — including the + # process main thread — gets the PE header's reserve, and MSVC defaults that + # to 1MB. The main V8 isolate runs on the main thread (deno::main -> + # create_and_run_current_thread -> a tokio current_thread runtime runs its + # spawned task on the thread that calls block_on), and 1MB is not enough for + # it: it overflows when launching sub commands, and it leaves no headroom + # below V8's own JS stack limit (--stack-size, 1MB by default), so deep JS + # would abort the process instead of raising RangeError. Reserve 4MB. This is + # address space only; pages are committed on demand. + "link-arg=/STACK:4194304", +] + +# Emit the modern chained-fixups format (LC_DYLD_CHAINED_FIXUPS) via -fixup_chains +# instead of the legacy LC_DYLD_INFO_ONLY rebase/bind opcode stream. dyld applies +# chained fixups lazily per-page instead of eagerly walking every relocation at +# launch, cutting pre-main startup (~0.8ms on the ~116MB binary). Requires a +# macOS 12 deployment target (older dyld can't parse the format) and the bundled +# ld64.lld bumped to LLD 20 (LLD 17 segfaults on -fixup_chains; see tools/util.js). +[env] +MACOSX_DEPLOYMENT_TARGET = "12.0" + +[target.x86_64-apple-darwin] +rustflags = [ + "-C", + "link-args=-Wl,-fixup_chains -weak_framework Metal -weak_framework MetalPerformanceShaders -weak_framework QuartzCore -weak_framework CoreGraphics", +] + +[target.aarch64-apple-darwin] +rustflags = [ + "-C", + # --icf=safe folds identical (address-insignificant) functions; ~6MB (~10%) idle RSS win, measured on release. + # -fixup_chains: see [env] note above (chained fixups -> faster pre-main launch). + "link-args=-fuse-ld=lld -Wl,--icf=safe -Wl,-fixup_chains -weak_framework Metal -weak_framework MetalPerformanceShaders -weak_framework QuartzCore -weak_framework CoreGraphics", +] + +[target.'cfg(all())'] +rustflags = [ + "-D", + "clippy::all", + "-D", + "clippy::await_holding_refcell_ref", + "-D", + "clippy::missing_safety_doc", + "-D", + "clippy::undocumented_unsafe_blocks", + "--cfg", + "tokio_unstable", +] diff --git a/src/test/cargo-config/inherited.toml b/src/test/cargo-config/inherited.toml new file mode 100644 index 00000000000..966ffa2d7f9 --- /dev/null +++ b/src/test/cargo-config/inherited.toml @@ -0,0 +1,6 @@ +#:schema ../../schemas/json/cargo-config.json +# Values such as profile inheritance and source locations may come from parent configs. +[profile.custom] +opt-level = 2 +[source.parent-source] +replace-with = "vendor" diff --git a/src/test/cargo-config/rust-analyzer.toml b/src/test/cargo-config/rust-analyzer.toml new file mode 100644 index 00000000000..80074be0f40 --- /dev/null +++ b/src/test/cargo-config/rust-analyzer.toml @@ -0,0 +1,18 @@ +#:schema ../../schemas/json/cargo-config.json +# Source: https://github.com/rust-lang/rust-analyzer/blob/fa88768e772857f332bc8383e3a1c5a4212f9a6e/.cargo/config.toml +[alias] +xtask = "run --package xtask --bin xtask --" +tq = "test -- -q" +qt = "tq" +lint = "clippy --all-targets -- --cap-lints warn" +codegen = "run --package xtask --bin xtask -- codegen" +dist = "run --package xtask --bin xtask -- dist" + +[target.x86_64-pc-windows-msvc] +linker = "rust-lld" + +[target.arm-unknown-linux-gnueabihf] +linker = "arm-linux-gnueabihf-gcc-8" + +[env] +CARGO_WORKSPACE_DIR = { value = "", relative = true } diff --git a/src/test/cargo-config/servo.toml b/src/test/cargo-config/servo.toml new file mode 100644 index 00000000000..6956d99e166 --- /dev/null +++ b/src/test/cargo-config/servo.toml @@ -0,0 +1,38 @@ +#:schema ../../schemas/json/cargo-config.json +# Source: https://github.com/servo/servo/blob/eb14a6f34a262ef166ec5ae22ef4aa79ba79e6a5/.cargo/config.toml +[target.aarch64-linux-android] +linker = "aarch64-linux-android30-clang" + +[target.armv7-linux-androideabi] +linker = "armv7a-linux-androideabi30-clang" + +[target.armv-linux-androideabi] +linker = "armv7a-linux-androideabi30-clang" + +[target.i686-linux-android] +linker = "i686-linux-android30-clang" + +[target.x86_64-linux-android] +linker = "x86_64-linux-android30-clang" + +[target.x86_64-pc-windows-msvc] +linker = "lld-link.exe" + +[target.x86_64-uwp-windows-msvc] +linker = "lld-link.exe" + +[target.i686-pc-windows-msvc] +linker = "lld-link.exe" + +[target.aarch64-pc-windows-msvc] +linker = "lld-link.exe" + +[target.aarch64-uwp-windows-msvc] +linker = "lld-link.exe" + +[env] +MACOSX_DEPLOYMENT_TARGET = "13.0" +RUSTC_BOOTSTRAP = "crown,script,script_webgpu,script_bindings,style_tests,mozjs,mozjs_sys" + +[build] +rustdocflags = ["--document-private-items"] diff --git a/src/test/cargo-config/unstable.toml b/src/test/cargo-config/unstable.toml new file mode 100644 index 00000000000..e4b016f25b9 --- /dev/null +++ b/src/test/cargo-config/unstable.toml @@ -0,0 +1,13 @@ +#:schema ../../schemas/json/cargo-config.json +[unstable] +build-std = ["core"] +[unstable.git] +shallow_index = true +[build] +sbom = true +[build.analysis] +enabled = true +[host] +linker = "cc" +[host.x86_64-unknown-linux-gnu] +rustflags = ["-C", "opt-level=1"] diff --git a/src/test/cargo-config/zed.toml b/src/test/cargo-config/zed.toml new file mode 100644 index 00000000000..6e00041b458 --- /dev/null +++ b/src/test/cargo-config/zed.toml @@ -0,0 +1,48 @@ +#:schema ../../schemas/json/cargo-config.json +# Source: https://github.com/zed-industries/zed/blob/46ee98a8e0268cb85381413c01cd38d84b60ac67/.cargo/config.toml +[build] +# v0 mangling scheme provides more detailed backtraces around closures +rustflags = ["-C", "symbol-mangling-version=v0", "--cfg", "tokio_unstable"] + +[alias] +xtask = "run --package xtask --" +perf-test = [ + "test", + "--profile", + "release-fast", + "--lib", + "--bins", + "--tests", + "--all-features", + "--config", + "target.'cfg(true)'.runner='cargo run -p perf --release'", + "--config", + "target.'cfg(true)'.rustflags=[\"--cfg\", \"perf_enabled\"]", +] +# Keep similar flags here to share some ccache +perf-compare = [ + "run", + "--profile", + "release-fast", + "-p", + "perf", + "--config", + "target.'cfg(true)'.rustflags=[\"--cfg\", \"perf_enabled\"]", + "--", + "compare", +] + +[target.'cfg(target_os = "windows")'] +rustflags = [ + "--cfg", + "windows_slim_errors", # This cfg will reduce the size of `windows::core::Error` from 16 bytes to 4 bytes + "-C", + "target-feature=+crt-static", # This fixes the linking issue when compiling livekit on Windows +] + +# We need lld to link libwebrtc.a successfully on aarch64-linux +[target.aarch64-unknown-linux-gnu] +rustflags = ["-C", "link-arg=-fuse-ld=lld"] + +[env] +MACOSX_DEPLOYMENT_TARGET = "10.15.7" From b3525279d82321c1a80d1b597a901641e729ea88 Mon Sep 17 00:00:00 2001 From: Kaj Kowalski Date: Wed, 16 Sep 2026 01:09:37 +0200 Subject: [PATCH 4/4] fix(dependabot): update transitive dependency descriptions (#6357) --- src/schemas/json/dependabot-2.0.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/schemas/json/dependabot-2.0.json b/src/schemas/json/dependabot-2.0.json index 3d5af4e227f..1184c6f768a 100644 --- a/src/schemas/json/dependabot-2.0.json +++ b/src/schemas/json/dependabot-2.0.json @@ -613,10 +613,10 @@ "description": "All explicitly defined dependencies." }, "indirect": { - "description": "Dependencies of direct dependencies (also known as sub-dependencies, or transient dependencies)." + "description": "Dependencies of direct dependencies (also known as sub-dependencies, or transitive dependencies). Supported by bundler, pip, composer, cargo, gomod, and uv." }, "all": { - "description": "All explicitly defined dependencies. For bundler, pip, composer, cargo, also the dependencies of direct dependencies." + "description": "All explicitly defined dependencies. For bundler, pip, composer, cargo, gomod, and uv, also the dependencies of direct dependencies." }, "production": { "description": "Only dependencies in the 'Product dependency group'."