diff --git a/src/schemas/json/cargo.json b/src/schemas/json/cargo.json index 4077af1e710..5ddf4368588 100644 --- a/src/schemas/json/cargo.json +++ b/src/schemas/json/cargo.json @@ -831,20 +831,50 @@ } }, "ProfileWithBuildOverride": { - "allOf": [ - { - "$ref": "#/definitions/Profile" + "title": "Profile with Build Override", + "type": "object", + "properties": { + "opt-level": { + "$ref": "#/definitions/OptLevel" }, - { - "type": "object", - "properties": { - "build-override": { - "$ref": "#/definitions/Profile" - } - }, - "x-tombi-table-keys-order": "schema" + "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" + }, + "package": { + "$ref": "#/definitions/ProfilePackageOverrides" + }, + "build-override": { + "$ref": "#/definitions/Profile" } - ] + }, + "x-tombi-table-keys-order": "schema" }, "SplitDebuginfo": { "title": "SplitDebuginfo", @@ -865,7 +895,99 @@ "enum": ["unpacked"], "description": "This means that debug information will be found in separate files for each compilation unit (object file). This is not supported on Windows MSVC. On macOS this means the original object files will contain debug information. On other Unix platforms this means that *.dwo files will contain debug information." } - ] + ], + "x-taplo": { + "links": { + "key": "https://doc.rust-lang.org/cargo/reference/profiles.html#split-debuginfo" + } + } + }, + "Strip": { + "oneOf": [ + { + "type": "string", + "description": "The strip option controls the -C strip flag, which directs rustc to strip either symbols or debuginfo from a binary.", + "enum": ["none", "debuginfo", "symbols"], + "default": "none" + }, + { + "type": "boolean", + "enum": [true], + "title": "Equivalent to \"symbols\"", + "description": "The strip option controls the -C strip flag, which directs rustc to strip either symbols or debuginfo from a binary." + }, + { + "type": "boolean", + "enum": [false], + "title": "Equivalent to \"none\"", + "description": "The strip option controls the -C strip flag, which directs rustc to strip either symbols or debuginfo from a binary." + } + ], + "x-taplo": { + "links": { + "key": "https://doc.rust-lang.org/cargo/reference/profiles.html#strip" + } + } + }, + "DebugAssertions": { + "description": "The `debug-assertions` setting controls the [`-C debug-assertions` flag](https://doc.rust-lang.org/rustc/codegen-options/index.html#debug-assertions) which\nturns `cfg(debug_assertions)` [conditional compilation](https://doc.rust-lang.org/reference/conditional-compilation.html#debug_assertions) on or off. Debug\nassertions are intended to include runtime validation which is only available\nin debug/development builds. These may be things that are too expensive or\notherwise undesirable in a release build. Debug assertions enables the\n[`debug_assert!` macro](https://doc.rust-lang.org/std/macro.debug_assert.html) in the standard library.", + "type": "boolean", + "x-taplo": { + "links": { + "key": "https://doc.rust-lang.org/cargo/reference/profiles.html#debug-assertions" + } + } + }, + "OverflowChecks": { + "description": "The `overflow-checks` setting controls the [`-C overflow-checks` flag](https://doc.rust-lang.org/rustc/codegen-options/index.html#overflow-checks) which\ncontrols the behavior of [runtime integer overflow](https://doc.rust-lang.org/reference/expressions/operator-expr.html#overflow). When overflow-checks are\nenabled, a panic will occur on overflow.", + "type": "boolean", + "x-taplo": { + "links": { + "key": "https://doc.rust-lang.org/cargo/reference/profiles.html#overflow-checks" + } + } + }, + "Incremental": { + "description": "The `incremental` setting controls the [`-C incremental` flag](https://doc.rust-lang.org/rustc/codegen-options/index.html#incremental) which controls\nwhether or not incremental compilation is enabled. Incremental compilation\ncauses `rustc` to to save additional information to disk which will be reused\nwhen recompiling the crate, improving re-compile times. The additional\ninformation is stored in the `target` directory.\n\nThe valid options are:\n\n* `true`: enabled\n* `false`: disabled\n\nIncremental compilation is only used for workspace members and \"path\"\ndependencies.\n\nThe incremental value can be overridden globally with the `CARGO_INCREMENTAL`\n[environment variable](https://doc.rust-lang.org/cargo/reference/environment-variables.html) or the [`build.incremental`](https://doc.rust-lang.org/cargo/reference/config.html#buildincremental) config variable.", + "type": "boolean", + "x-taplo": { + "links": { + "key": "https://doc.rust-lang.org/cargo/reference/profiles.html#incremental" + } + } + }, + "CodegenUnits": { + "description": "The `codegen-units` setting controls the [`-C codegen-units` flag](https://doc.rust-lang.org/rustc/codegen-options/index.html#codegen-units) which\ncontrols how many \"code generation units\" a crate will be split into. More\ncode generation units allows more of a crate to be processed in parallel\npossibly reducing compile time, but may produce slower code.\n\nThis option takes an integer greater than 0.\n\nThe default is 256 for [incremental](https://doc.rust-lang.org/cargo/reference/profiles.html#incremental) builds, and 16 for\nnon-incremental builds.", + "type": "integer", + "format": "uint32", + "minimum": 0, + "x-taplo": { + "links": { + "key": "https://doc.rust-lang.org/cargo/reference/profiles.html#codegen-units" + } + } + }, + "Rpath": { + "description": "The `rpath` setting controls the [`-C rpath` flag](https://doc.rust-lang.org/rustc/codegen-options/index.html#rpath) which controls\nwhether or not [`rpath`](https://en.wikipedia.org/wiki/Rpath) is enabled.", + "type": "boolean", + "x-taplo": { + "links": { + "key": "https://doc.rust-lang.org/cargo/reference/profiles.html#rpath" + } + } + }, + "ProfilePackageOverrides": { + "description": "Package-specific overrides.\n\nThe package name is a [Package ID Spec](https://doc.rust-lang.org/cargo/reference/pkgid-spec.html), so you can\ntarget individual versions of a package with syntax such as `[profile.dev.package.\"foo:2.1.0\"]`.", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/Profile" + }, + "x-tombi-table-keys-order": "ascending", + "x-taplo": { + "links": { + "key": "https://doc.rust-lang.org/cargo/reference/profiles.html#overrides" + } + } }, "Profile": { "title": "Profile", @@ -878,50 +1000,16 @@ "$ref": "#/definitions/DebugLevel" }, "split-debuginfo": { - "$ref": "#/definitions/SplitDebuginfo", - "x-taplo": { - "links": { - "key": "https://doc.rust-lang.org/cargo/reference/profiles.html#split-debuginfo" - } - } + "$ref": "#/definitions/SplitDebuginfo" }, "strip": { - "description": "The strip option controls the -C strip flag, which directs rustc to strip either symbols or debuginfo from a binary.", - "oneOf": [ - { - "type": "string", - "enum": ["none", "debuginfo", "symbols"], - "default": "none" - }, - { - "type": "boolean", - "enum": [true], - "description": "Equivalent to \"symbols\"." - }, - { - "type": "boolean", - "enum": [false], - "description": "Equivalent to \"none\"." - } - ] + "$ref": "#/definitions/Strip" }, "debug-assertions": { - "description": "The `debug-assertions` setting controls the [`-C debug-assertions` flag](https://doc.rust-lang.org/rustc/codegen-options/index.html#debug-assertions) which\nturns `cfg(debug_assertions)` [conditional compilation](https://doc.rust-lang.org/reference/conditional-compilation.html#debug_assertions) on or off. Debug\nassertions are intended to include runtime validation which is only available\nin debug/development builds. These may be things that are too expensive or\notherwise undesirable in a release build. Debug assertions enables the\n[`debug_assert!` macro](https://doc.rust-lang.org/std/macro.debug_assert.html) in the standard library.", - "type": "boolean", - "x-taplo": { - "links": { - "key": "https://doc.rust-lang.org/cargo/reference/profiles.html#debug-assertions" - } - } + "$ref": "#/definitions/DebugAssertions" }, "overflow-checks": { - "description": "The `overflow-checks` setting controls the [`-C overflow-checks` flag](https://doc.rust-lang.org/rustc/codegen-options/index.html#overflow-checks) which\ncontrols the behavior of [runtime integer overflow](https://doc.rust-lang.org/reference/expressions/operator-expr.html#overflow). When overflow-checks are\nenabled, a panic will occur on overflow.", - "type": "boolean", - "x-taplo": { - "links": { - "key": "https://doc.rust-lang.org/cargo/reference/profiles.html#overflow-checks" - } - } + "$ref": "#/definitions/OverflowChecks" }, "lto": { "$ref": "#/definitions/Lto" @@ -930,46 +1018,16 @@ "$ref": "#/definitions/Panic" }, "incremental": { - "description": "The `incremental` setting controls the [`-C incremental` flag](https://doc.rust-lang.org/rustc/codegen-options/index.html#incremental) which controls\nwhether or not incremental compilation is enabled. Incremental compilation\ncauses `rustc` to to save additional information to disk which will be reused\nwhen recompiling the crate, improving re-compile times. The additional\ninformation is stored in the `target` directory.\n\nThe valid options are:\n\n* `true`: enabled\n* `false`: disabled\n\nIncremental compilation is only used for workspace members and \"path\"\ndependencies.\n\nThe incremental value can be overridden globally with the `CARGO_INCREMENTAL`\n[environment variable](https://doc.rust-lang.org/cargo/reference/environment-variables.html) or the [`build.incremental`](https://doc.rust-lang.org/cargo/reference/config.html#buildincremental) config variable.", - "type": "boolean", - "x-taplo": { - "links": { - "key": "https://doc.rust-lang.org/cargo/reference/profiles.html#incremental" - } - } + "$ref": "#/definitions/Incremental" }, "codegen-units": { - "description": "The `codegen-units` setting controls the [`-C codegen-units` flag](https://doc.rust-lang.org/rustc/codegen-options/index.html#codegen-units) which\ncontrols how many \"code generation units\" a crate will be split into. More\ncode generation units allows more of a crate to be processed in parallel\npossibly reducing compile time, but may produce slower code.\n\nThis option takes an integer greater than 0.\n\nThe default is 256 for [incremental](https://doc.rust-lang.org/cargo/reference/profiles.html#incremental) builds, and 16 for\nnon-incremental builds.", - "type": "integer", - "format": "uint32", - "minimum": 0, - "x-taplo": { - "links": { - "key": "https://doc.rust-lang.org/cargo/reference/profiles.html#codegen-units" - } - } + "$ref": "#/definitions/CodegenUnits" }, "rpath": { - "description": "The `rpath` setting controls the [`-C rpath` flag](https://doc.rust-lang.org/rustc/codegen-options/index.html#rpath) which controls\nwhether or not [`rpath`](https://en.wikipedia.org/wiki/Rpath) is enabled.", - "type": "boolean", - "x-taplo": { - "links": { - "key": "https://doc.rust-lang.org/cargo/reference/profiles.html#rpath" - } - } + "$ref": "#/definitions/Rpath" }, "package": { - "description": "Package-specific overrides.\n\nThe package name is a [Package ID Spec](https://doc.rust-lang.org/cargo/reference/pkgid-spec.html), so you can\ntarget individual versions of a package with syntax such as `[profile.dev.package.\"foo:2.1.0\"]`.", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/Profile" - }, - "x-tombi-table-keys-order": "ascending", - "x-taplo": { - "links": { - "key": "https://doc.rust-lang.org/cargo/reference/profiles.html#overrides" - } - } + "$ref": "#/definitions/ProfilePackageOverrides" }, "dir-name": { "type": "string",