From db4a1a69bde4a0fdafcb9a772f248867d30eb6c4 Mon Sep 17 00:00:00 2001 From: Jakub Panek Date: Sun, 1 Sep 2024 17:30:41 +0200 Subject: [PATCH 01/13] Update pyproject.toml --- pyproject.toml | 22 ++++++++++++++++++++-- taplo.toml | 8 ++++++++ 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 7619914fe..10377c996 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,8 +3,20 @@ requires = ["maturin>=1.4"] build-backend = "maturin" [project] -name = "taplo" +name = "taplo" +description = "A CLI for Taplo TOML toolkit" +readme = "README.md" +authors = [{ name = "tamasfe" }] +maintainers = [{ name = "Jakub Panek" }] requires-python = ">=3.8" +dynamic = ["version"] + +keywords = [ + "toml", + "linter", + "formatter", +] + classifiers = [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", @@ -22,7 +34,13 @@ classifiers = [ "Programming Language :: Rust", "Topic :: Software Development :: Quality Assurance", ] -dynamic = ["version"] + +[project.urls] +Homepage = "https://taplo.tamasfe.dev" +Documentation = "https://taplo.tamasfe.dev/cli/introduction.html" +Repository = "https://github.com/tamasfe/taplo.git" +Tracker = "https://github.com/tamasfe/taplo/issues" +Changelog = "https://github.com/tamasfe/taplo/blob/master/CHANGELOG.md" [tool.maturin] bindings = "bin" diff --git a/taplo.toml b/taplo.toml index d036f3dfa..3c78e217e 100644 --- a/taplo.toml +++ b/taplo.toml @@ -44,3 +44,11 @@ keys = ["package", "workspace.package"] [rule.formatting] reorder_keys = false align_comments = true + +[[rule]] +include = ["pyproject.toml"] + +[rule.formatting] +align_entries = true +reorder_keys = false +align_comments = true From 539a9a08447a92a1864c2b5d662d2d37ecb73dcc Mon Sep 17 00:00:00 2001 From: Jakub Panek Date: Fri, 28 Feb 2025 21:44:30 +0100 Subject: [PATCH 02/13] drop schemas from site --- site/site/public/schemas/Cargo.toml.json | 1357 --------------- site/site/public/schemas/dein.toml.json | 625 ------- site/site/public/schemas/fly.toml.json | 357 ---- site/site/public/schemas/makefile.toml.json | 1522 ----------------- site/site/public/schemas/pyproject.toml.json | 589 ------- site/site/public/schemas/replit.toml.json | 218 --- .../public/schemas/rust-toolchain.toml.json | 346 ---- site/site/public/schemas/rustfmt.toml.json | 476 ------ 8 files changed, 5490 deletions(-) delete mode 100644 site/site/public/schemas/Cargo.toml.json delete mode 100644 site/site/public/schemas/dein.toml.json delete mode 100644 site/site/public/schemas/fly.toml.json delete mode 100644 site/site/public/schemas/makefile.toml.json delete mode 100644 site/site/public/schemas/pyproject.toml.json delete mode 100644 site/site/public/schemas/replit.toml.json delete mode 100644 site/site/public/schemas/rust-toolchain.toml.json delete mode 100644 site/site/public/schemas/rustfmt.toml.json diff --git a/site/site/public/schemas/Cargo.toml.json b/site/site/public/schemas/Cargo.toml.json deleted file mode 100644 index 5c3ee15bd..000000000 --- a/site/site/public/schemas/Cargo.toml.json +++ /dev/null @@ -1,1357 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "Cargo.toml", - "description": "A schema for Cargo.toml.", - "x-taplo-info": { - "authors": ["tamasfe (https://github.com/tamasfe)"], - "patterns": ["^(.*(/|\\\\)Cargo\\.toml|Cargo\\.toml)$"] - }, - "type": "object", - "properties": { - "badges": { - "description": "[crates.io](https://crates.io) can display various badges for build status, test coverage, etc. for\neach crate. All badges are optional.\n\n- The badges pertaining to build status that are currently available are\n Appveyor, CircleCI, Cirrus CI, GitLab, Azure DevOps, Travis CI and Bitbucket\n Pipelines.\n- Available badges pertaining to code test coverage are Codecov and Coveralls.\n- There are also maintenance-related badges based on isitmaintained.com\n which state the issue resolution time, percent of open issues, and future\n maintenance intentions.\n\nMost badge specifications require a `repository` key. It is expected to be in\n`user/repo` format.\n\n```toml\n[badges]\n\n# Appveyor: `repository` is required. `branch` is optional; default is `master`\n# `service` is optional; valid values are `github` (default), `bitbucket`, and\n# `gitlab`; `id` is optional; you can specify the appveyor project id if you\n# want to use that instead. `project_name` is optional; use when the repository\n# name differs from the appveyor project name.\nappveyor = { repository = \"...\", branch = \"master\", service = \"github\" }\n\n# Circle CI: `repository` is required. `branch` is optional; default is `master`\ncircle-ci = { repository = \"...\", branch = \"master\" }\n\n# Cirrus CI: `repository` is required. `branch` is optional; default is `master`\ncirrus-ci = { repository = \"...\", branch = \"master\" }\n\n# GitLab: `repository` is required. `branch` is optional; default is `master`\ngitlab = { repository = \"...\", branch = \"master\" }\n\n# Azure DevOps: `project` is required. `pipeline` is required. `build` is optional; default is `1`\n# Note: project = `organization/project`, pipeline = `name_of_pipeline`, build = `definitionId`\nazure-devops = { project = \"...\", pipeline = \"...\", build=\"2\" }\n\n# Travis CI: `repository` in format \"/\" is required.\n# `branch` is optional; default is `master`\ntravis-ci = { repository = \"...\", branch = \"master\" }\n\n# Bitbucket Pipelines: `repository` is required. `branch` is required\nbitbucket-pipelines = { repository = \"...\", branch = \"master\" }\n\n# Codecov: `repository` is required. `branch` is optional; default is `master`\n# `service` is optional; valid values are `github` (default), `bitbucket`, and\n# `gitlab`.\ncodecov = { repository = \"...\", branch = \"master\", service = \"github\" }\n\n# Coveralls: `repository` is required. `branch` is optional; default is `master`\n# `service` is optional; valid values are `github` (default) and `bitbucket`.\ncoveralls = { repository = \"...\", branch = \"master\", service = \"github\" }\n\n# Is it maintained resolution time: `repository` is required.\nis-it-maintained-issue-resolution = { repository = \"...\" }\n\n# Is it maintained percentage of open issues: `repository` is required.\nis-it-maintained-open-issues = { repository = \"...\" }\n\n# Maintenance: `status` is required. Available options are:\n# - `actively-developed`: New features are being added and bugs are being fixed.\n# - `passively-maintained`: There are no plans for new features, but the maintainer intends to\n# respond to issues that get filed.\n# - `as-is`: The crate is feature complete, the maintainer does not intend to continue working on\n# it or providing support, but it works for the purposes it was designed for.\n# - `experimental`: The author wants to share it with the community but is not intending to meet\n# anyone's particular use case.\n# - `looking-for-maintainer`: The current maintainer would like to transfer the crate to someone\n# else.\n# - `deprecated`: The maintainer does not recommend using this crate (the description of the crate\n# can describe why, there could be a better solution available or there could be problems with\n# the crate that the author does not want to fix).\n# - `none`: Displays no badge on crates.io, since the maintainer has not chosen to specify\n# their intentions, potential crate users will need to investigate on their own.\nmaintenance = { status = \"...\" }\n```", - "type": "object", - "additionalProperties": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "x-taplo": { - "links": { - "key": "https://doc.rust-lang.org/cargo/reference/manifest.html#the-badges-section" - } - } - }, - "bench": { - "description": "Benchmarks provide a way to test the performance of your code using the\n[`cargo bench`](https://doc.rust-lang.org/cargo/commands/cargo-bench.html) command. They follow the same structure as [tests](https://doc.rust-lang.org/cargo/reference/cargo-targets.html#tests),\nwith each benchmark function annotated with the `#[bench]` attribute.\nSimilarly to tests:\n\n* Benchmarks are placed in the [`benches` directory](https://doc.rust-lang.org/cargo/guide/project-layout.html).\n* Benchmark functions defined in libraries and binaries have access to the\n *private* API within the target they are defined in. Benchmarks in the\n `benches` directory may use the *public* API.\n* [The `bench` field](https://doc.rust-lang.org/cargo/reference/cargo-targets.html#the-bench-field) can be used to define which targets\n are benchmarked by default.\n* [The `harness` field](https://doc.rust-lang.org/cargo/reference/cargo-targets.html#the-harness-field) can be used to disable the\n built-in harness.\n\n> **Note**: The [`#[bench]`\n> attribute](https://doc.rust-lang.org/unstable-book/library-features/test.html) is currently\n> unstable and only available on the [nightly channel](https://doc.rust-lang.org/book/appendix-07-nightly-rust.html). There are some\n> packages available on [crates.io](https://crates.io/keywords/benchmark) that\n> may help with running benchmarks on the stable channel, such as\n> [Criterion](https://crates.io/crates/criterion).", - "type": "array", - "items": { - "description": "Benchmarks provide a way to test the performance of your code using the\n[`cargo bench`](https://doc.rust-lang.org/cargo/commands/cargo-bench.html) command. They follow the same structure as [tests](https://doc.rust-lang.org/cargo/reference/cargo-targets.html#tests),\nwith each benchmark function annotated with the `#[bench]` attribute.\nSimilarly to tests:\n\n* Benchmarks are placed in the [`benches` directory](https://doc.rust-lang.org/cargo/guide/project-layout.html).\n* Benchmark functions defined in libraries and binaries have access to the\n *private* API within the target they are defined in. Benchmarks in the\n `benches` directory may use the *public* API.\n* [The `bench` field](https://doc.rust-lang.org/cargo/reference/cargo-targets.html#the-bench-field) can be used to define which targets\n are benchmarked by default.\n* [The `harness` field](https://doc.rust-lang.org/cargo/reference/cargo-targets.html#the-harness-field) can be used to disable the\n built-in harness.\n\n> **Note**: The [`#[bench]`\n> attribute](https://doc.rust-lang.org/unstable-book/library-features/test.html) is currently\n> unstable and only available on the [nightly channel](https://doc.rust-lang.org/book/appendix-07-nightly-rust.html). There are some\n> packages available on [crates.io](https://crates.io/keywords/benchmark) that\n> may help with running benchmarks on the stable channel, such as\n> [Criterion](https://crates.io/crates/criterion).", - "$ref": "#/definitions/Target", - "x-taplo": { - "links": { - "key": "https://doc.rust-lang.org/cargo/reference/cargo-targets.html#benchmarks" - } - } - }, - "x-taplo": { - "links": { - "key": "https://doc.rust-lang.org/cargo/reference/cargo-targets.html#benchmarks" - } - } - }, - "bin": { - "description": "Binary targets are executable programs that can be run after being compiled.\nThe default binary filename is `src/main.rs`, which defaults to the name of\nthe package. Additional binaries are stored in the [`src/bin/`\ndirectory](https://doc.rust-lang.org/cargo/guide/project-layout.html). The settings for each binary can be [customized](https://doc.rust-lang.org/cargo/reference/cargo-targets.html#configuring-a-target) in the `[[bin]]` tables in `Cargo.toml`.\n\nBinaries can use the public API of the package's library. They are also linked\nwith the [`[dependencies]`](https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html) defined in `Cargo.toml`.\n\nYou can run individual binaries with the [`cargo run`](https://doc.rust-lang.org/cargo/commands/cargo-run.html) command with the `--bin\n` option. [`cargo install`](https://doc.rust-lang.org/cargo/commands/cargo-install.html) can be used to copy the executable to a\ncommon location.\n\n```toml\n# Example of customizing binaries in Cargo.toml.\n[[bin]]\nname = \"cool-tool\"\ntest = false\nbench = false\n\n[[bin]]\nname = \"frobnicator\"\nrequired-features = [\"frobnicate\"]\n```", - "type": "array", - "items": { - "description": "Binary targets are executable programs that can be run after being compiled.\nThe default binary filename is `src/main.rs`, which defaults to the name of\nthe package. Additional binaries are stored in the [`src/bin/`\ndirectory](https://doc.rust-lang.org/cargo/guide/project-layout.html). The settings for each binary can be [customized](https://doc.rust-lang.org/cargo/reference/cargo-targets.html#configuring-a-target) in the `[[bin]]` tables in `Cargo.toml`.\n\nBinaries can use the public API of the package's library. They are also linked\nwith the [`[dependencies]`](https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html) defined in `Cargo.toml`.\n\nYou can run individual binaries with the [`cargo run`](https://doc.rust-lang.org/cargo/commands/cargo-run.html) command with the `--bin\n` option. [`cargo install`](https://doc.rust-lang.org/cargo/commands/cargo-install.html) can be used to copy the executable to a\ncommon location.\n\n```toml\n# Example of customizing binaries in Cargo.toml.\n[[bin]]\nname = \"cool-tool\"\ntest = false\nbench = false\n\n[[bin]]\nname = \"frobnicator\"\nrequired-features = [\"frobnicate\"]\n```", - "$ref": "#/definitions/Target", - "x-taplo": { - "links": { - "key": "https://doc.rust-lang.org/cargo/reference/cargo-targets.html#binaries" - } - } - }, - "x-taplo": { - "links": { - "key": "https://doc.rust-lang.org/cargo/reference/cargo-targets.html#binaries" - } - } - }, - "build-dependencies": { - "description": "You can depend on other Cargo-based crates for use in your build scripts.\nDependencies are declared through the `build-dependencies` section of the\nmanifest:\n\n```toml\n[build-dependencies]\ncc = \"1.0.3\"\n```\n\nThe build script **does not** have access to the dependencies listed\nin the `dependencies` or `dev-dependencies` section. Build\ndependencies will likewise not be available to the package itself\nunless listed under the `dependencies` section as well. A package\nitself and its build script are built separately, so their\ndependencies need not coincide. Cargo is kept simpler and cleaner by\nusing independent dependencies for independent purposes.", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/Dependency" - }, - "x-taplo": { - "links": { - "key": "https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#build-dependencies" - }, - "plugins": ["crates"], - "crates": { - "schemas": "dependencies" - } - } - }, - "build_dependencies": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/Dependency" - }, - "x-taplo": { - "hidden": true - } - }, - "cargo-features": { - "type": "array", - "items": { - "type": "string" - } - }, - "dependencies": { - "description": "Cargo is configured to look for dependencies on [crates.io](https://crates.io) by default. Only\nthe name and a version string are required in this case. In [the cargo\nguide](https://doc.rust-lang.org/cargo/guide/index.html), we specified a dependency on the `time` crate:\n\n```toml\n[dependencies]\ntime = \"0.1.12\"\n```\n\nThe string `\"0.1.12\"` is a [semver](https://github.com/steveklabnik/semver#requirements) version requirement. Since this\nstring does not have any operators in it, it is interpreted the same way as\nif we had specified `\"^0.1.12\"`, which is called a caret requirement.\n\nA dependency can also be defined by a table with additional options:\n\n```toml\n[dependencies]\ntime = { path = \"../time\", version = \"0.1.12\" }\n```", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/Dependency" - }, - "x-taplo": { - "links": { - "key": "https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html" - } - } - }, - "dev-dependencies": { - "description": "The format of `[dev-dependencies]` is equivalent to `[dependencies]`:\n\n```toml\n[dev-dependencies]\ntempdir = \"0.3\"\n```\n\nDev-dependencies are not used when compiling\na package for building, but are used for compiling tests, examples, and\nbenchmarks.\n\nThese dependencies are *not* propagated to other packages which depend on this\npackage.\n\nYou can also have target-specific development dependencies by using\n`dev-dependencies` in the target section header instead of `dependencies`. For\nexample:\n\n```toml\n[target.'cfg(unix)'.dev-dependencies]\nmio = \"0.0.1\"\n```\n\n> **Note**: When a package is published, only dev-dependencies that specify a\n> `version` will be included in the published crate. For most use cases,\n> dev-dependencies are not needed when published, though some users (like OS\n> packagers) may want to run tests within a crate, so providing a `version` if\n> possible can still be beneficial.\n", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/Dependency" - }, - "x-taplo": { - "links": { - "key": "https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#development-dependencies" - }, - "plugins": ["crates"], - "crates": { - "schemas": "dependencies" - } - } - }, - "dev_dependencies": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/Dependency" - }, - "x-taplo": { - "hidden": true - } - }, - "example": { - "description": "Files located under the [examples directory](https://doc.rust-lang.org/cargo/guide/project-layout.html) are example uses of the functionality provided by the library. When compiled, they are placed in the[ target/debug/examples directory](https://doc.rust-lang.org/cargo/guide/build-cache.html).\n\nExamples can use the public API of the package's library. They are also linked with the [dependencies](https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html) and [dev-dependencies](https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#development-dependencies) defined in Cargo.toml.\n\nBy default, examples are executable binaries (with a `main()` function). You\ncan specify the [`crate-type` field](https://doc.rust-lang.org/cargo/reference/cargo-targets.html#the-crate-type-field) to make an example\nbe compiled as a library:\n\n```toml\n[[example]]\nname = \"foo\"\ncrate-type = [\"staticlib\"]\n```\n\nYou can run individual executable examples with the [`cargo run`](https://doc.rust-lang.org/cargo/commands/cargo-run.html) command with\nthe `--example ` option. Library examples can be built with\n[`cargo build`](https://doc.rust-lang.org/cargo/commands/cargo-build.html) with the `--example ` option. [`cargo install`](https://doc.rust-lang.org/cargo/commands/cargo-install.html)\nwith the `--example ` option can be used to copy executable\nbinaries to a common location. Examples are compiled by [`cargo test`](https://doc.rust-lang.org/cargo/commands/cargo-test.html) by\ndefault to protect them from bit-rotting. Set [the `test`\nfield](https://doc.rust-lang.org/cargo/reference/cargo-targets.html#the-test-field) to `true` if you have `#[test]` functions in the\nexample that you want to run with [`cargo test`](https://doc.rust-lang.org/cargo/commands/cargo-test.html).\n", - "type": "array", - "items": { - "description": "Files located under the [examples directory](https://doc.rust-lang.org/cargo/guide/project-layout.html) are example uses of the functionality provided by the library. When compiled, they are placed in the[ target/debug/examples directory](https://doc.rust-lang.org/cargo/guide/build-cache.html).\n\nExamples can use the public API of the package's library. They are also linked with the [dependencies](https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html) and [dev-dependencies](https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#development-dependencies) defined in Cargo.toml.\n\nBy default, examples are executable binaries (with a `main()` function). You\ncan specify the [`crate-type` field](https://doc.rust-lang.org/cargo/reference/cargo-targets.html#the-crate-type-field) to make an example\nbe compiled as a library:\n\n```toml\n[[example]]\nname = \"foo\"\ncrate-type = [\"staticlib\"]\n```\n\nYou can run individual executable examples with the [`cargo run`](https://doc.rust-lang.org/cargo/commands/cargo-run.html) command with\nthe `--example ` option. Library examples can be built with\n[`cargo build`](https://doc.rust-lang.org/cargo/commands/cargo-build.html) with the `--example ` option. [`cargo install`](https://doc.rust-lang.org/cargo/commands/cargo-install.html)\nwith the `--example ` option can be used to copy executable\nbinaries to a common location. Examples are compiled by [`cargo test`](https://doc.rust-lang.org/cargo/commands/cargo-test.html) by\ndefault to protect them from bit-rotting. Set [the `test`\nfield](https://doc.rust-lang.org/cargo/reference/cargo-targets.html#the-test-field) to `true` if you have `#[test]` functions in the\nexample that you want to run with [`cargo test`](https://doc.rust-lang.org/cargo/commands/cargo-test.html).\n", - "$ref": "#/definitions/Target", - "x-taplo": { - "links": { - "key": "https://doc.rust-lang.org/cargo/reference/cargo-targets.html#examples" - } - } - }, - "x-taplo": { - "links": { - "key": "https://doc.rust-lang.org/cargo/reference/cargo-targets.html#examples" - } - } - }, - "features": { - "description": "Cargo supports features to allow expression of:\n\n* conditional compilation options (usable through `cfg` attributes);\n* optional dependencies, which enhance a package, but are not required; and\n* clusters of optional dependencies, such as `postgres-all`, that would include the\n `postgres` package, the `postgres-macros` package, and possibly other packages\n (such as development-time mocking libraries, debugging tools, etc.).\n\nA feature of a package is either an optional dependency, or a set of other\nfeatures.\n", - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "type": "string" - } - }, - "x-taplo": { - "links": { - "key": "https://doc.rust-lang.org/cargo/reference/features.html" - } - } - }, - "lib": { - "$ref": "#/definitions/Target", - "x-taplo": { - "docs": { - "main": "The library target defines a \"library\" that can be used and linked by other\nlibraries and executables. The filename defaults to `src/lib.rs`, and the name\nof the library defaults to the name of the package. A package can have only\none library. The settings for the library can be [customized](https://doc.rust-lang.org/cargo/reference/cargo-targets.html#configuring-a-target) in the `[lib]`\ntable in `Cargo.toml`.\n\n```toml\n# Example of customizing the library in Cargo.toml.\n[lib]\ncrate-type = [\"cdylib\"]\nbench = false\n```\n" - }, - "links": { - "key": "https://doc.rust-lang.org/cargo/reference/cargo-targets.html#library" - } - } - }, - "package": { - "$ref": "#/definitions/Package" - }, - "patch": { - "description": "The `[patch]` section of `Cargo.toml` can be used to override dependencies\nwith other copies. The syntax is similar to the\n[`[dependencies]`](https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html) section.\n\n", - "type": "object", - "additionalProperties": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/Dependency" - } - }, - "x-taplo": { - "links": { - "key": "https://doc.rust-lang.org/cargo/reference/overriding-dependencies.html#the-patch-section" - } - } - }, - "profile": { - "$ref": "#/definitions/Profiles" - }, - "project": { - "$ref": "#/definitions/Package", - "x-taplo": { - "hidden": true - } - }, - "replace": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/Dependency" - }, - "x-taplo": { - "hidden": true - } - }, - "target": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/Platform" - } - }, - "test": { - "description": "Files located under the [`tests` directory](https://doc.rust-lang.org/cargo/guide/project-layout.html) are integration\ntests. When you run [`cargo test`](https://doc.rust-lang.org/cargo/commands/cargo-test.html), Cargo will compile each of these files as\na separate crate, and execute them.\n\nIntegration tests can use the public API of the package's library. They are\nalso linked with the [`[dependencies]`](https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html) and\n[`[dev-dependencies]`](https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#development-dependencies) defined in `Cargo.toml`.\n\nIf you want to share code among multiple integration tests, you can place it\nin a separate module such as `tests/common/mod.rs` and then put `mod common;`\nin each test to import it.\n\nEach integration test results in a separate executable binary, and [`cargo\ntest`](https://doc.rust-lang.org/cargo/commands/cargo-test.html) will run them serially. In some cases this can be inefficient, as it\ncan take longer to compile, and may not make full use of multiple CPUs when\nrunning the tests. If you have a lot of integration tests, you may want to\nconsider creating a single integration test, and split the tests into multiple\nmodules. The libtest harness will automatically find all of the `#[test]`\nannotated functions and run them in parallel. You can pass module names to\n[`cargo test`](https://doc.rust-lang.org/cargo/commands/cargo-test.html) to only run the tests within that module.\n\nBinary targets are automatically built if there is an integration test. This\nallows an integration test to execute the binary to exercise and test its\nbehavior. The `CARGO_BIN_EXE_` [environment variable](https://doc.rust-lang.org/cargo/reference/environment-variables.html#environment-variables-cargo-sets-for-crates) is set when the\nintegration test is built so that it can use the [`env` macro](https://doc.rust-lang.org/std/macro.env.html) to locate the\nexecutable.", - "type": "array", - "items": { - "description": "Files located under the [`tests` directory](https://doc.rust-lang.org/cargo/guide/project-layout.html) are integration\ntests. When you run [`cargo test`](https://doc.rust-lang.org/cargo/commands/cargo-test.html), Cargo will compile each of these files as\na separate crate, and execute them.\n\nIntegration tests can use the public API of the package's library. They are\nalso linked with the [`[dependencies]`](https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html) and\n[`[dev-dependencies]`](https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#development-dependencies) defined in `Cargo.toml`.\n\nIf you want to share code among multiple integration tests, you can place it\nin a separate module such as `tests/common/mod.rs` and then put `mod common;`\nin each test to import it.\n\nEach integration test results in a separate executable binary, and [`cargo\ntest`](https://doc.rust-lang.org/cargo/commands/cargo-test.html) will run them serially. In some cases this can be inefficient, as it\ncan take longer to compile, and may not make full use of multiple CPUs when\nrunning the tests. If you have a lot of integration tests, you may want to\nconsider creating a single integration test, and split the tests into multiple\nmodules. The libtest harness will automatically find all of the `#[test]`\nannotated functions and run them in parallel. You can pass module names to\n[`cargo test`](https://doc.rust-lang.org/cargo/commands/cargo-test.html) to only run the tests within that module.\n\nBinary targets are automatically built if there is an integration test. This\nallows an integration test to execute the binary to exercise and test its\nbehavior. The `CARGO_BIN_EXE_` [environment variable](https://doc.rust-lang.org/cargo/reference/environment-variables.html#environment-variables-cargo-sets-for-crates) is set when the\nintegration test is built so that it can use the [`env` macro](https://doc.rust-lang.org/std/macro.env.html) to locate the\nexecutable.", - "$ref": "#/definitions/Target", - "x-taplo": { - "links": { - "key": "https://doc.rust-lang.org/cargo/reference/cargo-targets.html#integration-tests" - } - } - }, - "x-taplo": { - "links": { - "key": "https://doc.rust-lang.org/cargo/reference/cargo-targets.html#integration-tests" - } - } - }, - "workspace": { - "$ref": "#/definitions/Workspace" - } - }, - "definitions": { - "Build": { - "title": "Build", - "description": "The `build` field specifies a file in the package root which is a [build script](https://doc.rust-lang.org/cargo/reference/build-scripts.html) for building native code. More information can be found in the [build script guide](https://doc.rust-lang.org/cargo/reference/build-scripts.html).\n\n\n```toml\n[package]\n# ...\nbuild = \"build.rs\"\n```\n\nThe default is `\"build.rs\"`, which loads the script from a file named\n`build.rs` in the root of the package. Use `build = \"custom_build_name.rs\"` to\nspecify a path to a different file or `build = false` to disable automatic\ndetection of the build script.\n", - "anyOf": [ - { - "description": "Path to the build file.", - "type": "string" - }, - { - "type": "boolean", - "enum": [true, false], - "x-taplo": { - "docs": { - "enumValues": [ - "Automatically detect the build file (`build.rs`).", - "Disable automatic detection of the build file." - ] - } - } - } - ], - "x-taplo": { - "links": { - "key": "https://doc.rust-lang.org/cargo/reference/manifest.html#the-build-field" - } - } - }, - "DebugLevel": { - "title": "Debug Level", - "description": "The `debug` setting controls the [`-C debuginfo` flag](https://doc.rust-lang.org/rustc/codegen-options/index.html#debuginfo) which controls the\namount of debug information included in the compiled binary.", - "enum": [0, 1, 2, true, false], - "x-taplo": { - "docs": { - "enumValues": [ - "\nNo debug info at all.", - "Line tables only.", - "Full debug info.", - "Full debug info.", - "\nNo debug info at all." - ] - }, - "links": { - "key": "https://doc.rust-lang.org/cargo/reference/profiles.html#debug" - } - } - }, - "Dependency": { - "title": "Dependency", - "anyOf": [ - { - "$ref": "#/definitions/SemVerRequirement" - }, - { - "$ref": "#/definitions/DetailedDependency" - } - ] - }, - "DetailedDependency": { - "title": "Detailed Dependency", - "type": "object", - "properties": { - "branch": { - "description": "Specify the Git branch to use in case of a [Git dependency](https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#specifying-dependencies-from-git-repositories).", - "type": "string", - "x-taplo": { - "links": { - "key": "https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#specifying-dependencies-from-git-repositories" - } - } - }, - "default-features": { - "description": "Use the default features of the dependency.", - "type": "boolean", - "x-taplo": { - "links": { - "key": "https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#choosing-features" - } - } - }, - "default_features": { - "type": "boolean", - "x-taplo": { - "hidden": true - } - }, - "features": { - "description": "List of features to activate in the dependency.", - "type": "array", - "items": { - "description": "List of features to activate in the dependency.", - "type": "string", - "x-taplo": { - "links": { - "key": "https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#choosing-features" - }, - "plugins": ["crates"], - "crates": { - "schemas": "feature" - } - } - }, - "x-taplo": { - "links": { - "key": "https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#choosing-features" - } - } - }, - "git": { - "description": "To depend on a library located in a `git` repository, the minimum information\nyou need to specify is the location of the repository with the `git` key:\n\n```toml\n[dependencies]\nrand = { git = \"https://github.com/rust-lang-nursery/rand\" }\n```\n\nCargo will fetch the `git` repository at this location then look for a\n`Cargo.toml` for the requested crate anywhere inside the `git` repository\n(not necessarily at the root - for example, specifying a member crate name\nof a workspace and setting `git` to the repository containing the workspace).\n\nSince we haven’t specified any other information, Cargo assumes that\nwe intend to use the latest commit on the main branch to build our package.\nYou can combine the `git` key with the `rev`, `tag`, or `branch` keys to\nspecify something else. Here's an example of specifying that you want to use\nthe latest commit on a branch named `next`:\n\n```toml\n[dependencies]\nrand = { git = \"https://github.com/rust-lang-nursery/rand\", branch = \"next\" }\n```\n\nSee [Git Authentication](https://doc.rust-lang.org/cargo/appendix/git-authentication.html) for help with git authentication for private repos.\n\n> **Note**: [crates.io](https://crates.io/) does not allow packages to be published with `git`\n> dependencies (`git` [dev-dependencies](https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#development-dependencies) are ignored). See the [Multiple\n> locations](https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#multiple-locations) section for a fallback alternative.\n", - "type": "string", - "x-taplo": { - "links": { - "key": "https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#specifying-dependencies-from-git-repositories" - } - } - }, - "optional": { - "description": "Mark the dependency as optional.\n\nOptional dependencies can be activated through features.", - "type": "boolean", - "x-taplo": { - "links": { - "key": "https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#choosing-features" - } - } - }, - "package": { - "description": "Specify the name of the package.\n\nWhen writing a `[dependencies]` section in `Cargo.toml` the key you write for a\ndependency typically matches up to the name of the crate you import from in the\ncode. For some projects, though, you may wish to reference the crate with a\ndifferent name in the code regardless of how it's published on crates.io. For\nexample you may wish to:\n\n* Avoid the need to `use foo as bar` in Rust source.\n* Depend on multiple versions of a crate.\n* Depend on crates with the same name from different registries.\n\nTo support this Cargo supports a `package` key in the `[dependencies]` section\nof which package should be depended on:\n\n```toml\n[package]\nname = \"mypackage\"\nversion = \"0.0.1\"\n\n[dependencies]\nfoo = \"0.1\"\nbar = { git = \"https://github.com/example/project\", package = \"foo\" }\nbaz = { version = \"0.1\", registry = \"custom\", package = \"foo\" }\n```\n\nIn this example, three crates are now available in your Rust code:\n\n```rust\nextern crate foo; // crates.io\nextern crate bar; // git repository\nextern crate baz; // registry `custom`\n```\n\nAll three of these crates have the package name of `foo` in their own\n`Cargo.toml`, so we're explicitly using the `package` key to inform Cargo that\nwe want the `foo` package even though we're calling it something else locally.\nThe `package` key, if not specified, defaults to the name of the dependency\nbeing requested.\n", - "type": "string", - "x-taplo": { - "links": { - "key": "https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#renaming-dependencies-in-cargotoml" - } - } - }, - "path": { - "description": "Cargo supports **path dependencies** which are typically sub-crates that live within one repository.\nLet’s start off by making a new crate inside of our `hello_world` package:\n\n```console\n# inside of hello_world/\n$ cargo new hello_utils\n```\n\nThis will create a new folder `hello_utils` inside of which a `Cargo.toml` and\n`src` folder are ready to be configured. In order to tell Cargo about this, open\nup `hello_world/Cargo.toml` and add `hello_utils` to your dependencies:\n\n```toml\n[dependencies]\nhello_utils = { path = \"hello_utils\" }\n```\n\nThis tells Cargo that we depend on a crate called `hello_utils` which is found\nin the `hello_utils` folder (relative to the `Cargo.toml` it’s written in).", - "type": "string", - "x-taplo": { - "links": { - "key": "https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#specifying-path-dependencies" - } - } - }, - "public": { - "type": "boolean", - "x-taplo": { - "hidden": true - } - }, - "registry": { - "description": "To specify a dependency from a registry other than [crates.io](https://crates.io), first the\nregistry must be configured in a `.cargo/config.toml` file. See the [registries\ndocumentation](https://doc.rust-lang.org/cargo/reference/registries.html) for more information. In the dependency, set the `registry` key\nto the name of the registry to use.\n\n```toml\n[dependencies]\nsome-crate = { version = \"1.0\", registry = \"my-registry\" }\n```\n\n> **Note**: [crates.io](https://crates.io) does not allow packages to be published with\n> dependencies on other registries.\n", - "type": "string", - "x-taplo": { - "links": { - "key": "https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#specifying-dependencies-from-other-registries" - } - } - }, - "registry-index": { - "type": "string", - "x-taplo": { - "hidden": true - } - }, - "rev": { - "description": "Specify the Git revision to use in case of a [Git dependency](https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#specifying-dependencies-from-git-repositories).", - "type": "string", - "x-taplo": { - "links": { - "key": "https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#specifying-dependencies-from-git-repositories" - } - } - }, - "tag": { - "description": "Specify the Git tag to use in case of a [Git dependency](https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#specifying-dependencies-from-git-repositories).", - "type": "string", - "x-taplo": { - "links": { - "key": "https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#specifying-dependencies-from-git-repositories" - } - } - }, - "version": { - "$ref": "#/definitions/SemVerRequirement" - } - }, - "x-taplo": { - "initFields": ["version"] - } - }, - "Edition": { - "title": "Edition", - "description": "The `edition` key affects which edition your package is compiled with. Cargo\nwill always generate packages via [`cargo new`](https://doc.rust-lang.org/cargo/commands/cargo-new.html) with the `edition` key set to the\nlatest edition. Setting the `edition` key in `[package]` will affect all\ntargets/crates in the package, including test suites, benchmarks, binaries,\nexamples, etc.", - "type": "string", - "enum": ["2015", "2018", "2021"], - "x-taplo": { - "links": { - "key": "https://doc.rust-lang.org/stable/edition-guide/introduction.html" - } - } - }, - "Lto": { - "title": "Lto", - "description": "The `lto` setting controls the [`-C lto` flag](https://doc.rust-lang.org/rustc/codegen-options/index.html#lto) which controls LLVM's [link time optimizations](https://llvm.org/docs/LinkTimeOptimization.html). LTO can produce better optimized code, using\nwhole-program analysis, at the cost of longer linking time.\n \nSee also the [`-C linker-plugin-lto`](https://doc.rust-lang.org/rustc/codegen-options/index.html#linker-plugin-lto) `rustc` flag for cross-language LTO.", - "enum": ["fat", "thin", "off", true, false], - "x-taplo": { - "docs": { - "enumValues": [ - "Performs \"fat\" LTO which attempts to perform optimizations across all crates within the dependency graph.", - "Performs [\"thin\" LTO](http://blog.llvm.org/2016/06/thinlto-scalable-and-incremental-lto.html). This is similar to \"fat\", but takes\nsubstantially less time to run while still achieving performance gains\nsimilar to \"fat\".", - "Disables LTO.", - "Performs \"fat\" LTO which attempts to perform optimizations across all crates within the dependency graph.", - "Performs \"thin local LTO\" which performs \"thin\" LTO on the local\ncrate only across its [codegen units](https://doc.rust-lang.org/cargo/reference/profiles.html#codegen-units). No LTO is performed\nif codegen units is 1 or [opt-level](https://doc.rust-lang.org/cargo/reference/profiles.html#opt-level) is 0." - ] - }, - "links": { - "key": "https://doc.rust-lang.org/cargo/reference/profiles.html#lto" - } - } - }, - "MetaBuild": { - "title": "Meta Build", - "type": "array", - "items": { - "type": "string" - } - }, - "Resolver": { - "title": "Resolver", - "description": "A different feature resolver algorithm can be used by specifying the resolver version in Cargo.toml like this:\n\n[package]\nname = \"my-package\"\nversion = \"1.0.0\"\nresolver = \"2\"\n\nThe version \"1\" resolver is the original resolver that shipped with Cargo up to version 1.50. The default is \"2\" if the root package specifies edition = \"2021\" or a newer edition. Otherwise the default is \"1\".\n\nThe version \"2\" resolver introduces changes in feature unification. See the features chapter for more details.\n\nThe resolver is a global option that affects the entire workspace. The resolver version in dependencies is ignored, only the value in the top-level package will be used. If using a virtual workspace, the version should be specified in the [workspace] table, for example:\n\n[workspace]\nmembers = [\"member1\", \"member2\"]\nresolver = \"2\"", - "type": "string", - "enum": ["1", "2"], - "x-taplo": { - "links": { - "key": "https://doc.rust-lang.org/cargo/reference/resolver.html#resolver-versions" - } - } - }, - "OptLevel": { - "title": "Optimization Level", - "description": "The `opt-level` setting controls the [`-C opt-level` flag](https://doc.rust-lang.org/rustc/codegen-options/index.html#opt-level) which controls the level\nof optimization. Higher optimization levels may produce faster runtime code at\nthe expense of longer compiler times. Higher levels may also change and\nrearrange the compiled code which may make it harder to use with a debugger.\n\nIt is recommended to experiment with different levels to find the right\nbalance for your project. There may be surprising results, such as level `3`\nbeing slower than `2`, or the `\"s\"` and `\"z\"` levels not being necessarily\nsmaller. You may also want to reevaluate your settings over time as newer\nversions of `rustc` changes optimization behavior.\n\nSee also [Profile Guided Optimization](https://doc.rust-lang.org/rustc/profile-guided-optimization.html) for more advanced optimization\ntechniques.", - "enum": [0, 1, 2, 3, "s", "z"], - "x-taplo": { - "docs": { - "enumValues": [ - "No optimizations, also turns on [`cfg(debug_assertions)`](https://doc.rust-lang.org/cargo/reference/profiles.html#debug-assertions).", - "Basic optimizations.", - "Some optimizations.", - "All optimizations.", - "Optimize for binary size.", - "Optimize for binary size, but also turn off loop vectorization." - ] - }, - "links": { - "key": "https://doc.rust-lang.org/cargo/reference/profiles.html#opt-level" - } - } - }, - "Package": { - "title": "Package", - "description": "The only fields required by Cargo are [`name`](https://doc.rust-lang.org/cargo/reference/manifest.html#the-name-field) and\n[`version`](https://doc.rust-lang.org/cargo/reference/manifest.html#the-version-field). If publishing to a registry, the registry may\nrequire additional fields. See the notes below and [the publishing chapter](https://doc.rust-lang.org/cargo/reference/publishing.html) for requirements for publishing to [crates.io](https://crates.io/).", - "type": "object", - "required": ["name", "version"], - "properties": { - "authors": { - "description": "The `authors` field lists people or organizations that are considered the\n\"authors\" of the package. The exact meaning is open to interpretation — it may\nlist the original or primary authors, current maintainers, or owners of the\npackage. These names will be listed on the crate's page on\n[crates.io](https://crates.io). An optional email address may be included within angled\nbrackets at the end of each author.\n\n> **Note**: [crates.io](https://crates.io) requires at least one author to be listed.", - "type": "array", - "items": { - "description": "The `authors` field lists people or organizations that are considered the\n\"authors\" of the package. The exact meaning is open to interpretation — it may\nlist the original or primary authors, current maintainers, or owners of the\npackage. These names will be listed on the crate's page on\n[crates.io](https://crates.io). An optional email address may be included within angled\nbrackets at the end of each author.\n\n> **Note**: [crates.io](https://crates.io) requires at least one author to be listed.", - "type": "string", - "x-taplo": { - "links": { - "key": "https://doc.rust-lang.org/cargo/reference/manifest.html#the-authors-field" - } - } - }, - "x-taplo": { - "links": { - "key": "https://doc.rust-lang.org/cargo/reference/manifest.html#the-authors-field" - } - } - }, - "autobenches": { - "description": "Disable automatic discovery of `bench` targets.\n\nDisabling automatic discovery should only be needed for specialized\nsituations. For example, if you have a library where you want a *module* named\n`bin`, this would present a problem because Cargo would usually attempt to\ncompile anything in the `bin` directory as an executable. Here is a sample\nlayout of this scenario:\n\n```\n├── Cargo.toml\n└── src\n ├── lib.rs\n └── bin\n └── mod.rs\n```\n", - "type": "boolean", - "x-taplo": { - "links": { - "key": "https://doc.rust-lang.org/cargo/reference/cargo-targets.html#target-auto-discovery" - } - } - }, - "autobins": { - "description": "Disable automatic discovery of `bin` targets.\n\nDisabling automatic discovery should only be needed for specialized\nsituations. For example, if you have a library where you want a *module* named\n`bin`, this would present a problem because Cargo would usually attempt to\ncompile anything in the `bin` directory as an executable. Here is a sample\nlayout of this scenario:\n\n```\n├── Cargo.toml\n└── src\n ├── lib.rs\n └── bin\n └── mod.rs\n```\n\nTo prevent Cargo from inferring `src/bin/mod.rs` as an executable, set\nthis to `false` to disable auto-discovery.", - "type": "boolean", - "x-taplo": { - "links": { - "key": "https://doc.rust-lang.org/cargo/reference/cargo-targets.html#target-auto-discovery" - } - } - }, - "autoexamples": { - "description": "Disable automatic discovery of `example` targets.\n\nDisabling automatic discovery should only be needed for specialized\nsituations. For example, if you have a library where you want a *module* named\n`bin`, this would present a problem because Cargo would usually attempt to\ncompile anything in the `bin` directory as an executable. Here is a sample\nlayout of this scenario:\n\n```\n├── Cargo.toml\n└── src\n ├── lib.rs\n └── bin\n └── mod.rs\n```\n", - "type": "boolean", - "x-taplo": { - "links": { - "key": "https://doc.rust-lang.org/cargo/reference/cargo-targets.html#target-auto-discovery" - } - } - }, - "autotests": { - "description": "Disable automatic discovery of `test` targets.\n\nDisabling automatic discovery should only be needed for specialized\nsituations. For example, if you have a library where you want a *module* named\n`bin`, this would present a problem because Cargo would usually attempt to\ncompile anything in the `bin` directory as an executable. Here is a sample\nlayout of this scenario:\n\n```\n├── Cargo.toml\n└── src\n ├── lib.rs\n └── bin\n └── mod.rs\n```\n", - "type": "boolean", - "x-taplo": { - "links": { - "key": "https://doc.rust-lang.org/cargo/reference/cargo-targets.html#target-auto-discovery" - } - } - }, - "build": { - "$ref": "#/definitions/Build" - }, - "categories": { - "description": "The `categories` field is an array of strings of the categories this package\nbelongs to.\n\n```toml\ncategories = [\"command-line-utilities\", \"development-tools::cargo-plugins\"]\n```\n\n> **Note**: [crates.io](https://crates.io) has a maximum of 5 categories. Each category should\n> match one of the strings available at https://crates.io/category_slugs, and\n> must match exactly.", - "type": "array", - "items": { - "description": "The `categories` field is an array of strings of the categories this package\nbelongs to.\n\n```toml\ncategories = [\"command-line-utilities\", \"development-tools::cargo-plugins\"]\n```\n\n> **Note**: [crates.io](https://crates.io) has a maximum of 5 categories. Each category should\n> match one of the strings available at https://crates.io/category_slugs, and\n> must match exactly.", - "type": "string", - "x-taplo": { - "links": { - "key": "https://doc.rust-lang.org/cargo/reference/manifest.html#the-categories-field" - } - } - }, - "x-taplo": { - "links": { - "key": "https://doc.rust-lang.org/cargo/reference/manifest.html#the-categories-field" - } - } - }, - "default-run": { - "description": "The `default-run` field in the `[package]` section of the manifest can be used\nto specify a default binary picked by [`cargo run`](https://doc.rust-lang.org/cargo/commands/cargo-run.html). For example, when there is\nboth `src/bin/a.rs` and `src/bin/b.rs`:\n\n```toml\n[package]\ndefault-run = \"a\"\n```", - "type": "string", - "x-taplo": { - "links": { - "key": "https://doc.rust-lang.org/cargo/reference/manifest.html#the-default-run-field" - } - } - }, - "description": { - "description": "The description is a short blurb about the package. [crates.io](https://crates.io) will display\nthis with your package. This should be plain text (not Markdown).\n\n```toml\n[package]\n# ...\ndescription = \"A short description of my package\"\n```\n\n> **Note**: [crates.io](https://crates.io) requires the `description` to be set.", - "type": "string", - "x-taplo": { - "links": { - "key": "https://doc.rust-lang.org/cargo/reference/manifest.html#the-description-field" - } - } - }, - "documentation": { - "description": "\nThe `documentation` field specifies a URL to a website hosting the crate's\ndocumentation. If no URL is specified in the manifest file, [crates.io](https://crates.io) will\nautomatically link your crate to the corresponding [docs.rs](https://docs.rs) page.\n\n```toml\n[package]\n# ...\ndocumentation = \"https://docs.rs/bitflags\"\n```\n", - "type": "string", - "x-taplo": { - "links": { - "key": "https://doc.rust-lang.org/cargo/reference/manifest.html#the-documentation-field" - } - } - }, - "edition": { - "$ref": "#/definitions/Edition" - }, - "exclude": { - "description": "You can explicitly specify that a set of file patterns should be ignored or\nincluded for the purposes of packaging. The patterns specified in the\n`exclude` field identify a set of files that are not included, and the\npatterns in `include` specify files that are explicitly included.\n\nThe patterns should be [gitignore](https://git-scm.com/docs/gitignore)-style patterns. Briefly:\n\n- `foo` matches any file or directory with the name `foo` anywhere in the\n package. This is equivalent to the pattern `**/foo`.\n- `/foo` matches any file or directory with the name `foo` only in the root of\n the package.\n- `foo/` matches any *directory* with the name `foo` anywhere in the package.\n- Common glob patterns like `*`, `?`, and `[]` are supported:\n - `*` matches zero or more characters except `/`. For example, `*.html`\n matches any file or directory with the `.html` extension anywhere in the\n package.\n - `?` matches any character except `/`. For example, `foo?` matches `food`,\n but not `foo`.\n - `[]` allows for matching a range of characters. For example, `[ab]`\n matches either `a` or `b`. `[a-z]` matches letters a through z.\n- `**/` prefix matches in any directory. For example, `**/foo/bar` matches the\n file or directory `bar` anywhere that is directly under directory `foo`.\n- `/**` suffix matches everything inside. For example, `foo/**` matches all\n files inside directory `foo`, including all files in subdirectories below\n `foo`.\n- `/**/` matches zero or more directories. For example, `a/**/b` matches\n `a/b`, `a/x/b`, `a/x/y/b`, and so on.\n- `!` prefix negates a pattern. For example, a pattern of `src/**.rs` and\n `!foo.rs` would match all files with the `.rs` extension inside the `src`\n directory, except for any file named `foo.rs`.\n\nIf git is being used for a package, the `exclude` field will be seeded with\nthe `gitignore` settings from the repository.\n\n```toml\n[package]\n# ...\nexclude = [\"build/**/*.o\", \"doc/**/*.html\"]\n```\n\n```toml\n[package]\n# ...\ninclude = [\"src/**/*\", \"Cargo.toml\"]\n```\n\nThe options are mutually exclusive: setting `include` will override an\n`exclude`. Note that `include` must be an exhaustive list of files as otherwise\nnecessary source files may not be included. The package's `Cargo.toml` is\nautomatically included.\n\nThe include/exclude list is also used for change tracking in some situations.\nFor targets built with `rustdoc`, it is used to determine the list of files to\ntrack to determine if the target should be rebuilt. If the package has a\n[build script](https://doc.rust-lang.org/cargo/reference/build-scripts.html) that does not emit any `rerun-if-*` directives, then the\ninclude/exclude list is used for tracking if the build script should be re-run\nif any of those files change.", - "type": "array", - "items": { - "description": "You can explicitly specify that a set of file patterns should be ignored or\nincluded for the purposes of packaging. The patterns specified in the\n`exclude` field identify a set of files that are not included, and the\npatterns in `include` specify files that are explicitly included.\n\nThe patterns should be [gitignore](https://git-scm.com/docs/gitignore)-style patterns. Briefly:\n\n- `foo` matches any file or directory with the name `foo` anywhere in the\n package. This is equivalent to the pattern `**/foo`.\n- `/foo` matches any file or directory with the name `foo` only in the root of\n the package.\n- `foo/` matches any *directory* with the name `foo` anywhere in the package.\n- Common glob patterns like `*`, `?`, and `[]` are supported:\n - `*` matches zero or more characters except `/`. For example, `*.html`\n matches any file or directory with the `.html` extension anywhere in the\n package.\n - `?` matches any character except `/`. For example, `foo?` matches `food`,\n but not `foo`.\n - `[]` allows for matching a range of characters. For example, `[ab]`\n matches either `a` or `b`. `[a-z]` matches letters a through z.\n- `**/` prefix matches in any directory. For example, `**/foo/bar` matches the\n file or directory `bar` anywhere that is directly under directory `foo`.\n- `/**` suffix matches everything inside. For example, `foo/**` matches all\n files inside directory `foo`, including all files in subdirectories below\n `foo`.\n- `/**/` matches zero or more directories. For example, `a/**/b` matches\n `a/b`, `a/x/b`, `a/x/y/b`, and so on.\n- `!` prefix negates a pattern. For example, a pattern of `src/**.rs` and\n `!foo.rs` would match all files with the `.rs` extension inside the `src`\n directory, except for any file named `foo.rs`.\n\nIf git is being used for a package, the `exclude` field will be seeded with\nthe `gitignore` settings from the repository.\n\n```toml\n[package]\n# ...\nexclude = [\"build/**/*.o\", \"doc/**/*.html\"]\n```\n\n```toml\n[package]\n# ...\ninclude = [\"src/**/*\", \"Cargo.toml\"]\n```\n\nThe options are mutually exclusive: setting `include` will override an\n`exclude`. Note that `include` must be an exhaustive list of files as otherwise\nnecessary source files may not be included. The package's `Cargo.toml` is\nautomatically included.\n\nThe include/exclude list is also used for change tracking in some situations.\nFor targets built with `rustdoc`, it is used to determine the list of files to\ntrack to determine if the target should be rebuilt. If the package has a\n[build script](https://doc.rust-lang.org/cargo/reference/build-scripts.html) that does not emit any `rerun-if-*` directives, then the\ninclude/exclude list is used for tracking if the build script should be re-run\nif any of those files change.", - "type": "string", - "x-taplo": { - "links": { - "key": "https://doc.rust-lang.org/cargo/reference/manifest.html#the-exclude-and-include-fields" - } - } - }, - "x-taplo": { - "links": { - "key": "https://doc.rust-lang.org/cargo/reference/manifest.html#the-exclude-and-include-fields" - } - } - }, - "homepage": { - "description": "The `homepage` field should be a URL to a site that is the home page for your\npackage.\n\n```toml\n[package]\n# ...\nhomepage = \"https://serde.rs/\"\n```", - "type": "string", - "x-taplo": { - "links": { - "key": "https://doc.rust-lang.org/cargo/reference/manifest.html#the-homepage-field" - } - } - }, - "im-a-teapot": { - "description": "Sets whether the current package is a teapot or something else that is not capable of brewing tea.", - "type": "boolean", - "x-taplo": { - "hidden": true - } - }, - "include": { - "description": "You can explicitly specify that a set of file patterns should be ignored or\nincluded for the purposes of packaging. The patterns specified in the\n`exclude` field identify a set of files that are not included, and the\npatterns in `include` specify files that are explicitly included.\n\nThe patterns should be [gitignore](https://git-scm.com/docs/gitignore)-style patterns. Briefly:\n\n- `foo` matches any file or directory with the name `foo` anywhere in the\n package. This is equivalent to the pattern `**/foo`.\n- `/foo` matches any file or directory with the name `foo` only in the root of\n the package.\n- `foo/` matches any *directory* with the name `foo` anywhere in the package.\n- Common glob patterns like `*`, `?`, and `[]` are supported:\n - `*` matches zero or more characters except `/`. For example, `*.html`\n matches any file or directory with the `.html` extension anywhere in the\n package.\n - `?` matches any character except `/`. For example, `foo?` matches `food`,\n but not `foo`.\n - `[]` allows for matching a range of characters. For example, `[ab]`\n matches either `a` or `b`. `[a-z]` matches letters a through z.\n- `**/` prefix matches in any directory. For example, `**/foo/bar` matches the\n file or directory `bar` anywhere that is directly under directory `foo`.\n- `/**` suffix matches everything inside. For example, `foo/**` matches all\n files inside directory `foo`, including all files in subdirectories below\n `foo`.\n- `/**/` matches zero or more directories. For example, `a/**/b` matches\n `a/b`, `a/x/b`, `a/x/y/b`, and so on.\n- `!` prefix negates a pattern. For example, a pattern of `src/**.rs` and\n `!foo.rs` would match all files with the `.rs` extension inside the `src`\n directory, except for any file named `foo.rs`.\n\nIf git is being used for a package, the `exclude` field will be seeded with\nthe `gitignore` settings from the repository.\n\n```toml\n[package]\n# ...\nexclude = [\"build/**/*.o\", \"doc/**/*.html\"]\n```\n\n```toml\n[package]\n# ...\ninclude = [\"src/**/*\", \"Cargo.toml\"]\n```\n\nThe options are mutually exclusive: setting `include` will override an\n`exclude`. Note that `include` must be an exhaustive list of files as otherwise\nnecessary source files may not be included. The package's `Cargo.toml` is\nautomatically included.\n\nThe include/exclude list is also used for change tracking in some situations.\nFor targets built with `rustdoc`, it is used to determine the list of files to\ntrack to determine if the target should be rebuilt. If the package has a\n[build script](https://doc.rust-lang.org/cargo/reference/build-scripts.html) that does not emit any `rerun-if-*` directives, then the\ninclude/exclude list is used for tracking if the build script should be re-run\nif any of those files change.", - "type": "array", - "items": { - "description": "You can explicitly specify that a set of file patterns should be ignored or\nincluded for the purposes of packaging. The patterns specified in the\n`exclude` field identify a set of files that are not included, and the\npatterns in `include` specify files that are explicitly included.\n\nThe patterns should be [gitignore](https://git-scm.com/docs/gitignore)-style patterns. Briefly:\n\n- `foo` matches any file or directory with the name `foo` anywhere in the\n package. This is equivalent to the pattern `**/foo`.\n- `/foo` matches any file or directory with the name `foo` only in the root of\n the package.\n- `foo/` matches any *directory* with the name `foo` anywhere in the package.\n- Common glob patterns like `*`, `?`, and `[]` are supported:\n - `*` matches zero or more characters except `/`. For example, `*.html`\n matches any file or directory with the `.html` extension anywhere in the\n package.\n - `?` matches any character except `/`. For example, `foo?` matches `food`,\n but not `foo`.\n - `[]` allows for matching a range of characters. For example, `[ab]`\n matches either `a` or `b`. `[a-z]` matches letters a through z.\n- `**/` prefix matches in any directory. For example, `**/foo/bar` matches the\n file or directory `bar` anywhere that is directly under directory `foo`.\n- `/**` suffix matches everything inside. For example, `foo/**` matches all\n files inside directory `foo`, including all files in subdirectories below\n `foo`.\n- `/**/` matches zero or more directories. For example, `a/**/b` matches\n `a/b`, `a/x/b`, `a/x/y/b`, and so on.\n- `!` prefix negates a pattern. For example, a pattern of `src/**.rs` and\n `!foo.rs` would match all files with the `.rs` extension inside the `src`\n directory, except for any file named `foo.rs`.\n\nIf git is being used for a package, the `exclude` field will be seeded with\nthe `gitignore` settings from the repository.\n\n```toml\n[package]\n# ...\nexclude = [\"build/**/*.o\", \"doc/**/*.html\"]\n```\n\n```toml\n[package]\n# ...\ninclude = [\"src/**/*\", \"Cargo.toml\"]\n```\n\nThe options are mutually exclusive: setting `include` will override an\n`exclude`. Note that `include` must be an exhaustive list of files as otherwise\nnecessary source files may not be included. The package's `Cargo.toml` is\nautomatically included.\n\nThe include/exclude list is also used for change tracking in some situations.\nFor targets built with `rustdoc`, it is used to determine the list of files to\ntrack to determine if the target should be rebuilt. If the package has a\n[build script](https://doc.rust-lang.org/cargo/reference/build-scripts.html) that does not emit any `rerun-if-*` directives, then the\ninclude/exclude list is used for tracking if the build script should be re-run\nif any of those files change.", - "type": "string", - "x-taplo": { - "links": { - "key": "https://doc.rust-lang.org/cargo/reference/manifest.html#the-exclude-and-include-fields" - } - } - }, - "x-taplo": { - "links": { - "key": "https://doc.rust-lang.org/cargo/reference/manifest.html#the-exclude-and-include-fields" - } - } - }, - "keywords": { - "description": "The `keywords` field is an array of strings that describe this package. This\ncan help when searching for the package on a registry, and you may choose any\nwords that would help someone find this crate.\n\n```toml\n[package]\n# ...\nkeywords = [\"gamedev\", \"graphics\"]\n```\n\n> **Note**: [crates.io](https://crates.io) has a maximum of 5 keywords. Each keyword must be\n> ASCII text, start with a letter, and only contain letters, numbers, `_` or\n> `-`, and have at most 20 characters.", - "type": "array", - "items": { - "description": "The `keywords` field is an array of strings that describe this package. This\ncan help when searching for the package on a registry, and you may choose any\nwords that would help someone find this crate.\n\n```toml\n[package]\n# ...\nkeywords = [\"gamedev\", \"graphics\"]\n```\n\n> **Note**: [crates.io](https://crates.io) has a maximum of 5 keywords. Each keyword must be\n> ASCII text, start with a letter, and only contain letters, numbers, `_` or\n> `-`, and have at most 20 characters.", - "type": "string", - "x-taplo": { - "links": { - "key": "https://doc.rust-lang.org/cargo/reference/manifest.html#the-keywords-field" - } - } - }, - "x-taplo": { - "links": { - "key": "https://doc.rust-lang.org/cargo/reference/manifest.html#the-keywords-field" - } - } - }, - "license": { - "description": "The `license` field contains the name of the software license that the package\nis released under.\n\n[crates.io](https://crates.io/) interprets the `license` field as an [SPDX 2.1 license\nexpression](https://spdx.org/spdx-specification-21-web-version#h.jxpfx0ykyb60). The name must be a known license\nfrom the [SPDX license list 3.6](https://github.com/spdx/license-list-data/tree/v3.6). Parentheses are not\ncurrently supported. See the [SPDX site](https://spdx.org/license-list) for more information.\n\nSPDX license expressions support AND and OR operators to combine multiple\nlicenses.\n\n```toml\n[package]\n# ...\nlicense = \"MIT OR Apache-2.0\"\n```\n\nUsing `OR` indicates the user may choose either license. Using `AND` indicates\nthe user must comply with both licenses simultaneously. The `WITH` operator\nindicates a license with a special exception. Some examples:\n\n* `MIT OR Apache-2.0`\n* `LGPL-2.1 AND MIT AND BSD-2-Clause`\n* `GPL-2.0+ WITH Bison-exception-2.2`\n\nIf a package is using a nonstandard license, then the `license-file` field may\nbe specified in lieu of the `license` field.", - "type": "string", - "x-taplo": { - "links": { - "key": "https://doc.rust-lang.org/cargo/reference/manifest.html#the-license-and-license-file-fields" - } - } - }, - "license-file": { - "description": "The `license-file` field contains the path to a file\ncontaining the text of the license (relative to this `Cargo.toml`).\n\n```toml\n[package]\n# ...\nlicense-file = \"LICENSE.txt\"\n```\n\n> **Note**: [crates.io](https://crates.io) requires either `license` or `license-file` to be set.", - "type": "string", - "x-taplo": { - "links": { - "key": "https://doc.rust-lang.org/cargo/reference/manifest.html#the-license-and-license-file-fields" - } - } - }, - "links": { - "description": "The `links` field specifies the name of a native library that is being linked\nto. More information can be found in the [`links`](https://doc.rust-lang.org/cargo/reference/build-scripts.html#the-links-manifest-key) section of the build\nscript guide.\n\n```toml\n[package]\n# ...\nlinks = \"foo\"\n```", - "type": "string", - "x-taplo": { - "links": { - "key": "https://doc.rust-lang.org/cargo/reference/manifest.html#the-links-field" - } - } - }, - "metabuild": { - "$ref": "#/definitions/MetaBuild", - "x-taplo": { - "hidden": true - } - }, - "metadata": { - "description": "Cargo by default will warn about unused keys in `Cargo.toml` to assist in\ndetecting typos and such. The `package.metadata` table, however, is completely\nignored by Cargo and will not be warned about. This section can be used for\ntools which would like to store package configuration in `Cargo.toml`. For\nexample:\n\n```toml\n[package]\nname = \"...\"\n# ...\n\n# Metadata used when generating an Android APK, for example.\n[package.metadata.android]\npackage-name = \"my-awesome-android-app\"\nassets = \"path/to/static\"\n```\n", - "type": "object", - "additionalProperties": true, - "x-taplo": { - "links": { - "key": "https://doc.rust-lang.org/cargo/reference/manifest.html#the-metadata-table" - } - } - }, - "name": { - "description": "The package name is an identifier used to refer to the package. It is used\nwhen listed as a dependency in another package, and as the default name of\ninferred lib and bin targets.\n\nThe name must use only [alphanumeric](https://doc.rust-lang.org/std/primitive.char.html#method.is_alphanumeric) characters or `-` or `_`, and cannot be empty.\nNote that [`cargo new`](https://doc.rust-lang.org/cargo/commands/cargo-new.html) and [`cargo init`](https://doc.rust-lang.org/cargo/commands/cargo-init.html) impose some additional restrictions on\nthe package name, such as enforcing that it is a valid Rust identifier and not\na keyword. [crates.io](https://crates.io) imposes even more restrictions, such as\nenforcing only ASCII characters, not a reserved name, not a special Windows\nname such as \"nul\", is not too long, etc.", - "type": "string", - "x-taplo": { - "links": { - "key": "https://doc.rust-lang.org/cargo/reference/manifest.html#the-name-field" - } - } - }, - "namespaced-features": { - "type": "boolean", - "x-taplo": { - "hidden": true - } - }, - "publish": { - "$ref": "#/definitions/Publish" - }, - "publish-lockfile": { - "type": "boolean", - "x-taplo": { - "hidden": true - } - }, - "readme": { - "description": "The `readme` field should be the path to a file in the package root (relative\nto this `Cargo.toml`) that contains general information about the package.\nThis file will be transferred to the registry when you publish. [crates.io](https://crates.io)\nwill interpret it as Markdown and render it on the crate's page.\n\n```toml\n[package]\n# ...\nreadme = \"README.md\"\n```\n\nIf no value is specified for this field, and a file named `README.md`,\n`README.txt` or `README` exists in the package root, then the name of that\nfile will be used. You can suppress this behavior by setting this field to\n`false`. If the field is set to `true`, a default value of `README.md` will\nbe assumed.\n", - "$ref": "#/definitions/Readme", - "x-taplo": { - "links": { - "key": "https://doc.rust-lang.org/cargo/reference/manifest.html#the-readme-field" - } - } - }, - "repository": { - "description": "The `repository` field should be a URL to the source repository for your\npackage.\n\n```toml\n[package]\n# ...\nrepository = \"https://github.com/rust-lang/cargo/\"\n```", - "type": "string", - "x-taplo": { - "links": { - "key": "https://doc.rust-lang.org/cargo/reference/manifest.html#the-repository-field" - } - } - }, - "resolver": { - "$ref": "#/definitions/Resolver" - }, - "rust-version": { - "description": "The `rust-version` field is an optional key that tells cargo what version of the\nRust language and compiler your package can be compiled with. If the currently\nselected version of the Rust compiler is older than the stated version, cargo\nwill exit with an error, telling the user what version is required.\n\nThe first version of Cargo that supports this field was released with Rust 1.56.0.\nIn older releases, the field will be ignored, and Cargo will display a warning.\n\n```toml\n[package]\n# ...\nrust-version = \"1.56\"\n```\n\nThe Rust version must be a bare version number with two or three components; it\ncannot include semver operators or pre-release identifiers. Compiler pre-release\nidentifiers such as -nightly will be ignored while checking the Rust version.\nThe `rust-version` must be equal to or newer than the version that first\nintroduced the configured `edition`.\n\nThe `rust-version` may be ignored using the `--ignore-rust-version` option.\n\nSetting the `rust-version` key in `[package]` will affect all targets/crates in\nthe package, including test suites, benchmarks, binaries, examples, etc.", - "type": "string", - "x-taplo": { - "links": { - "key": "https://doc.rust-lang.org/nightly/cargo/reference/manifest.html#the-rust-version-field" - } - } - }, - "version": { - "$ref": "#/definitions/SemVer" - }, - "workspace": { - "description": "The `workspace` field can be used to configure the workspace that this package\nwill be a member of. If not specified this will be inferred as the first\nCargo.toml with `[workspace]` upwards in the filesystem. Setting this is\nuseful if the member is not inside a subdirectory of the workspace root.\n\n```toml\n[package]\n# ...\nworkspace = \"path/to/workspace/root\"\n```\n\nThis field cannot be specified if the manifest already has a `[workspace]`\ntable defined. That is, a crate cannot both be a root crate in a workspace\n(contain `[workspace]`) and also be a member crate of another workspace\n(contain `package.workspace`).\n\nFor more information, see the [workspaces chapter](https://doc.rust-lang.org/cargo/reference/workspaces.html).", - "type": "string", - "x-taplo": { - "links": { - "key": "https://doc.rust-lang.org/cargo/reference/manifest.html#the-workspace-field" - } - } - } - }, - "x-taplo": { - "links": { - "key": "https://doc.rust-lang.org/cargo/reference/manifest.html#the-package-section" - } - } - }, - "Panic": { - "title": "Panic", - "description": "The `panic` setting controls the [`-C panic` flag](https://doc.rust-lang.org/rustc/codegen-options/index.html#panic) which controls which panic\nstrategy to use.\n\nWhen set to `\"unwind\"`, the actual value depends on the default of the target\nplatform. For example, the NVPTX platform does not support unwinding, so it\nalways uses `\"abort\"`.\n\nTests, benchmarks, build scripts, and proc macros ignore the `panic` setting.\nThe `rustc` test harness currently requires `unwind` behavior. See the\n[`panic-abort-tests`](https://doc.rust-lang.org/cargo/reference/unstable.html#panic-abort-tests) unstable flag which enables `abort` behavior.\n\nAdditionally, when using the `abort` strategy and building a test, all of the\ndependencies will also be forced to built with the `unwind` strategy.", - "type": "string", - "enum": ["unwind", "abort"], - "x-taplo": { - "docs": { - "enumValues": [ - "Unwind the stack upon panic.", - "Terminate the process upon panic." - ] - }, - "links": { - "key": "https://doc.rust-lang.org/cargo/reference/profiles.html#panic" - } - } - }, - "Platform": { - "title": "Platform", - "type": "object", - "properties": { - "build-dependencies": { - "description": "You can depend on other Cargo-based crates for use in your build scripts.\nDependencies are declared through the `build-dependencies` section of the\nmanifest:\n\n```toml\n[build-dependencies]\ncc = \"1.0.3\"\n```\n\nThe build script **does not** have access to the dependencies listed\nin the `dependencies` or `dev-dependencies` section. Build\ndependencies will likewise not be available to the package itself\nunless listed under the `dependencies` section as well. A package\nitself and its build script are built separately, so their\ndependencies need not coincide. Cargo is kept simpler and cleaner by\nusing independent dependencies for independent purposes.", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/Dependency" - }, - "x-taplo": { - "links": { - "key": "https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#build-dependencies" - }, - "plugins": ["crates"], - "crates": { - "schemas": "dependencies" - } - } - }, - "build_dependencies": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/Dependency" - }, - "x-taplo": { - "hidden": true - } - }, - "dependencies": { - "description": "Cargo is configured to look for dependencies on [crates.io](https://crates.io) by default. Only\nthe name and a version string are required in this case. In [the cargo\nguide](https://doc.rust-lang.org/cargo/guide/index.html), we specified a dependency on the `time` crate:\n\n```toml\n[dependencies]\ntime = \"0.1.12\"\n```\n\nThe string `\"0.1.12\"` is a [semver](https://github.com/steveklabnik/semver#requirements) version requirement. Since this\nstring does not have any operators in it, it is interpreted the same way as\nif we had specified `\"^0.1.12\"`, which is called a caret requirement.\n\nA dependency can also be defined by a table with additional options:\n\n```toml\n[dependencies]\ntime = { path = \"../time\", version = \"0.1.12\" }\n```", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/Dependency" - }, - "x-taplo": { - "links": { - "key": "https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html" - } - } - }, - "dev-dependencies": { - "description": "The format of `[dev-dependencies]` is equivalent to `[dependencies]`:\n\n```toml\n[dev-dependencies]\ntempdir = \"0.3\"\n```\n\nDev-dependencies are not used when compiling\na package for building, but are used for compiling tests, examples, and\nbenchmarks.\n\nThese dependencies are *not* propagated to other packages which depend on this\npackage.\n\nYou can also have target-specific development dependencies by using\n`dev-dependencies` in the target section header instead of `dependencies`. For\nexample:\n\n```toml\n[target.'cfg(unix)'.dev-dependencies]\nmio = \"0.0.1\"\n```\n\n> **Note**: When a package is published, only dev-dependencies that specify a\n> `version` will be included in the published crate. For most use cases,\n> dev-dependencies are not needed when published, though some users (like OS\n> packagers) may want to run tests within a crate, so providing a `version` if\n> possible can still be beneficial.\n", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/Dependency" - }, - "x-taplo": { - "links": { - "key": "https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#development-dependencies" - }, - "plugins": ["crates"], - "crates": { - "schemas": "dependencies" - } - } - }, - "dev_dependencies": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/Dependency" - }, - "x-taplo": { - "hidden": true - } - } - } - }, - "BuildOverride": { - "title": "Build Override", - "type": "object", - "description": "Profile settings can be overridden for specific packages and build-time\ncrates. To override the settings for a specific package, use the `package`\ntable to change the settings for the named package:\n\n```toml\n# The `foo` package will use the -Copt-level=3 flag.\n[profile.dev.package.foo]\nopt-level = 3\n```\n\nThe package name is actually 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\n`[profile.dev.package.\"foo:2.1.0\"]`.\n\nTo override the settings for all dependencies (but not any workspace member),\nuse the `\"*\"` package name:\n\n```toml\n# Set the default for dependencies.\n[profile.dev.package.\"*\"]\nopt-level = 2\n```\n\nTo override the settings for build scripts, proc macros, and their\ndependencies, use the `build-override` table:\n\n```toml\n# Set the settings for build scripts and proc-macros.\n[profile.dev.build-override]\nopt-level = 3\n```\n\n> Note: When a dependency is both a normal dependency and a build dependency,\n> Cargo will try to only build it once when `--target` is not specified. When\n> using `build-override`, the dependency may need to be built twice, once as a\n> normal dependency and once with the overridden build settings. This may\n> increase initial build times.\n", - "allOf": [ - { - "$ref": "#/definitions/Profile" - } - ], - "x-taplo": { - "docs": { - "main": "Profile settings can be overridden for specific packages and build-time\ncrates. To override the settings for a specific package, use the `package`\ntable to change the settings for the named package:\n\n```toml\n# The `foo` package will use the -Copt-level=3 flag.\n[profile.dev.package.foo]\nopt-level = 3\n```\n\nThe package name is actually 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\n`[profile.dev.package.\"foo:2.1.0\"]`.\n\nTo override the settings for all dependencies (but not any workspace member),\nuse the `\"*\"` package name:\n\n```toml\n# Set the default for dependencies.\n[profile.dev.package.\"*\"]\nopt-level = 2\n```\n\nTo override the settings for build scripts, proc macros, and their\ndependencies, use the `build-override` table:\n\n```toml\n# Set the settings for build scripts and proc-macros.\n[profile.dev.build-override]\nopt-level = 3\n```\n\n> Note: When a dependency is both a normal dependency and a build dependency,\n> Cargo will try to only build it once when `--target` is not specified. When\n> using `build-override`, the dependency may need to be built twice, once as a\n> normal dependency and once with the overridden build settings. This may\n> increase initial build times.\n" - }, - "links": { - "key": "https://doc.rust-lang.org/cargo/reference/profiles.html#overrides" - } - } - }, - "ProfileWithBuildOverride": { - "allOf": [ - { - "$ref": "#/definitions/Profile" - }, - { - "properties": { - "build-override": { - "$ref": "#/definitions/Profile" - } - } - } - ] - }, - "Profile": { - "title": "Profile", - "type": "object", - "properties": { - "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.0, - "x-taplo": { - "links": { - "key": "https://doc.rust-lang.org/cargo/reference/profiles.html#codegen-units" - } - } - }, - "debug": { - "$ref": "#/definitions/DebugLevel" - }, - "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" - } - } - }, - "dir-name": { - "type": "string", - "x-taplo": { - "hidden": true - } - }, - "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" - } - } - }, - "inherits": { - "type": "string", - "x-taplo": { - "hidden": true - } - }, - "lto": { - "$ref": "#/definitions/Lto" - }, - "opt-level": { - "$ref": "#/definitions/OptLevel" - }, - "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" - } - } - }, - "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-taplo": { - "links": { - "key": "https://doc.rust-lang.org/cargo/reference/profiles.html#overrides" - } - } - }, - "panic": { - "$ref": "#/definitions/Panic" - }, - "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" - } - } - } - } - }, - "Profiles": { - "title": "Profiles", - "description": "Profiles provide a way to alter the compiler settings, influencing things like optimizations and debugging symbols.\n\nCargo has 4 built-in profiles: dev, release, test, and bench. It automatically chooses the profile based on which command is being run, the package and target that is being built, and command-line flags like --release.", - "type": "object", - "properties": { - "bench": { - "$ref": "#/definitions/ProfileWithBuildOverride" - }, - "dev": { - "$ref": "#/definitions/ProfileWithBuildOverride" - }, - "release": { - "$ref": "#/definitions/ProfileWithBuildOverride" - }, - "test": { - "$ref": "#/definitions/ProfileWithBuildOverride" - } - }, - "additionalProperties": { - "$ref": "#/definitions/ProfileWithBuildOverride" - }, - "x-taplo": { - "links": { - "key": "https://doc.rust-lang.org/cargo/reference/profiles.html" - } - } - }, - "Publish": { - "title": "Publish", - "description": "The `publish` field can be used to prevent a package from being published to a package registry (like *crates.io*) by mistake, for instance to keep a package\nprivate in a company.\n\n```toml\n[package]\n# ...\npublish = false\n```\n\nThe value may also be an array of strings which are registry names that are\nallowed to be published to.\n\n```toml\n[package]\n# ...\npublish = [\"some-registry-name\"]\n```", - "anyOf": [ - { - "description": "A boolean indicating whether the package can be published.", - "type": "boolean", - "enum": [true, false], - "default": true, - "x-taplo": { - "docs": { - "enumValues": [ - "The package can be published.", - "The package cannot be published." - ] - } - } - }, - { - "type": "array", - "description": "An array of registry names.", - "items": { - "type": "string" - } - } - ], - "x-taplo": { - "links": { - "key": "https://doc.rust-lang.org/cargo/reference/manifest.html#the-publish-field" - } - } - }, - "Readme": { - "title": "Readme", - "description": "The `readme` field should be the path to a file in the package root (relative\nto this `Cargo.toml`) that contains general information about the package.\nThis file will be transferred to the registry when you publish. [crates.io](https://crates.io)\nwill interpret it as Markdown and render it on the crate's page.\n\n```toml\n[package]\n# ...\nreadme = \"README.md\"\n```\n\nIf no value is specified for this field, and a file named `README.md`,\n`README.txt` or `README` exists in the package root, then the name of that\nfile will be used. You can suppress this behavior by setting this field to\n`false`. If the field is set to `true`, a default value of `README.md` will\nbe assumed.\n", - "anyOf": [ - { - "description": "The `readme` field should be the path to a file in the package root (relative\nto this `Cargo.toml`) that contains general information about the package.", - "type": "string" - }, - { - "type": "boolean", - "enum": [true, false], - "x-taplo": { - "docs": { - "enumValues": [ - "Use the `README.md` file.", - "Do not use the default `README.md` file" - ] - } - } - } - ], - "x-taplo": { - "links": { - "key": "https://doc.rust-lang.org/cargo/reference/manifest.html#the-readme-field" - } - } - }, - "SemVer": { - "title": "Semantic Version", - "description": "Cargo bakes in the concept of [Semantic Versioning](https://semver.org/), so make sure you follow some basic rules:\n\n* Before you reach 1.0.0, anything goes, but if you make breaking changes,\n increment the minor version. In Rust, breaking changes include adding fields to\n structs or variants to enums.\n* After 1.0.0, only make breaking changes when you increment the major version.\n Don’t break the build.\n* After 1.0.0, don’t add any new public API (no new `pub` anything) in patch-level\n versions. Always increment the minor version if you add any new `pub` structs,\n traits, fields, types, functions, methods or anything else.\n* Use version numbers with three numeric parts such as 1.0.0 rather than 1.0.", - "default": "0.1.0", - "type": "string", - "format": "semver", - "x-taplo": { - "links": { - "key": "https://doc.rust-lang.org/cargo/reference/manifest.html#the-version-field" - } - } - }, - "SemVerRequirement": { - "title": "Semantic Version Requirement", - "description": "The [version requirement](https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html) of the target dependency.", - "default": "*", - "type": "string", - "format": "semver-requirement", - "x-taplo": { - "links": { - "key": "https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html" - }, - "plugins": ["crates"], - "crates": { - "schemas": "version" - } - } - }, - "Target": { - "title": "Target", - "type": "object", - "properties": { - "bench": { - "description": "The `bench` field indicates whether or not the target is benchmarked by\ndefault by [`cargo bench`](https://doc.rust-lang.org/cargo/commands/cargo-bench.html). The default is `true` for lib, bins, and\nbenchmarks.", - "type": "boolean", - "x-taplo": { - "links": { - "key": "https://doc.rust-lang.org/cargo/reference/cargo-targets.html#the-bench-field" - } - } - }, - "crate-type": { - "description": "The `crate-type` field defines the [crate types](https://doc.rust-lang.org/reference/linkage.html) that will be generated by the\ntarget. It is an array of strings, allowing you to specify multiple crate\ntypes for a single target. This can only be specified for libraries and\nexamples. Binaries, tests, and benchmarks are always the \"bin\" crate type.\n\nThe available options are `bin`, `lib`, `rlib`, `dylib`, `cdylib`,\n`staticlib`, and `proc-macro`. You can read more about the different crate\ntypes in the [Rust Reference Manual](https://doc.rust-lang.org/reference/linkage.html).", - "type": "array", - "items": { - "description": "The `crate-type` field defines the [crate types](https://doc.rust-lang.org/reference/linkage.html) that will be generated by the\ntarget. It is an array of strings, allowing you to specify multiple crate\ntypes for a single target. This can only be specified for libraries and\nexamples. Binaries, tests, and benchmarks are always the \"bin\" crate type.\n\nThe available options are `bin`, `lib`, `rlib`, `dylib`, `cdylib`,\n`staticlib`, and `proc-macro`. You can read more about the different crate\ntypes in the [Rust Reference Manual](https://doc.rust-lang.org/reference/linkage.html).", - "type": "string", - "x-taplo": { - "docs": { - "enumValues": [ - "A runnable executable will be produced. This requires that there is a `main` function in the crate which\nwill be run when the program begins executing. This will link in all Rust and\nnative dependencies, producing a distributable binary.", - "A Rust library will be produced.\nThis is an ambiguous concept as to what exactly is produced because a library\ncan manifest itself in several forms. The purpose of this generic `lib` option\nis to generate the \"compiler recommended\" style of library. The output library\nwill always be usable by rustc, but the actual type of library may change from\ntime-to-time. The remaining output types are all different flavors of\nlibraries, and the `lib` type can be seen as an alias for one of them (but the\nactual one is compiler-defined).", - "A \"Rust library\" file will be produced. This is used as an intermediate artifact and can be thought of as a\n\"static Rust library\". These `rlib` files, unlike `staticlib` files, are\ninterpreted by the compiler in future linkage. This essentially means\nthat `rustc` will look for metadata in `rlib` files like it looks for metadata\nin dynamic libraries. This form of output is used to produce statically linked\nexecutables as well as `staticlib` outputs.", - "A dynamic Rust library will be produced. This is different from the `lib` output type in that this forces\ndynamic library generation. The resulting dynamic library can be used as a\ndependency for other libraries and/or executables. This output type will\ncreate `*.so` files on linux, `*.dylib` files on osx, and `*.dll` files on\nwindows.", - "A dynamic system library will be produced. This is used when compiling\na dynamic library to be loaded from another language. This output type will\ncreate `*.so` files on Linux, `*.dylib` files on macOS, and `*.dll` files on\nWindows.", - "A static system library will be produced. This is different from other library outputs in that\nthe compiler will never attempt to link to `staticlib` outputs. The\npurpose of this output type is to create a static library containing all of\nthe local crate's code along with all upstream dependencies. The static\nlibrary is actually a `*.a` archive on linux and osx and a `*.lib` file on\nwindows. This format is recommended for use in situations such as linking\nRust code into an existing non-Rust application because it will not have\ndynamic dependencies on other Rust code.", - "The output produced is not specified, but if a `-L` path is provided to it then the\ncompiler will recognize the output artifacts as a macro and it can be loaded\nfor a program. Crates compiled with this crate type must only export\n[procedural macros](https://doc.rust-lang.org/reference/procedural-macros.html). The compiler will automatically set the `proc_macro`\n[configuration option](https://doc.rust-lang.org/reference/conditional-compilation.html). The crates are always compiled with the same target\nthat the compiler itself was built with. For example, if you are executing\nthe compiler from Linux with an `x86_64` CPU, the target will be\n`x86_64-unknown-linux-gnu` even if the crate is a dependency of another crate\nbeing built for a different target." - ] - }, - "links": { - "key": "https://doc.rust-lang.org/cargo/reference/cargo-targets.html#the-crate-type-field" - } - } - }, - "x-taplo": { - "docs": { - "enumValues": [ - "A runnable executable will be produced. This requires that there is a `main` function in the crate which\nwill be run when the program begins executing. This will link in all Rust and\nnative dependencies, producing a distributable binary.", - "A Rust library will be produced.\nThis is an ambiguous concept as to what exactly is produced because a library\ncan manifest itself in several forms. The purpose of this generic `lib` option\nis to generate the \"compiler recommended\" style of library. The output library\nwill always be usable by rustc, but the actual type of library may change from\ntime-to-time. The remaining output types are all different flavors of\nlibraries, and the `lib` type can be seen as an alias for one of them (but the\nactual one is compiler-defined).", - "A \"Rust library\" file will be produced. This is used as an intermediate artifact and can be thought of as a\n\"static Rust library\". These `rlib` files, unlike `staticlib` files, are\ninterpreted by the compiler in future linkage. This essentially means\nthat `rustc` will look for metadata in `rlib` files like it looks for metadata\nin dynamic libraries. This form of output is used to produce statically linked\nexecutables as well as `staticlib` outputs.", - "A dynamic Rust library will be produced. This is different from the `lib` output type in that this forces\ndynamic library generation. The resulting dynamic library can be used as a\ndependency for other libraries and/or executables. This output type will\ncreate `*.so` files on linux, `*.dylib` files on osx, and `*.dll` files on\nwindows.", - "A dynamic system library will be produced. This is used when compiling\na dynamic library to be loaded from another language. This output type will\ncreate `*.so` files on Linux, `*.dylib` files on macOS, and `*.dll` files on\nWindows.", - "A static system library will be produced. This is different from other library outputs in that\nthe compiler will never attempt to link to `staticlib` outputs. The\npurpose of this output type is to create a static library containing all of\nthe local crate's code along with all upstream dependencies. The static\nlibrary is actually a `*.a` archive on linux and osx and a `*.lib` file on\nwindows. This format is recommended for use in situations such as linking\nRust code into an existing non-Rust application because it will not have\ndynamic dependencies on other Rust code.", - "The output produced is not specified, but if a `-L` path is provided to it then the\ncompiler will recognize the output artifacts as a macro and it can be loaded\nfor a program. Crates compiled with this crate type must only export\n[procedural macros](https://doc.rust-lang.org/reference/procedural-macros.html). The compiler will automatically set the `proc_macro`\n[configuration option](https://doc.rust-lang.org/reference/conditional-compilation.html). The crates are always compiled with the same target\nthat the compiler itself was built with. For example, if you are executing\nthe compiler from Linux with an `x86_64` CPU, the target will be\n`x86_64-unknown-linux-gnu` even if the crate is a dependency of another crate\nbeing built for a different target." - ] - }, - "links": { - "key": "https://doc.rust-lang.org/cargo/reference/cargo-targets.html#the-crate-type-field" - } - } - }, - "crate_type": { - "type": "array", - "items": { - "type": "string", - "x-taplo": { - "hidden": true - } - }, - "x-taplo": { - "hidden": true - } - }, - "doc": { - "description": "The `doc` field indicates whether or not the target is included in the\ndocumentation generated by [`cargo doc`](https://doc.rust-lang.org/cargo/commands/cargo-doc.html) by default. The default is `true` for\nlibraries and binaries.\n\n> **Note**: The binary will be skipped if its name is the same as the lib\n> target.", - "type": "boolean", - "x-taplo": { - "links": { - "key": "https://doc.rust-lang.org/cargo/reference/cargo-targets.html#the-doc-field" - } - } - }, - "doctest": { - "description": "The `doctest` field indicates whether or not [documentation examples](https://doc.rust-lang.org/rustdoc/documentation-tests.html) are\ntested by default by [`cargo test`](https://doc.rust-lang.org/cargo/commands/cargo-test.html). This is only relevant for libraries, it\nhas no effect on other sections. The default is `true` for the library.\n", - "type": "boolean", - "x-taplo": { - "links": { - "key": "https://doc.rust-lang.org/cargo/reference/cargo-targets.html#the-doctest-field" - } - } - }, - "edition": { - "$ref": "#/definitions/Edition" - }, - "harness": { - "description": "The `harness` field indicates that the [`--test` flag](https://doc.rust-lang.org/rustc/command-line-arguments.html#option-test) will be passed to\n`rustc` which will automatically include the libtest library which is the\ndriver for collecting and running tests marked with the [`#[test]` attribute](https://doc.rust-lang.org/reference/attributes/testing.html#the-test-attribute) or benchmarks with the `#[bench]` attribute. The\ndefault is `true` for all targets.\n\nIf set to `false`, then you are responsible for defining a `main()` function\nto run tests and benchmarks.\n\nTests have the [`cfg(test)` conditional expression](https://doc.rust-lang.org/reference/conditional-compilation.html#test) enabled whether\nor not the harness is enabled.", - "type": "boolean", - "x-taplo": { - "links": { - "key": "https://doc.rust-lang.org/cargo/reference/cargo-targets.html#the-harness-field" - } - } - }, - "name": { - "description": "The `name` field specifies the name of the target, which corresponds to the\nfilename of the artifact that will be generated. For a library, this is the\ncrate name that dependencies will use to reference it.\n\nFor the `[lib]` and the default binary (`src/main.rs`), this defaults to the\nname of the package, with any dashes replaced with underscores. For other\n[auto discovered](https://doc.rust-lang.org/cargo/reference/cargo-targets.html#target-auto-discovery) targets, it defaults to the\ndirectory or file name.\n\nThis is required for all targets except `[lib]`.", - "type": "string", - "x-taplo": { - "links": { - "key": "https://doc.rust-lang.org/cargo/reference/cargo-targets.html#the-name-field" - } - } - }, - "path": { - "description": "The `path` field specifies where the source for the crate is located, relative\nto the `Cargo.toml` file.\n\nIf not specified, the [inferred path](https://doc.rust-lang.org/cargo/reference/cargo-targets.html#target-auto-discovery) is used based on\nthe target name.", - "type": "string", - "x-taplo": { - "links": { - "key": "https://doc.rust-lang.org/cargo/reference/cargo-targets.html#the-path-field" - } - } - }, - "plugin": { - "type": "boolean", - "x-taplo": { - "hidden": true - } - }, - "proc-macro": { - "description": "The `proc-macro` field indicates that the library is a [procedural macro](https://doc.rust-lang.org/book/ch19-06-macros.html)\n([reference](https://doc.rust-lang.org/reference/procedural-macros.html)). This is only valid for the `[lib]`\ntarget.", - "type": "boolean", - "x-taplo": { - "links": { - "key": "https://doc.rust-lang.org/cargo/reference/cargo-targets.html#the-proc-macro-field" - } - } - }, - "proc_macro": { - "type": "boolean", - "x-taplo": { - "hidden": true - } - }, - "required-features": { - "description": "The `required-features` field specifies which [features](https://doc.rust-lang.org/cargo/reference/features.html) the target needs in\norder to be built. If any of the required features are not enabled, the\ntarget will be skipped. This is only relevant for the `[[bin]]`, `[[bench]]`,\n`[[test]]`, and `[[example]]` sections, it has no effect on `[lib]`.\n\n```toml\n[features]\n# ...\npostgres = []\nsqlite = []\ntools = []\n\n[[bin]]\nname = \"my-pg-tool\"\nrequired-features = [\"postgres\", \"tools\"]\n```\n", - "type": "array", - "items": { - "description": "The `required-features` field specifies which [features](https://doc.rust-lang.org/cargo/reference/features.html) the target needs in\norder to be built. If any of the required features are not enabled, the\ntarget will be skipped. This is only relevant for the `[[bin]]`, `[[bench]]`,\n`[[test]]`, and `[[example]]` sections, it has no effect on `[lib]`.\n\n```toml\n[features]\n# ...\npostgres = []\nsqlite = []\ntools = []\n\n[[bin]]\nname = \"my-pg-tool\"\nrequired-features = [\"postgres\", \"tools\"]\n```\n", - "type": "string", - "x-taplo": { - "links": { - "key": "https://doc.rust-lang.org/cargo/reference/cargo-targets.html#the-required-features-field" - } - } - }, - "x-taplo": { - "links": { - "key": "https://doc.rust-lang.org/cargo/reference/cargo-targets.html#the-required-features-field" - } - } - }, - "test": { - "description": "The `test` field indicates whether or not the target is tested by default by\n[`cargo test`](https://doc.rust-lang.org/cargo/commands/cargo-test.html). The default is `true` for lib, bins, and tests.\n\n> **Note**: Examples are built by [`cargo test`](https://doc.rust-lang.org/cargo/commands/cargo-test.html) by default to ensure they\n> continue to compile, but they are not *tested* by default. Setting `test =\n> true` for an example will also build it as a test and run any\n> [`#[test]`](https://doc.rust-lang.org/reference/attributes/testing.html#the-test-attribute) functions defined in the example.", - "type": "boolean", - "x-taplo": { - "links": { - "key": "https://doc.rust-lang.org/cargo/reference/cargo-targets.html#the-test-field" - } - } - } - } - }, - "Workspace": { - "title": "Workspace", - "description": "The `[workspace]` table in `Cargo.toml` defines which packages are members of\nthe workspace:\n\n```toml\n[workspace]\nmembers = [\"member1\", \"path/to/member2\", \"crates/*\"]\nexclude = [\"crates/foo\", \"path/to/other\"]\n```\n\nAn empty `[workspace]` table can be used with a `[package]` to conveniently\ncreate a workspace with the package and all of its path dependencies.\n\nAll [`path` dependencies](https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#specifying-path-dependencies) residing in the workspace directory automatically\nbecome members. Additional members can be listed with the `members` key, which\nshould be an array of strings containing directories with `Cargo.toml` files.\n\nThe `members` list also supports [globs](https://docs.rs/glob/0.3.0/glob/struct.Pattern.html) to match multiple paths, using\ntypical filename glob patterns like `*` and `?`.\n\nThe `exclude` key can be used to prevent paths from being included in a\nworkspace. This can be useful if some path dependencies aren't desired to be\nin the workspace at all, or using a glob pattern and you want to remove a\ndirectory.\n\nAn empty `[workspace]` table can be used with a `[package]` to conveniently\ncreate a workspace with the package and all of its path dependencies.", - "type": "object", - "properties": { - "default-members": { - "description": "The optional `default-members` key can be specified to set the members to\noperate on when in the workspace root and the package selection flags are not\nused:\n\n```toml\n[workspace]\nmembers = [\"path/to/member1\", \"path/to/member2\", \"path/to/member3/*\"]\ndefault-members = [\"path/to/member2\", \"path/to/member3/foo\"]\n```\n\nWhen specified, `default-members` must expand to a subset of `members`.", - "type": "array", - "items": { - "description": "The optional `default-members` key can be specified to set the members to\noperate on when in the workspace root and the package selection flags are not\nused:\n\n```toml\n[workspace]\nmembers = [\"path/to/member1\", \"path/to/member2\", \"path/to/member3/*\"]\ndefault-members = [\"path/to/member2\", \"path/to/member3/foo\"]\n```\n\nWhen specified, `default-members` must expand to a subset of `members`.", - "type": "string", - "x-taplo": { - "links": { - "key": "https://doc.rust-lang.org/cargo/reference/workspaces.html#the-workspace-section" - } - } - }, - "x-taplo": { - "links": { - "key": "https://doc.rust-lang.org/cargo/reference/workspaces.html#the-workspace-section" - } - } - }, - "exclude": { - "description": "The `exclude` key can be used to prevent paths from being included in a\nworkspace. This can be useful if some path dependencies aren't desired to be\nin the workspace at all, or using a glob pattern and you want to remove a\ndirectory.", - "type": "array", - "items": { - "description": "The `exclude` key can be used to prevent paths from being included in a\nworkspace. This can be useful if some path dependencies aren't desired to be\nin the workspace at all, or using a glob pattern and you want to remove a\ndirectory.", - "type": "string", - "x-taplo": { - "links": { - "key": "https://doc.rust-lang.org/cargo/reference/workspaces.html#the-workspace-section" - } - } - }, - "x-taplo": { - "links": { - "key": "https://doc.rust-lang.org/cargo/reference/workspaces.html#the-workspace-section" - } - } - }, - "members": { - "description": "All [`path` dependencies] residing in the workspace directory automatically\nbecome members. Additional members can be listed with the `members` key, which\nshould be an array of strings containing directories with `Cargo.toml` files.\n\nThe `members` list also supports [globs] to match multiple paths, using\ntypical filename glob patterns like `*` and `?`.", - "type": "array", - "items": { - "description": "All [`path` dependencies] residing in the workspace directory automatically\nbecome members. Additional members can be listed with the `members` key, which\nshould be an array of strings containing directories with `Cargo.toml` files.\n\nThe `members` list also supports [globs] to match multiple paths, using\ntypical filename glob patterns like `*` and `?`.", - "type": "string", - "x-taplo": { - "links": { - "key": "https://doc.rust-lang.org/cargo/reference/workspaces.html#the-workspace-section" - } - } - }, - "x-taplo": { - "links": { - "key": "https://doc.rust-lang.org/cargo/reference/workspaces.html#the-workspace-section" - } - } - }, - "metadata": { - "description": "The `workspace.metadata` table is ignored by Cargo and will not be warned\nabout. This section can be used for tools that would like to store workspace\nconfiguration in `Cargo.toml`. For example:\n\n```toml\n[workspace]\nmembers = [\"member1\", \"member2\"]\n\n[workspace.metadata.webcontents]\nroot = \"path/to/webproject\"\ntool = [\"npm\", \"run\", \"build\"]\n# ...\n```\n\nThere is a similar set of tables at the package level at\n`package.metadata`. While cargo does not specify a\nformat for the content of either of these tables, it is suggested that\nexternal tools may wish to use them in a consistent fashion, such as referring\nto the data in `workspace.metadata` if data is missing from `package.metadata`,\nif that makes sense for the tool in question.\n", - "type": "object", - "additionalProperties": true, - "x-taplo": { - "links": { - "key": "https://doc.rust-lang.org/cargo/reference/workspaces.html#the-workspace-section" - } - } - }, - "resolver": { - "$ref": "#/definitions/Resolver" - } - }, - "x-taplo": { - "links": { - "key": "https://doc.rust-lang.org/cargo/reference/workspaces.html" - } - } - } - } -} diff --git a/site/site/public/schemas/dein.toml.json b/site/site/public/schemas/dein.toml.json deleted file mode 100644 index 40326276c..000000000 --- a/site/site/public/schemas/dein.toml.json +++ /dev/null @@ -1,625 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "dein.vim", - "type": "object", - "description": "A schema for config of dein.vim (https://github.com/Shougo/dein.vim/blob/f93be8c/doc/dein.txt#L963)", - "x-taplo-info": { - "authors": [ - "kkiyama117 (https://github.com/kkiyama117)", - "raa0121 (https://github.com/raa0121)", - "Hibiki (https://github.com/4513ECHO)" - ], - "version": "0.1.0", - "patterns": [ - "^(.*(/|\\\\)\\.*dein.*\\.toml|\\.*dein.*\\.toml)$" - ] - }, - "required": [ - "plugins" - ], - "additionalProperties": false, - "properties": { - "plugins": { - "title": "Definition properties table for installing a vim plugin", - "description": "Definition properties table for installing a vim plugin.\nIt is converted to |dein#add()|.", - "type": "array", - "uniqueness": true, - "additionalItems": false, - "items": { - "$ref": "#/definitions/Plugin" - }, - "x-taplo": { - "links": { - "key": "https://github.com/Shougo/dein.vim/blob/f93be8c/doc/dein.txt#L1068" - } - } - }, - "ftplugin": { - "title": "ftplugin definition", - "description": "'_' key is executed after all ftplugin.\n'{filetype}' key is executed {filetype} ftplugin.\n You can define multiple filetypes by '{filetype1}_{filetype2}' key.", - "type": "object", - "additionalProperties": false, - "properties": { - "_": { - "title": "all filetypes", - "description": "'_' key is executed after all ftplugin.", - "type": "string", - "x-taplo": { - "links": { - "key": "https://github.com/Shougo/dein.vim/blob/f93be8c/doc/dein.txt#L1056" - } - } - } - }, - "patternProperties": { - "^[0-9a-zA-Z].+$": { - "title": "filetype", - "description": "'{filetype}' key is executed {filetype} ftplugin.\nYou can define multiple filetypes by '{filetype1}_{filetype2}' key.\n'b:undo_ftplugin' is defined automatically.", - "type": "string" - } - }, - "x-taplo": { - "links": { - "key": "https://github.com/Shougo/dein.vim/blob/f93be8c/doc/dein.txt#L1054" - } - } - }, - "hook_add": { - "title": "hook_add definition", - "description": "It is the global |dein-options-hook_add|.\nIt is executed in |dein#end()|.", - "type": "string", - "x-taplo": { - "links": { - "key": "https://github.com/Shougo/dein.vim/blob/f93be8c/doc/dein.txt#L1063" - } - } - }, - "multiple_plugins": { - "title": "It is converted to |dein-toml-hook_add|", - "description": "It is converted to |dein-toml-hook_add|\n\"plugins\" key is needed.", - "type": "array", - "uniqueness": true, - "additionalItems": false, - "items": { - "$ref": "#/definitions/MultiplePlugin" - }, - "x-taplo": { - "links": { - "key": "https://github.com/Shougo/dein.vim/blob/f93be8c/doc/dein.txt#L1073" - } - } - } - }, - "definitions": { - "Plugin": { - "title": "Pattern for a definition of vim plugin", - "type": "object", - "required": [ - "repo" - ], - "additionalProperties": false, - "properties": { - "repo": { - "title": "repository. ", - "description": "The repository URI or local repository directory path.", - "oneOf": [ - { - "$ref": "#/definitions/Url" - }, - { - "$ref": "#/definitions/Path" - }, - { - "$ref": "#/definitions/repo-string-pattern" - } - ], - "x-taplo": { - "links": { - "key": "https://github.com/Shougo/dein.vim/blob/f93be8c/doc/dein.txt#L118" - } - } - }, - "augroup": { - "description": "An augroup name that the plugin uses for |VimEnter| or |GUIEnter| autocmd events.", - "type": "string", - "x-taplo": { - "links": { - "key": "https://github.com/Shougo/dein.vim/blob/f93be8c/doc/dein.txt#L694" - } - } - }, - "build": { - "description": "Specify the build script. This command is executed by |system()| in the plugin runtimepath. Note: In previous versions of dein, build could also be of type dictionary, but that is now deprecated. Please use |dein-options-hook_post_update| instead.", - "type": "string", - "x-taplo": { - "links": { - "key": "https://github.com/Shougo/dein.vim/blob/f93be8c/doc/dein.txt#L699" - } - } - }, - "depends": { - "description": "Specify a list of plugins a plugin depends on. List items are '{plugin-name}'. Those specified in the list are NOT installed automatically. Note: The loading order is not guaranteed in non lazy plugins.", - "$ref": "#/definitions/ArrayOrString", - "x-taplo": { - "links": { - "key": "https://github.com/Shougo/dein.vim/blob/f93be8c/doc/dein.txt#L719" - } - } - }, - "frozen": { - "description": "If set to v:true, dein doesn't update it automatically. It is useful for outdated plugins that can no longer be updated.", - "$ref": "#/definitions/Boolean", - "x-taplo": { - "links": { - "key": "https://github.com/Shougo/dein.vim/blob/f93be8c/doc/dein.txt#L726" - } - } - }, - "ftplugin": { - "description": "'_' key is executed after all ftplugin. '{filetype}' key is executed {filetype} ftplugin.", - "type": "object", - "additionalProperties": false, - "properties": { - "_": { - "title": "all filetypes", - "description": "'_' key is executed after all ftplugin.", - "type": "string", - "x-taplo": { - "links": { - "key": "https://github.com/Shougo/dein.vim/blob/f93be8c/doc/dein.txt#L733" - } - } - } - }, - "patternProperties": { - "^[0-9a-zA-Z].+$": { - "title": "filetype", - "description": "'{filetype}' key is executed {filetype} ftplugin.\nYou can define multiple filetypes by '{filetype1}_{filetype2}' key.\n'b:undo_ftplugin' is defined automatically.", - "type": "string" - } - }, - "x-taplo": { - "links": { - "key": "https://github.com/Shougo/dein.vim/blob/f93be8c/doc/dein.txt#L731" - } - } - }, - "if": { - "description": "If set to v:false, dein doesn't register the plugin, i.e. the plugin will be disabled. If it is String, dein will eval it. If you don't set it, dein will register (enable) the plugin", - "type": [ - "boolean", - "integer", - "string" - ], - "x-taplo": { - "links": { - "key": "https://github.com/Shougo/dein.vim/blob/f93be8c/doc/dein.txt#L738" - } - } - }, - "lazy": { - "description": "If set to v:true, dein doesn't add the path to 'runtimepath' automatically. If you don't set it, dein will set it automatically when the conditions are met. Note: You should not specify the plugins which have no 'plugin/' directory as lazy load plugins. It is meaningless and just increases the overhead. You can get the no meaning lazy plugins by |dein#check_lazy_plugins()|.", - "type": [ - "boolean", - "integer" - ], - "x-taplo": { - "links": { - "key": "https://github.com/Shougo/dein.vim/blob/f93be8c/doc/dein.txt#L746" - } - } - }, - "merged": { - "description": "If set to v:false, dein doesn't merge the plugin directory. It is useful for the plugin files conflicts.", - "$ref": "#/definitions/Boolean", - "x-taplo": { - "links": { - "key": "https://github.com/Shougo/dein.vim/blob/f93be8c/doc/dein.txt#L757" - } - } - }, - "merge_ftdetect": { - "description": "If set to v:true, dein merge the plugin \"ftdetect\" directory. It is useful to enable file detection when lazy loaded plugin. Note: It does not work if ftdetect script depends on lazy plugin functions.", - "$ref": "#/definitions/Boolean", - "x-taplo": { - "links": { - "key": "https://github.com/Shougo/dein.vim/blob/f93be8c/doc/dein.txt#L764" - } - } - }, - "name": { - "description": "Specify the name of the plugin. This is used for dein management and other functions. If it is omitted, the tail of the repository name will be used. Note: Must be unique across the all plugin. If the plugin name conflicts with another plugin, dein will overwrite the previous settings with the new one. If the repo tail is bound to conflict, you can set the 'name' option manually to prevent overwriting an existing plugin setting.", - "type": "string", - "x-taplo": { - "links": { - "key": "https://github.com/Shougo/dein.vim/blob/f93be8c/doc/dein.txt#L771" - } - } - }, - "normalized_name": { - "description": "Specify the normalized name of the plugin. If omitted, dein will normalize the tail of the repository name. Note: Must be unique across all plugins.", - "type": "string", - "x-taplo": { - "links": { - "key": "https://github.com/Shougo/dein.vim/blob/f93be8c/doc/dein.txt#L782" - } - } - }, - "on_cmd": { - "description": "If it is matched to the executed command, dein will call |dein#source()|.", - "$ref": "#/definitions/ArrayOrString", - "x-taplo": { - "links": { - "key": "https://github.com/Shougo/dein.vim/blob/f93be8c/doc/dein.txt#L796" - } - } - }, - "on_event": { - "description": "dein will call |dein#source()| on the events.", - "$ref": "#/definitions/ArrayOrString", - "x-taplo": { - "links": { - "key": "https://github.com/Shougo/dein.vim/blob/f93be8c/doc/dein.txt#L801" - } - } - }, - "on_func": { - "description": "If it is matched to the called function, dein will call |dein#source()|.", - "$ref": "#/definitions/ArrayOrString", - "x-taplo": { - "links": { - "key": "https://github.com/Shougo/dein.vim/blob/f93be8c/doc/dein.txt#L805" - } - } - }, - "on_ft": { - "description": "If it is matched to 'filetype', dein will call |dein#source()|.", - "$ref": "#/definitions/ArrayOrString", - "x-taplo": { - "links": { - "key": "https://github.com/Shougo/dein.vim/blob/f93be8c/doc/dein.txt#L811" - } - } - }, - "on_if": { - "description": "If it is evaluated and it is non-zero, dein will call|dein#source()|.The default evaluate timings are 'BufRead', 'BufNewFile','VimEnter' and 'FileType'.If |dein-options-on_event| exists, it is evaluated when|dein-options-on_event|.", - "type": "string", - "x-taplo": { - "links": { - "key": "https://github.com/Shougo/dein.vim/blob/f93be8c/doc/dein.txt#L816" - } - } - }, - "on_lua": { - "description": "If it is matched to the required lua module root, dein will call |dein#source()|. Note: It is for neovim only. Note: It does not work for neovim standard modules.", - "$ref": "#/definitions/ArrayOrString", - "x-taplo": { - "links": { - "key": "https://github.com/Shougo/dein.vim/blob/f93be8c/doc/dein.txt#L829" - } - } - }, - "on_map": { - "description": "If it is the Dictionary, the key is {mode} and the items are{mapping} or [{mapping1}, {mapping2}, ...].If it is the List, the items are {mapping} or [{mode},{mapping1}, [{mapping2}, ...]].If {mode} is omitted, 'nx' is used.", - "oneOf": [ - { - "$ref": "#/definitions/on_map-dict" - }, - { - "$ref": "#/definitions/on_map-array" - }, - { - "$ref": "#/definitions/on_map-string" - } - ], - "x-taplo": { - "links": { - "key": "https://github.com/Shougo/dein.vim/blob/f93be8c/doc/dein.txt#L836" - } - } - }, - "on_path": { - "description": "If set to '.*', dein will call |dein#source()| on editing allfiles. Otherwise, dein will call |dein#source()| if thebuffer name is matched to the string pattern.Note: It is useful for explorer behavior plugins.", - "$ref": "#/definitions/ArrayOrString", - "x-taplo": { - "links": { - "key": "https://github.com/Shougo/dein.vim/blob/f93be8c/doc/dein.txt#L874" - } - } - }, - "on_source": { - "description": "If set to '.*', dein will call |dein#source()| on editing allfiles. Otherwise, dein will call |dein#source()| if thebuffer name is matched to the string pattern.Note: It is useful for explorer behavior plugins. ", - "$ref": "#/definitions/ArrayOrString", - "x-taplo": { - "links": { - "key": "https://github.com/Shougo/dein.vim/blob/f93be8c/doc/dein.txt#L881" - } - } - }, - "overwrite": { - "description": "If set to v:true, dein overwrite existing plugin config when |dein#add()|.", - "$ref": "#/definitions/Boolean", - "x-taplo": { - "links": { - "key": "https://github.com/Shougo/dein.vim/blob/f93be8c/doc/dein.txt#L886" - } - } - }, - "path": { - "description": "Specify the plugin downloaded path.", - "type": "string", - "x-taplo": { - "links": { - "key": "https://github.com/Shougo/dein.vim/blob/f93be8c/doc/dein.txt#L891" - } - } - }, - "rev": { - "description": "Specify a revision number or branch/tag name. If it is '*' in 'git' type, dein will use latest released tag.You can specify the wildcards like '0.*'.Note: If the type is 'raw', rev must be hash number.", - "type": "string", - "x-taplo": { - "links": { - "key": "https://github.com/Shougo/dein.vim/blob/f93be8c/doc/dein.txt#L895" - } - } - }, - "rtp": { - "description": "Specify the runtime path. You can use it when the repository has the Vim plugin in a subdirectory.For example: https://github.com/rstacruz/sparkup If it is empty string, dein will not add the path to'runtimepath'", - "type": "string", - "default": "vim", - "x-taplo": { - "links": { - "key": "https://github.com/Shougo/dein.vim/blob/f93be8c/doc/dein.txt#L906" - } - } - }, - "script_type": { - "description": "Specify the script type. It is useful for non-official categorized plugins. For example: 'indent', 'plugin', 'ftplugin', ... Note: You must not specify it for categorized plugins.", - "type": "string", - "enum": [ - "indent", - "plugin", - "colors", - "ftplugin" - ], - "x-taplo": { - "links": { - "key": "https://github.com/Shougo/dein.vim/blob/f93be8c/doc/dein.txt#L919" - } - } - }, - "timeout": { - "description": "The time of timeout seconds when updating/installing plugins. If omit it, |g:dein#install_process_timeout| will be used.", - "type": "integer", - "x-taplo": { - "links": { - "key": "https://github.com/Shougo/dein.vim/blob/f93be8c/doc/dein.txt#L935" - } - } - }, - "trusted": { - "description": "If set to v:true, dein will load the plugin in 'sudo' mode. If you don't set it, dein won't load it.", - "$ref": "#/definitions/Boolean", - "x-taplo": { - "links": { - "key": "https://github.com/Shougo/dein.vim/blob/f93be8c/doc/dein.txt#L940" - } - } - }, - "type": { - "description": "Specify the repository type. If it is omitted, a guess is made based on {repository}.", - "type": "string", - "enum": [ - "none", - "raw", - "git" - ], - "x-taplo": { - "docs": { - "enumValues": [ - "None repository", - "Raw plugin file ('script_type' attribute is needed)", - "git" - ] - }, - "links": { - "key": "https://github.com/Shougo/dein.vim/blob/f93be8c/doc/dein.txt#L945", - "enumValues": [ - "https://github.com/Shougo/dein.vim/blob/f93be8c/doc/dein.txt#L951", - "https://github.com/Shougo/dein.vim/blob/f93be8c/doc/dein.txt#L952", - "https://github.com/Shougo/dein.vim/blob/f93be8c/doc/dein.txt#L954" - ] - } - } - }, - "type__depth": { - "description": "The history depth for 'git clone'.\n If omitted, |g:dein#types#git#clone_depth| is used. If it is than 0, dein clones the repository by shallow clone. Shallow clone feature saves your repository clone time. But it has problems in some repository.\n Note: This attribute is available in git type only.\n\n https://github.com/Shougo/neobundle.vim/issues/81 https://github.com/Homebrew/homebrew/issues/12024", - "type": "integer", - "x-taplo": { - "links": { - "key": "https://github.com/Shougo/dein.vim/blob/f93be8c/doc/dein.txt#L956" - } - } - }, - "hook_add": { - "description": "It is executed after the line is parsed. Note: You cannot call plugin function in 'hook_add'. Because the plugin is not sourced when 'hook_add'.", - "type": "string", - "x-taplo": { - "links": { - "key": "https://github.com/Shougo/dein.vim/blob/f93be8c/doc/dein.txt#L981" - } - } - }, - "hook_done_update": { - "description": "It is executed after the all plugins are updated.", - "type": "string", - "x-taplo": { - "links": { - "key": "https://github.com/Shougo/dein.vim/blob/f93be8c/doc/dein.txt#L1002" - } - } - }, - "hook_post_source": { - "description": "It is executed after plugins are sourced. Note: In Vim initializing, you must call the 'hook_post_source' hooks manually in |VimEnter| if needed. ", - "type": "string", - "x-taplo": { - "links": { - "key": "https://github.com/Shougo/dein.vim/blob/f93be8c/doc/dein.txt#L1006" - } - } - }, - "hook_post_update": { - "description": "It is executed after the plugins are updated.", - "type": "string", - "x-taplo": { - "links": { - "key": "https://github.com/Shougo/dein.vim/blob/f93be8c/doc/dein.txt#L1015" - } - } - }, - "hook_source": { - "description": "It is executed before plugins are sourced. Note: The 'sourced' means after |dein#end()| or when |VimEnter| or autoloaded. 'type': 'string',", - "type": "string", - "x-taplo": { - "links": { - "key": "https://github.com/Shougo/dein.vim/blob/f93be8c/doc/dein.txt#L1021" - } - } - } - }, - "x-taplo": { - "links": { - "key": "https://github.com/Shougo/dein.vim/blob/f93be8c/doc/dein.txt#L115" - }, - "initKeys": [ - "repo" - ] - } - }, - "MultiplePlugins": { - "title": "Pattern for multiple definition of vim plugin", - "type": "object", - "required": [ - "plugins" - ], - "additionalProperties": false, - "properties": { - "plugins": { - "title": "plugins", - "description": "The repository URI or local repository directory path.", - "items": { - "$ref": "#/definitions/repo-string-pattern" - }, - "x-taplo": { - "links": { - "key": "https://github.com/Shougo/dein.vim/blob/f93be8c/doc/dein.txt#L1073" - } - } - } - } - }, - "Url": { - "title": "path", - "type": "string", - "pattern": "^https?:\\/\\/(www\\.)?[-a-zA-Z0-9@:%._\\+~#=]{1,256}\\.[a-zA-Z0-9()]{1,6}\\b([-a-zA-Z0-9()@:%_\\+.~#?&//=]*)$" - }, - "repo-string-pattern": { - "title": "repo name pattern", - "description": "If {repo} starts with github user name (ex:'Shougo/dein.vim'), dein will install github plugins.", - "type": "string", - "pattern": "^[a-zA-Z-_0-9]+/[a-zA-Z-_0-9\\.]+$" - }, - "Path": { - "title": "path", - "type": "string", - "pattern": "^[~|/][a-zA-Z-_0-9/\\.~]+$" - }, - "vim-mode-key-pattern-string": { - "type": "string", - "pattern": "^[nvxsomilct]+$" - }, - "vim-mode-key-mapping-string": { - "type": "string" - }, - "on_map-string": { - "type": "string", - "oneOf": [ - { - "$ref": "#/definitions/vim-mode-key-pattern-string" - }, - { - "$ref": "#/definitions/vim-mode-key-mapping-string" - } - ] - }, - "on_map-array1": { - "type": "array", - "additionalItems": false, - "items": { - "$ref": "#/definitions/on_map-string" - } - }, - "on_map-array2": { - "type": "array", - "additionalItems": false, - "items": { - "$ref": "#/definitions/vim-mode-key-mapping-string" - } - }, - "on_map-array": { - "oneOf": [ - { - "$ref": "#/definitions/on_map-array1" - }, - { - "$ref": "#/definitions/on_map-array2" - } - ] - }, - "on_map-dict": { - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^[nvxsomilct]+$": { - "description": "Pattern for vim key binding. You can use plugin prefix mappings. You can use '' keyword as {mapping}. If{mapping} is '', '(normalized_name' isused. linter support is now under developping", - "oneOf": [ - { - "$ref": "#/definitions/vim-mode-key-mapping-string" - }, - { - "$ref": "#/definitions/on_map-array2" - } - ] - } - } - }, - "ArrayOrString": { - "oneOf": [ - { - "additionalItems": false, - "items": { - "type": "string" - }, - "type": "array" - }, - { - "type": "string" - } - ] - }, - "Boolean": { - "oneOf": [ - { - "type": "boolean" - }, - { - "enum": [ - 0, - 1 - ], - "type": "number" - } - ] - } - } -} diff --git a/site/site/public/schemas/fly.toml.json b/site/site/public/schemas/fly.toml.json deleted file mode 100644 index 09433fe9d..000000000 --- a/site/site/public/schemas/fly.toml.json +++ /dev/null @@ -1,357 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema", - "title": "Fly.io config schema (fly.toml)", - "description": "https://fly.io/docs/reference/configuration", - "x-taplo-info": { - "authors": ["Joshua Sierles (https://github.com/jsierles)"], - "patterns": ["\\.*fly(.*)?\\.toml?$"] - }, - "type": "object", - "properties": { - "app": { - "description": "Fly.io application name", - "type": "string" - }, - "kill_timeout": { - "description": "Seconds to wait before forcing a VM process to exit. Default is 5 seconds.", - "type": "integer" - }, - "kill_signal": { - "description": "Signal to send to a process to shut it down gracefully. Default is SIGINT.", - "type": "string", - "enum": [ - "SIGINT", - "SIGTERM", - "SIGQUIT", - "SIGUSR1", - "SIGUSR2", - "SIGKILL", - "SIGSTOP" - ] - }, - "statics": { - "description": "The `statics` sections expose static assets built into your application's container to Fly's Anycast network. You can serve HTML files, Javascript, and images without needing to run a web server inside your container.", - "required": ["guest_path", "url_prefix"], - "additionalProperties": false, - "x-taplo": { - "links": { - "key": "https://fly.io/docs/reference/configuration/#the-statics-sections" - } - }, - "type": ["object", "array"], - "items": { - "type": "object", - "properties": { - "guest_path": { - "description": "The path inside your container where the assets to serve are located.", - "type": "string" - }, - "url_prefix": { - "description": "The URL prefix that should serve the static assets.", - "type": "string" - } - } - } - }, - - "services": { - "description": "Configure the mapping of ports from the public Fly proxy to your application.\n\nYou can have:\n* **No services section**: The application has no mappings to the external internet - typically apps like databases or background job workers that talk over 6PN private networking to other apps.\n* **One services section**: One internal port mapped to one external port on the internet.\n* **Multiple services sections**: Map multiple internal ports to multiple external ports.", - "type": "array", - "required": ["port", "internal_port"], - "additionalProperties": false, - "items": { - "type": ["object", "array"], - "properties": { - "script_checks": { - "deprecated": true, - "description": "Health checks that run as one-off commands directly on the VM.\n\nThis type of check is **deprecated**. See `tcp_checks` or `http_checks` for alternatives." - }, - "protocol": { - "description": "The protocol used to communicate with your application. Can be: `tcp` or `udp`.", - "type": "string", - "enum": ["tcp", "udp"] - }, - "internal_port": { - "description": "The port this application listens on to communicate with clients. The default is 8080. We recommend applications use the default.", - "type": "integer", - "default": 8080 - }, - "concurrency": { - "type": "object", - "description": "Control autoscaling metrics (connections or requests) and limits (hard and soft).", - "properties": { - "type": { - "type": "string", - "default": "connections", - "x-taplo": { - "docs": { - "enumValues": [ - "Autoscale based on number of concurrent connections", - "Autoscale based on number of concurrent requests" - ] - } - }, - "enum": ["connections", "requests"] - }, - "hard_limit": { - "default": 25, - "type": "integer", - "description": "When an application instance is __at__ or __over__ this number, the system will bring up another instance." - }, - "soft_limit": { - "default": 20, - "type": "integer", - "description": "When an application instance is __at__ or __over__ this number, the system is likely to bring up another instance." - } - } - }, - "ports": { - "description": "For each external port you want to accept connections on, add a `ports` section.", - "type": "array", - "items": { - "type": "object", - "properties": { - "handlers": { - "x-taplo": { - "links": { - "key": "https://fly.io/docs/reference/services/#connection-handlers" - } - }, - "description": "An array of strings that select handlers to terminate the connection at the edge.\n\nValid options: http, tls, proxy_proto.", - "type": "array", - "items": { - "type": "string", - "minLength": 1, - "enum": ["http", "tls", "proxy_proto"] - } - }, - "port": { - "default": 8080, - "type": "integer", - "description": "The port to accept traffic on. Valid ports: 1-65535" - }, - "force_https": { - "type": "boolean", - "description": "Force HTTP connections to HTTPS. `force_https` requires the `http` handler in the `handlers` section." - } - } - } - }, - "tcp_checks": { - "description": "Basic TCP connection health checks. This is the default check that runs against the configured `internal_port`.", - "type": "array", - "x-taplo": { - "links": { - "key": "https://fly.io/docs/reference/configuration/#services-tcp_checks" - } - }, - "items": { - "type": "object", - "properties": { - "grace_period": { - "description": "The time to wait after a VM starts before checking its health. Units are milliseconds unless you specify them like `10s` or `1m`.", - "type": "string" - }, - "interval": { - "description": "Length of the pause between connectivity checks. Units are milliseconds unless you specify them like `10s` or `1m`.", - "type": "string" - }, - "restart_limit": { - "default": 0, - "description": "The number of consecutive TCP check failures to allow before attempting to restart the VM. The default is `0`, which disables restarts based on failed TCP health checks.", - "type": "integer" - }, - "timeout": { - "description": "The maximum time a connection can take before being reported as failing its healthcheck. Units are milliseconds unless you specify them like `10s` or `1m`.", - "type": "string" - } - } - } - }, - "http_checks": { - "description": "HTTP-based health checks run against the `internal_port`. These checks will pass when receiving a 2xx response. Any other response is considered a failure.", - "type": "array", - "x-taplo": { - "links": { - "key": "https://fly.io/docs/reference/configuration/#services-http_checks" - } - }, - "items": { - "type": "object", - "properties": { - "grace_period": { - "description": "The time to wait after a VM starts before checking its health. Units are milliseconds unless you specify them like `10s` or `1m`.", - "type": "string" - }, - "interval": { - "description": "Length of the pause between connectivity checks. Units are milliseconds unless you specify them like `10s` or `1m`.", - "type": "string" - }, - "restart_limit": { - "default": 0, - "description": "The number of consecutive check failures to allow before attempting to restart the VM. The default is `0`, which disables restarts based on failed health checks.", - "type": "integer" - }, - "timeout": { - "description": "The maximum time a connection can take before being reported as failing its healthcheck. Units are milliseconds unless you specify them like `10s` or `1m`.", - "type": "string" - }, - "method": { - "description": "The HTTP method to be used for the check.", - "type": "string" - }, - "path": { - "description": "The path of the URL to be requested.", - "type": "string" - }, - "protocol": { - "description": "The protocol to be used (`http` or `https`)", - "type": "string", - "enum": ["http", "https"] - }, - "tls_skip_verify": { - "type": "boolean", - "default": false, - "description": "When set to `true` (and `protocol` is set to `https`), skip verifying the certificates sent by the server." - }, - "headers": { - "type": "object", - "description": "Set key/value pairs of HTTP headers to pass along with the check request." - } - } - } - } - } - } - }, - "deploy": { - "type": "object", - "additionalProperties": false, - "properties": { - "release_command": { - "x-taplo": { - "links": { - "key": "https://fly.io/docs/reference/configuration/#release_command" - }, - "initKeys": ["importantKey"] - }, - "description": "Command to run after a build, with access to the production environment, but before deployment. Non-zero exit status will abort the deployment.\n\n```toml\n[deploy]\n release_command =\"bundle exec rails db:migrate\"\n```", - "type": "string" - }, - "strategy": { - "description": "Strategy for replacing VMs during a deployment.", - "type": "string", - "default": "canary", - "enum": ["canary", "rolling", "bluegreen", "immediate"], - "x-taplo": { - "docs": { - "main": "Strategy for replacing VMs during a deployment.", - "enumValues": [ - "This default strategy - for apps without volumes - will boot a single, new VM with the new release, verify its health, then proceed with a rolling restart strategy.", - "One by one, each running VM is taken down and replaced by a new release VM. This is the default strategy for apps with volumes.", - "For every running VM, a new one is booted alongside it. All new VMs must pass health checks to complete deployment, when traffic gets migrated to new VMs. If your app has multiple VMs, this strategy may reduce deploy time and downtime, assuming your app is scaled to 2 or more VMs.", - "Replace all VMs with new releases immediately without waiting for health checks to pass. This is useful in emergency situations where you're confident a release will be healthy." - ], - "defaultValue": "Default is 'canary': boot a single, new VM with the new release, verify its health, then proceed with a rolling restart strategy." - }, - "links": { - "key": "https://fly.io/docs/reference/configuration/#strategy" - } - } - } - } - }, - "mounts": { - "type": "object", - "x-taplo": { - "links": { - "key": "https://fly.io/docs/reference/configuration/#the-mounts-section" - } - }, - "description": "Mount [persistent storage volumes](https://fly.io/docs/reference/volumes) previously setup via `flyctl`. Both settings are required. Example:\n\n```toml\n[mounts]\n source = \"myapp_data\"\n destination = \"/data\"\n```", - "required": ["source", "destination"], - "additionalProperties": false, - "properties": { - "source": { - "description": "The name of the volume to mount as shown in `fly volumes list`.\n\nA volume of this name *must exist* in each of the app regions. If there's more than one volume in the target region with the same one, one will be picked randomly.", - "type": "string" - }, - "destination": { - "description": "The path at which the `source` volume should be mounted in the running app VM.", - "type": "string" - } - } - }, - "experimental": { - "description": "Flags and features that are subject to change, deprecation or promotion to the main configuration.", - "type": "object", - "properties": { - "cmd": { - "description": "Override the server command (CMD) set by the Dockerfile. Specify as an array of strings:\n\n```toml\ncmd = [\"path/to/command\", \"arg1\", \"arg2\"]\n```", - "type": ["array", "string"] - }, - "entrypoint": { - "description": "Override the ENTRYPOINT set by the Dockerfile. Specify as an array of strings:\n\n```toml\nentrypoint = [\"path/to/command\", \"arg1\", \"arg2\"]\n```", - "type": ["array", "string"] - }, - "auto_rollback": { - "description": "Failed deployments should roll back automatically to the previous successfully deployed release. Defaults to `true`", - "type": "boolean" - }, - "private_network": { - "description": "Enables private network access to the Fly organization. Defaults to `true`.", - "default": true, - "type": "boolean" - } - } - }, - "env": { - "description": "Set non-sensitive information as environment variables in the application's [runtime environment](https://fly.io/docs/reference/runtime-environment/).\nFor sensitive information, such as credentials or passwords, use the [secrets command](https://fly.io/docs/reference/secrets). For anything else though, the `env` section provides a simple way to set environment variables. Here's an example:\n```toml\n[env]\n LOG_LEVEL = \"debug\"\n S3_BUCKET = \"my-bucket\"\n```", - "type": "object", - "items": { - "type": "object" - } - }, - "build": { - "description": "Build configuration options. See docs at https://fly.io/docs/reference/builders.", - "type": "object", - "properties": { - "builder": { - "description": "Builder Docker image to be used with the 'buildpacks' option", - "type": "string" - }, - "buildpacks": { - "description": "Buildpacks to be run by the 'builder' Docker image", - "type": "array", - "items": { - "type": "string", - "minLength": 1 - }, - "uniqueItems": true, - "minItems": 1 - }, - "args": { - "description": "Build arguments passed to both Dockerfile and Buildpack builds. These arguments are **not available** on VMs at runtime.\n```toml\n[build.args]\n USER = \"julieta\"\n MODE = \"production\"\n```", - "type": "object", - "items": { - "type": "object" - } - }, - "build-target": { - "description": "Specify the target stage for [multistage Dockerfile builds](https://docs.docker.com/develop/develop-images/multistage-build/).", - "type": "string" - }, - "image": { - "description": "Docker image to be deployed (skips the build process)", - "type": "string" - }, - "dockerfile": { - "description": "Dockerfile used for builds. Defaults to './Dockerfile'", - "type": "string" - }, - "additionalProperties": false - } - }, - "additionalProperties": true - } -} diff --git a/site/site/public/schemas/makefile.toml.json b/site/site/public/schemas/makefile.toml.json deleted file mode 100644 index 8bf95c183..000000000 --- a/site/site/public/schemas/makefile.toml.json +++ /dev/null @@ -1,1522 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://github.com/sagiegurari/cargo-make", - "title": "Makefile.toml", - "description": "A schema for cargo-make makefiles", - "x-taplo-info": { - "authors": [ - "Kathryn Long (https://github.com/starkat99)" - ], - "version": "0.35.0", - "patterns": [ - "^(.*(/|\\\\)Makefile\\.toml|Makefile\\.toml)$" - ] - }, - "type": "object", - "additionalProperties": false, - "properties": { - "extend": { - "title": "Extend External Makefile", - "description": "Extend an external makefile by importing its tasks and properties to this file. Paths are relative to this makefile", - "x-taplo": { - "links": { - "key": "https://sagiegurari.github.io/cargo-make/#usage-workspace-extending-external-makefile" - } - }, - "default": "path/to/Makefile.toml", - "examples": [ - "path/to/Makefile.toml", - { - "path": "path/to/Makefile.toml", - "optional": true - }, - [ - { - "path": "path/to/Makefile.toml", - "optional": true - } - ] - ], - "oneOf": [ - { - "title": "File Path", - "description": "File path to external makefile relative to this file", - "type": "string", - "examples": [ - "path/to/Makefile.toml" - ] - }, - { - "$ref": "#/definitions/extend" - }, - { - "title": "External Makefile List", - "description": "List of external makefiles to extend", - "type": "array", - "items": { - "$ref": "#/definitions/extend" - }, - "uniqueItems": true - } - ] - }, - "config": { - "title": "Config", - "description": "Configuration options for this makefile", - "type": "object", - "x-taplo": { - "links": { - "key": "https://sagiegurari.github.io/cargo-make/api/cli/types/struct.ConfigSection.html" - }, - "initKeys": [ - "min_version" - ] - }, - "additionalProperties": false, - "properties": { - "skip_core_tasks": { - "description": "If true, the default core tasks will not be loaded", - "default": true, - "type": "boolean", - "x-taplo": { - "links": { - "key": "https://sagiegurari.github.io/cargo-make/#usage-predefined-flows-disable" - } - } - }, - "modify_core_tasks": { - "description": "Options to modify all the core tasks", - "type": "object", - "x-taplo": { - "links": { - "key": "https://sagiegurari.github.io/cargo-make/#usage-predefined-flows-modify" - } - }, - "examples": [ - { - "private": true - }, - { - "namespace": "default" - }, - { - "private": true, - "namespace": "default" - } - ], - "additionalProperties": false, - "properties": { - "private": { - "description": "If true, all core tasks will be set to private (default false)", - "default": true, - "type": "boolean" - }, - "namespace": { - "title": "Namespace", - "description": "If set to some value, all core tasks are modified to: `namespace::name`", - "type": "string", - "default": "default" - } - } - }, - "init_task": { - "title": "Task Name", - "description": "Init task name which will be invoked at the start of every run", - "type": "string", - "x-taplo": { - "links": { - "key": "https://sagiegurari.github.io/cargo-make/#usage-init-end-tasks" - } - }, - "default": "init" - }, - "end_task": { - "title": "Task Name", - "description": "End task name which will be invoked at the end of every run", - "default": "end", - "type": "string", - "x-taplo": { - "links": { - "key": "https://sagiegurari.github.io/cargo-make/#usage-init-end-tasks" - } - } - }, - "on_error_task": { - "title": "Task Name", - "description": "The name of the task to run in case of any error during the invocation of the flow", - "type": "string", - "x-taplo": { - "links": { - "key": "https://sagiegurari.github.io/cargo-make/#usage-catching-errors" - } - }, - "default": "catch" - }, - "legacy_migration_task": { - "title": "Task Name", - "description": "The name of the task which runs legacy migration flows", - "default": "legacy-migration", - "type": "string", - "x-taplo": { - "hidden": true - } - }, - "additional_profiles": { - "title": "List of Profiles", - "description": "Additional profile names to load", - "default": [], - "type": "array", - "x-taplo": { - "links": { - "key": "https://sagiegurari.github.io/cargo-make/#usage-profiles" - } - }, - "examples": [ - [ - "additional_profile" - ] - ], - "items": { - "title": "Profile", - "description": "Additional profile name to load", - "type": "string", - "default": "additional_profile" - }, - "uniqueItems": true - }, - "min_version": { - "description": "Minimum cargo-make/makers version", - "$ref": "#/definitions/semver", - "default": "0.35.0", - "examples": [ - "0.35.0", - "0.34.0", - "0.33.0" - ], - "x-taplo": { - "links": { - "key": "https://sagiegurari.github.io/cargo-make/#usage-min-version" - } - } - }, - "default_to_workspace": { - "description": "The default value for the `workspace` value of tasks in this makefile", - "default": false, - "type": "boolean", - "x-taplo": { - "links": { - "key": "https://sagiegurari.github.io/cargo-make/#usage-workspace-disabling-workspace-support" - } - } - }, - "reduce_output": { - "description": "Set to true to reduce console output for non CI execution", - "default": true, - "type": "boolean" - }, - "time_summary": { - "description": "Set to true to print time summary at the end of the flow", - "default": true, - "type": "boolean" - }, - "load_cargo_aliases": { - "description": "Automatically load cargo aliases as cargo-make tasks", - "default": true, - "type": "boolean", - "x-taplo": { - "links": { - "key": "https://sagiegurari.github.io/cargo-make/#usage-cargo-alias-tasks" - } - } - }, - "main_project_member": { - "title": "Crate", - "description": "The project information member (used by workspaces)", - "type": "string", - "default": "main-crate" - }, - "load_script": { - "description": "Invoked while loading the descriptor file but before loading any extended descriptor", - "x-taplo": { - "links": { - "key": "https://sagiegurari.github.io/cargo-make/#usage-load-scripts" - } - }, - "$ref": "#/definitions/script" - }, - "linux_load_script": { - "description": "Invoked while loading the descriptor file but before loading any extended descriptor. Takes precedence over `load_script` if runtime OS is Linux.", - "x-taplo": { - "links": { - "key": "https://sagiegurari.github.io/cargo-make/#usage-load-scripts" - } - }, - "$ref": "#/definitions/script" - }, - "windows_load_script": { - "description": "Invoked while loading the descriptor file but before loading any extended descriptor. Takes precedence over `load_script` if runtime OS is Windows.", - "x-taplo": { - "links": { - "key": "https://sagiegurari.github.io/cargo-make/#usage-load-scripts" - } - }, - "$ref": "#/definitions/script" - }, - "mac_load_script": { - "description": "Invoked while loading the descriptor file but before loading any extended descriptor. Takes precedence over `load_script` if runtime OS is Mac.", - "x-taplo": { - "links": { - "key": "https://sagiegurari.github.io/cargo-make/#usage-load-scripts" - } - }, - "$ref": "#/definitions/script" - } - } - }, - "env_files": { - "description": "The environment files to setup before running any tasks", - "$ref": "#/definitions/env_files" - }, - "env_scripts": { - "title": "List of Env Scripts", - "description": "The environment scripts to execute after environment files and the env block. These scripts can be used to run anything needed before starting up the flow.", - "type": "array", - "x-taplo": { - "links": { - "key": "https://sagiegurari.github.io/cargo-make/#usage-env-file" - } - }, - "default": [], - "items": { - "description": "Env script", - "type": "string", - "$ref": "#/definitions/script" - } - }, - "env": { - "description": "The environment variables to setup before running any tasks", - "$ref": "#/definitions/env" - }, - "tasks": { - "description": "Task definitions", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/task" - } - } - }, - "definitions": { - "semver": { - "title": "Semantic Version", - "type": "string", - "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)(?:-((?:0|[1-9][0-9]*|[0-9]*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9][0-9]*|[0-9]*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$" - }, - "extend": { - "title": "External Makefile", - "description": "A potentially optional external makefile to extend", - "type": "object", - "x-taplo": { - "initKeys": [ - "optional" - ] - }, - "required": [ - "path" - ], - "additionalProperties": false, - "properties": { - "path": { - "title": "File Path", - "description": "The path of the external makefile, relative to this file", - "type": "string", - "default": "path/to/Makefile.toml" - }, - "optional": { - "description": "If true, the external makefile is optional and does not need to exist", - "type": "boolean", - "default": true - } - } - }, - "script": { - "title": "Script", - "oneOf": [ - { - "title": "Script Line", - "type": "string" - }, - { - "title": "Script Lines", - "type": "array", - "items": { - "type": "string" - } - }, - { - "title": "Script File", - "type": "object", - "examples": [ - { - "file": "path/to/script" - }, - { - "file": "path/to/script", - "absolute_path": true - } - ], - "required": [ - "file" - ], - "additionalProperties": false, - "properties": { - "file": { - "title": "File Path", - "description": "Scipt file name", - "type": "string", - "default": "path/to/script" - }, - "absolute_path": { - "description": "If true, the `file` value is an absolute path", - "default": true, - "type": "boolean" - } - } - }, - { - "title": "Split Script", - "description": "Script content split to parts to enable a more fine tuned extension capability", - "type": "object", - "x-taplo": { - "initKeys": [ - "pre", - "main", - "post" - ] - }, - "additionalProperties": false, - "properties": { - "pre": { - "title": "Pre-Main Script", - "description": "Pre-main script section", - "type": "string" - }, - "main": { - "title": "Main Script", - "description": "Main script section", - "type": "string" - }, - "post": { - "title": "Post-Main Script", - "description": "Post-main script section", - "type": "string" - } - } - } - ] - }, - "env_files": { - "title": "List of Env Files", - "description": "Load environment files", - "type": "array", - "default": [], - "x-taplo": { - "links": { - "key": "https://sagiegurari.github.io/cargo-make/#usage-env-file" - } - }, - "items": { - "$ref": "#/definitions/envfile" - }, - "uniqueItems": true - }, - "envfile": { - "title": "Env File", - "description": "File containing environment variables and their values", - "examples": [ - "path/to/env.env", - { - "path": "path/to/env.env", - "profile": "development" - } - ], - "oneOf": [ - { - "title": "File Path", - "description": "The path to the env file", - "type": "string", - "default": "path/to/env.env" - }, - { - "description": "The env file path and attributes", - "type": "object", - "x-taplo": { - "initKeys": [ - "profile" - ] - }, - "required": [ - "path" - ], - "additionalProperties": false, - "properties": { - "path": { - "title": "File Path", - "description": "The path to the env file", - "type": "string", - "default": "path/to/env.env" - }, - "base_path": { - "title": "Directory Path", - "description": "The path base directory (relative paths are from this base path)", - "type": "string", - "default": "path/to/dir" - }, - "profile": { - "title": "Profile", - "description": "The profile name this file is relevant to", - "type": "string", - "default": "development", - "examples": [ - "development", - "production" - ] - } - } - } - ] - }, - "env": { - "title": "Env Vars", - "description": "Setup environment variables", - "type": "object", - "x-taplo": { - "links": { - "key": "https://sagiegurari.github.io/cargo-make/#usage-env-config" - } - }, - "additionalProperties": { - "$ref": "#/definitions/env_value" - } - }, - "env_value": { - "title": "Env Value", - "description": "An environment variable value", - "x-taplo": { - "links": { - "key": "https://sagiegurari.github.io/cargo-make/#usage-env" - } - }, - "anyOf": [ - { - "title": "Boolean", - "type": "boolean" - }, - { - "title": "Integer", - "type": "integer" - }, - { - "title": "String", - "type": "string" - }, - { - "title": "Separator List", - "description": "An array which will be joined with the `;` separator ", - "type": "array", - "items": { - "type": "string" - } - }, - { - "$ref": "#/definitions/env_value_unset" - }, - { - "$ref": "#/definitions/env_value_script" - }, - { - "$ref": "#/definitions/env_value_decode" - }, - { - "$ref": "#/definitions/env_value_conditioned" - }, - { - "$ref": "#/definitions/env_value_path_glob" - }, - { - "title": "Profile Env Vars", - "description": "Profile dependent environment variables", - "$ref": "#/definitions/env" - } - ] - }, - "env_value_unset": { - "title": "Unset", - "description": "Unsets environment variable", - "type": "object", - "required": [ - "unset" - ], - "additionalProperties": false, - "properties": { - "unset": { - "description": "If true, the env variable will be unset, else ignored", - "default": true, - "type": "boolean" - } - } - }, - "env_value_script": { - "title": "Env Value Script", - "description": "Provide environment variable via script", - "type": "object", - "required": [ - "script" - ], - "additionalProperties": false, - "properties": { - "script": { - "title": "Script Lines", - "type": "array", - "items": { - "type": "string" - }, - "default": [] - }, - "multi_line": { - "description": "Enable multi-line values", - "default": true, - "type": "boolean" - } - } - }, - "env_value_decode": { - "title": "Env Value Mapping", - "description": "Environment variable value provided by decoding other values", - "type": "object", - "x-taplo": { - "initKeys": [ - "default_value" - ] - }, - "required": [ - "source", - "mapping" - ], - "additionalProperties": false, - "properties": { - "source": { - "title": "Env Var", - "description": "The source environment variable (can be an env expression)", - "type": "string" - }, - "default_value": { - "title": "Env Value", - "description": "The default value in case no decode mapping was found, if not provided it will default to the source value", - "type": "string" - }, - "mapping": { - "title": "Value Mapping", - "description": "The decoding mapping from one value to another value", - "type": "object", - "default": {}, - "additionalProperties": { - "title": "Env Value", - "type": "string" - } - } - } - }, - "env_value_conditioned": { - "title": "Conditional Env Value", - "description": "Environment variable value set if condition is met", - "type": "object", - "x-taplo": { - "initKeys": [ - "condition" - ] - }, - "required": [ - "value" - ], - "additionalProperties": false, - "properties": { - "value": { - "title": "Env Value", - "description": "The value to set (can be an env expression)", - "type": "string" - }, - "condition": { - "description": "Condition to evaluate to see whether to set the environment value or not", - "$ref": "#/definitions/task_condition" - } - } - }, - "env_value_path_glob": { - "title": "Env Value Glob", - "description": "Environment value holding a list of paths based on given glob definitions", - "type": "object", - "required": [ - "glob" - ], - "additionalProperties": false, - "properties": { - "glob": { - "title": "Glob Pattern", - "description": "The glob used to fetch all paths", - "type": "string" - }, - "include_files": { - "description": "If true, include files in glob", - "default": true, - "type": "boolean" - }, - "include_dirs": { - "description": "If true, include directories in glob", - "default": true, - "type": "boolean" - }, - "ignore_type": { - "title": "Ignore Source", - "description": "An ignore source that enables respecting ignore files from that source", - "enum": [ - "git" - ], - "type": "string", - "default": "git" - } - } - }, - "task_condition": { - "title": "Condition", - "description": "Conditions allow you to evaluate at runtime if to run a specific task or not", - "type": "object", - "x-taplo": { - "links": { - "key": "https://sagiegurari.github.io/cargo-make/#usage-conditions" - } - }, - "additionalProperties": false, - "properties": { - "fail_message": { - "title": "Message", - "description": "Message to display when the condition fails", - "type": "string" - }, - "profiles": { - "title": "List of Profiles", - "description": "Profile names to match for the condition", - "type": "array", - "default": [], - "items": { - "title": "Profile", - "description": "Profile name", - "type": "string", - "default": "development" - } - }, - "platforms": { - "title": "List of Platforms", - "description": "Platform names to match for the condition", - "type": "array", - "items": { - "title": "Platform", - "description": "Platform name", - "enum": [ - "linux", - "windows", - "mac" - ], - "type": "string" - } - }, - "channels": { - "title": "List of Channels", - "description": "Rust channels to match for the condition", - "type": "array", - "items": { - "title": "Channel", - "description": "Rust channel", - "enum": [ - "stable", - "beta", - "nightly" - ], - "type": "string", - "default": "stable" - } - }, - "env_set": { - "title": "List of Env Vars", - "description": "List of environment variables which must be defined", - "type": "array", - "items": { - "title": "Env Var", - "description": "Environment variable", - "type": "string" - } - }, - "env_not_set": { - "title": "List of Env Vars", - "description": "List of environment variables which must not be defined", - "type": "array", - "items": { - "title": "Env Var", - "description": "Environment variable", - "type": "string" - } - }, - "env_true": { - "title": "List of Env Vars", - "description": "List of environment variables which must be defined and must not be set to any of the following (case insensitive): `false`, `no`, `0`, or empty", - "type": "array", - "items": { - "title": "Env Var", - "description": "Environment variable", - "type": "string" - } - }, - "env_false": { - "title": "List of Env Vars", - "description": "List of environment variables which must be defined and must be set to any of the following (case insensitive): `false`, `no`, `0`, or empty", - "type": "array", - "items": { - "title": "Env Var", - "description": "Environment variable", - "type": "string" - } - }, - "env": { - "title": "Env Vars", - "description": "Map of environment variables that must be defined and equal to the provided values", - "type": "object", - "additionalProperties": { - "title": "Env Value", - "description": "Environment value", - "type": "string" - } - }, - "env_contains": { - "title": "Env Vars", - "description": "Map of environment variables that must be defined and contain (case insensitive) the provided values", - "type": "object", - "additionalProperties": { - "title": "Env Value", - "description": "Environment value", - "type": "string" - } - }, - "rust_version": { - "title": "Rust Version Criteria", - "description": "A definition of min, max and/or specific rust version", - "type": "object", - "x-taplo": { - "initKeys": [ - "min" - ] - }, - "additionalProperties": false, - "properties": { - "min": { - "description": "Minimum Rust version", - "$ref": "#/definitions/semver" - }, - "max": { - "description": "Maximum Rust version", - "$ref": "#/definitions/semver" - }, - "equal": { - "description": "Exact Rust version", - "$ref": "#/definitions/semver" - } - } - }, - "files_exist": { - "title": "List of Files", - "description": "List of absolute path files to check they exist. Environment substitution is supported so you can define relative paths", - "type": "array", - "items": { - "title": "File Path", - "description": "File path", - "type": "string" - } - }, - "files_not_exist": { - "title": "List of Files", - "description": "List of absolute path files to check they do not exist. Environment substitution is supported so you can define relative paths", - "type": "array", - "items": { - "title": "File Path", - "description": "File path", - "type": "string" - } - } - } - }, - "task": { - "title": "Task", - "description": "A task is a command, script, rust code or other sub tasks to execute. Tasks can have dependencies which are also tasks that will be executed before the task itself.", - "type": "object", - "additionalProperties": false, - "properties": { - "clear": { - "description": "If true, it should ignore all data in the base task", - "default": true, - "type": "boolean", - "x-taplo": { - "links": { - "key": "https://sagiegurari.github.io/cargo-make/#usage-default-tasks" - } - } - }, - "description": { - "title": "Description", - "description": "A description used to document the task", - "type": "string" - }, - "category": { - "title": "Category", - "description": "Category name used to document the task", - "type": "string" - }, - "disabled": { - "description": "If true, the command/script of this task will not be invoked, but dependencies will be", - "default": true, - "type": "boolean", - "x-taplo": { - "links": { - "key": "https://sagiegurari.github.io/cargo-make/#usage-default-tasks" - } - } - }, - "private": { - "description": "If true, the task is hidden from the list of available tasks and also cannot be invoked directly from CLI", - "default": true, - "type": "boolean", - "x-taplo": { - "links": { - "key": "https://sagiegurari.github.io/cargo-make/#usage-private-tasks" - } - } - }, - "deprecated": { - "description": "If set, this task is documented as deprecated. This can be a boolean or a string deprecation message.", - "default": true, - "x-taplo": { - "links": { - "key": "https://sagiegurari.github.io/cargo-make/#usage-deprecated-tasks" - } - }, - "oneOf": [ - { - "type": "boolean" - }, - { - "title": "Deprecation Message", - "type": "string" - } - ] - }, - "extend": { - "title": "Task Name", - "description": "Extends the specified task as a base task", - "type": "string", - "x-taplo": { - "links": { - "key": "https://sagiegurari.github.io/cargo-make/#usage-task-extend-attribute" - } - } - }, - "workspace": { - "description": "Set to false to specify that this is not a workspace and should not call the task for every member (same as --no-workspace CLI flag)", - "default": false, - "type": "boolean", - "x-taplo": { - "links": { - "key": "https://sagiegurari.github.io/cargo-make/#usage-workspace-disabling-workspace-support" - } - } - }, - "watch": { - "description": "Watch for file changes and invoke the task operation", - "default": true, - "x-taplo": { - "links": { - "key": "https://sagiegurari.github.io/cargo-make/#usage-watch" - } - }, - "oneOf": [ - { - "type": "boolean" - }, - { - "title": "Watch Options", - "type": "object", - "x-taplo": { - "initKeys": [ - "watch" - ] - }, - "additionalProperties": false, - "properties": { - "version": { - "description": "Version of cargo-watch to install if it's not already installed", - "$ref": "#/definitions/semver" - }, - "postpone": { - "description": "Postpone first run until a file changes", - "default": true, - "type": "boolean" - }, - "ignore_pattern": { - "title": "Glob Pattern", - "description": "Ignore a glob/gitignore-style pattern while watching", - "type": "string" - }, - "no_git_ignore": { - "description": "Do not use .gitignore files while watching", - "default": true, - "type": "boolean" - }, - "watch": { - "title": "List of Paths", - "description": "List of files and folders to watch", - "type": "array", - "items": { - "title": "Path", - "description": "File or folder to watch", - "type": "string" - } - } - } - } - ] - }, - "condition": { - "description": "If provided all condition values must be met in order for the task to be invoked (will not stop dependencies)", - "$ref": "#/definitions/task_condition" - }, - "condition_script": { - "title": "Script", - "description": "If script exit code is not 0, the command/script of this task will not be invoked, dependencies however will be", - "type": "array", - "items": { - "type": "string" - }, - "x-taplo": { - "links": { - "key": "https://sagiegurari.github.io/cargo-make/#usage-conditions-script" - } - } - }, - "ignore_errors": { - "description": "If true, any error while executing the task will be printed but will not break the build", - "default": true, - "type": "boolean", - "x-taplo": { - "links": { - "key": "https://sagiegurari.github.io/cargo-make/#usage-ignoring-errors" - } - } - }, - "force": { - "description": "DEPRECATED, replaced with `ignore_errors`", - "default": true, - "type": "boolean", - "deprecated": true, - "x-taplo": { - "hidden": true - } - }, - "env_files": { - "description": "The env files to setup before running the task commands", - "$ref": "#/definitions/env_files" - }, - "env": { - "description": "The env vars to setup before running the task commands", - "$ref": "#/definitions/env" - }, - "cwd": { - "title": "Directory Path", - "description": "The working directory for the task to execute its command/script", - "type": "string", - "default": "path/to/dir" - }, - "alias": { - "title": "Task Name", - "description": "If defined, task points to another task and all other properties are ignored", - "type": "string", - "x-taplo": { - "links": { - "key": "https://sagiegurari.github.io/cargo-make/#usage-task-dependencies-alias" - } - } - }, - "linux_alias": { - "title": "Task Name", - "description": "If defined and this platform is Linux, task points to another task and all other properties are ignored (takes precedence over `alias` on Linux)", - "type": "string", - "x-taplo": { - "links": { - "key": "https://sagiegurari.github.io/cargo-make/#usage-task-dependencies-alias" - } - } - }, - "windows_alias": { - "title": "Task Name", - "description": "If defined and this platform is Windows, task points to another task and all other properties are ignored (takes precedence over `alias` on Windows)", - "type": "string", - "x-taplo": { - "links": { - "key": "https://sagiegurari.github.io/cargo-make/#usage-task-dependencies-alias" - } - } - }, - "mac_alias": { - "title": "Task Name", - "description": "If defined and this platform is Mac, task points to another task and all other properties are ignored (takes precedence over `alias` on Mac)", - "type": "string", - "x-taplo": { - "links": { - "key": "https://sagiegurari.github.io/cargo-make/#usage-task-dependencies-alias" - } - } - }, - "install_crate": { - "description": "Indicates the provided crate needs to be installed (if needed) before running the task", - "x-taplo": { - "links": { - "key": "https://sagiegurari.github.io/cargo-make/#usage-installing-crates" - } - }, - "oneOf": [ - { - "description": "If set to false, will disable crate installation from the base task", - "default": false, - "type": "boolean" - }, - { - "title": "Crate Name", - "description": "Name of the crate to install", - "type": "string" - }, - { - "title": "Crate Install Options", - "description": "Instructions on how to install a crate", - "type": "object", - "required": [ - "crate_name", - "binary", - "test_arg" - ], - "additionalProperties": false, - "properties": { - "crate_name": { - "title": "Crate Name", - "description": "Name of the crate to install", - "type": "string" - }, - "rustup_component_name": { - "title": "Component Name", - "description": "The component to install via rustup", - "type": "string" - }, - "binary": { - "title": "File Name", - "description": "The binary file name to be used to test if the crate is already installed", - "type": "string" - }, - "test_arg": { - "title": "Args", - "description": "Arguments used to check whether a crate or rustup component is installed.", - "oneOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "string" - } - } - ] - }, - "min_version": { - "description": "Minimum version of installed crate before it needs to be reinstalled", - "$ref": "#/definitions/semver" - }, - "version": { - "description": "Exact version of installed crate", - "$ref": "#/definitions/semver" - } - } - }, - { - "title": "Component Install Options", - "description": "Instructions on how to install a rustup component", - "type": "object", - "required": [ - "rustup_component_name" - ], - "additionalProperties": false, - "properties": { - "rustup_component_name": { - "title": "Component Name", - "description": "The component to install via rustup", - "type": "string" - }, - "binary": { - "title": "File Name", - "description": "The binary file name to be used to test if the crate is already installed", - "type": "string" - }, - "test_arg": { - "title": "Args", - "description": "Arguments used to check whether a crate or rustup component is installed.", - "oneOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "string" - } - } - ] - } - } - }, - { - "title": "Plugin Install Options", - "description": "Instructions on how to install a cargo plugin", - "type": "object", - "required": [ - "crate_name", - "min_version" - ], - "additionalProperties": false, - "properties": { - "crate_name": { - "title": "Crate Name", - "description": "Name of the crate to install", - "type": "string" - }, - "min_version": { - "description": "Minimum version of installed crate before it needs to be reinstalled", - "$ref": "#/definitions/semver" - } - } - } - ] - }, - "install_crate_args": { - "title": "Args", - "description": "Additional cargo install args", - "type": "array", - "items": { - "type": "string" - } - }, - "install_script": { - "description": "Provided script will be executed before running the task", - "$ref": "#/definitions/script" - }, - "command": { - "title": "File Name", - "description": "The command to execute for this task", - "type": "string", - "x-taplo": { - "links": { - "key": "https://sagiegurari.github.io/cargo-make/#usage-task-command-script-task-examplecommand" - } - } - }, - "args": { - "title": "Args", - "description": "The args for the executed command", - "type": "array", - "items": { - "type": "string" - }, - "x-taplo": { - "links": { - "key": "https://sagiegurari.github.io/cargo-make/#usage-task-command-script-task-examplecommand" - } - } - }, - "script": { - "description": "If `command` is not defined, but `script` is defined, the provided script will be executed", - "$ref": "#/definitions/script", - "x-taplo": { - "links": { - "key": "https://sagiegurari.github.io/cargo-make/#usage-task-command-script-task-examplescript" - } - } - }, - "script_runner": { - "title": "Script Runner", - "description": "The script attribute may hold non OS scripts, for example rust code to be compiled and executed. In order to use non OS script runners, you must define the special script_runner with the @ prefix.", - "type": "string", - "examples": [ - "@rust", - "@duckscript", - "@shell", - "python", - "perl", - "node", - "php", - "powershell" - ], - "x-taplo": { - "links": { - "key": "https://sagiegurari.github.io/cargo-make/#usage-task-command-script-task" - } - } - }, - "script_runner_args": { - "title": "Args", - "description": "The script runner arguments before the script file path", - "type": "string", - "examples": [ - "-f" - ], - "x-taplo": { - "links": { - "key": "https://sagiegurari.github.io/cargo-make/#usage-task-command-script-task-examplegeneric" - } - } - }, - "script_extension": { - "title": "File Extension", - "description": "The file extension to use for the script", - "type": "string", - "examples": [ - "py", - "pl", - "js", - "php", - "ps1" - ] - }, - "x-taplo": { - "links": { - "key": "https://sagiegurari.github.io/cargo-make/#usage-task-command-script-task-examplegeneric" - } - }, - "run_task": { - "description": "Run a task as a sub-task at the end of executing this task", - "x-taplo": { - "links": { - "key": "https://sagiegurari.github.io/cargo-make/#usage-task-command-script-task-examplesubtask" - } - }, - "oneOf": [ - { - "title": "Task Name", - "description": "Name of the sub-task to execute", - "type": "string" - }, - { - "type": "object", - "required": [ - "name" - ], - "additionalProperties": false, - "properties": { - "name": { - "title": "Task Name", - "description": "Name(s) of the sub-task to execute", - "oneOf": [ - { - "type": "string" - }, - { - "title": "List of Task Names", - "type": "array", - "items": { - "title": "Task Name", - "type": "string" - } - } - ] - }, - "fork": { - "description": "Fork the sub-task into a a new subprocess", - "default": true, - "type": "boolean", - "x-taplo": { - "links": { - "key": "https://sagiegurari.github.io/cargo-make/#usage-task-command-script-task-examplesubtask" - } - } - }, - "parallel": { - "description": "Run tasks in parallel", - "default": true, - "type": "boolean", - "x-taplo": { - "links": { - "key": "https://sagiegurari.github.io/cargo-make/#usage-task-command-script-task-examplesubtask" - } - } - }, - "cleanup_task": { - "title": "Task Name", - "description": "A task to run after all specified sub-tasks have completed", - "type": "string", - "x-taplo": { - "links": { - "key": "https://sagiegurari.github.io/cargo-make/#usage-task-command-script-task-examplesubtask" - } - } - } - } - }, - { - "title": "Conditional Tasks", - "description": "Conditional sub-task selector", - "type": "array", - "items": { - "description": "Sub-task routing information", - "type": "object", - "required": [ - "name" - ], - "additionalProperties": false, - "properties": { - "name": { - "title": "Task Name", - "description": "Name(s) of the sub-task to execute", - "oneOf": [ - { - "type": "string" - }, - { - "title": "List of Task Names", - "type": "array", - "items": { - "title": "Task Name", - "type": "string" - } - } - ] - }, - "fork": { - "description": "Fork the sub-task into a a new subprocess", - "default": true, - "type": "boolean", - "x-taplo": { - "links": { - "key": "https://sagiegurari.github.io/cargo-make/#usage-task-command-script-task-examplesubtask" - } - } - }, - "parallel": { - "description": "Run tasks in parallel", - "default": true, - "type": "boolean", - "x-taplo": { - "links": { - "key": "https://sagiegurari.github.io/cargo-make/#usage-task-command-script-task-examplesubtask" - } - } - }, - "cleanup_task": { - "title": "Task Name", - "description": "A task to run after all specified sub-tasks have completed", - "type": "string", - "x-taplo": { - "links": { - "key": "https://sagiegurari.github.io/cargo-make/#usage-task-command-script-task-examplesubtask" - } - } - }, - "condition": { - "description": "If provided all condition values must be met in order for the task to be invoked", - "$ref": "#/definitions/task_condition" - }, - "condition_script": { - "title": "Script", - "description": "If script exit code is not 0, the sub tasks will not be invoked", - "type": "array", - "items": { - "type": "string" - } - } - } - } - } - ] - }, - "dependencies": { - "title": "List of Tasks", - "description": "A list of tasks to execute before this task", - "type": "array", - "x-taplo": { - "links": { - "key": "https://sagiegurari.github.io/cargo-make/#usage-task-dependencies-alias" - } - }, - "items": { - "oneOf": [ - { - "title": "Task Name", - "description": "The name of a task in this file", - "type": "string" - }, - { - "title": "External Task", - "description": "A task dependency potentially in another file", - "type": "object", - "x-taplo": { - "initKeys": [ - "path" - ] - }, - "required": [ - "name" - ], - "additionalProperties": false, - "properties": { - "name": { - "title": "Task Name", - "description": "The task name to execute", - "type": "string" - }, - "path": { - "title": "File Path", - "description": "The path to the makefile the task resides in", - "type": "string", - "default": "path/to/makefile" - } - } - } - ] - } - }, - "toolchain": { - "title": "Toolchain", - "description": "The rust toolchain used to invoke the command or install the needed crates/components", - "type": "string", - "x-taplo": { - "links": { - "key": "https://sagiegurari.github.io/cargo-make/#usage-toolchain" - } - } - }, - "linux": { - "description": "Override task if runtime OS is Linux (takes precedence over alias)", - "$ref": "#/definitions/task" - }, - "windows": { - "description": "Override task if runtime OS is Windows (takes precedence over alias)", - "$ref": "#/definitions/task" - }, - "mac": { - "description": "Override task if runtime OS is Mac (takes precedence over alias)", - "$ref": "#/definitions/task" - } - } - } - } -} \ No newline at end of file diff --git a/site/site/public/schemas/pyproject.toml.json b/site/site/public/schemas/pyproject.toml.json deleted file mode 100644 index c8c9e4fb4..000000000 --- a/site/site/public/schemas/pyproject.toml.json +++ /dev/null @@ -1,589 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "pyproject.toml", - "x-taplo-info": { - "authors": ["zevisert (https://github.com/zevisert)"], - "patterns": ["^(.*(/|\\\\)pyproject\\.toml|pyproject\\.toml)$"] - }, - "definitions": { - "poetry-author-pattern": { - "description": "Pattern that matches `Name ` like 'King Arthur' or 'Miss Islington <miss-islington@python.org>'.", - "type": "string", - "pattern": "^(?:\\S+?\\s)+?(?:<(?:[a-z\\d!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z\\d!#$%&'*+/=?^_`{|}~-]+)*|\"(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*\")@(?:(?:[a-z\\d](?:[a-z\\d-]*[a-z\\d])?\\.)+[a-z\\d](?:[a-z\\d-]*[a-z\\d])?|\\[(?:(?:25[0-5]|2[0-4][\\d]|[01]?[\\d][\\d]?)\\.){3}(?:25[0-5]|2[0-4][\\d]|[01]?[\\d][\\d]?|[a-z\\d-]*[a-z\\d]:(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21-\\x5a\\x53-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)\\])>)?$" - }, - "poetry-authors": { - "type": "array", - "description": "List of authors that contributed to the package. This is typically the main maintainers, not the full list.", - "items": { - "$ref": "#/definitions/poetry-author-pattern" - } - }, - "poetry-maintainers": { - "type": "array", - "description": "List of maintainers, other than the original author(s), that upkeep the package.", - "items": { - "$ref": "#/definitions/poetry-author-pattern" - } - }, - "poetry-dependency-any": { - "oneOf": [ - { - "$ref": "#/definitions/poetry-dependency" - }, - { - "$ref": "#/definitions/poetry-long-dependency" - }, - { - "$ref": "#/definitions/poetry-git-dependency" - }, - { - "$ref": "#/definitions/poetry-file-dependency" - }, - { - "$ref": "#/definitions/poetry-path-dependency" - }, - { - "$ref": "#/definitions/poetry-url-dependency" - }, - { - "$ref": "#/definitions/poetry-multiple-constraints-dependency" - } - ] - }, - "poetry-pep440-version": { - "type": "string", - "description": "A version constraint. Validates against the PEP 440's version pattern." - }, - "poetry-dependency": { - "$ref": "#/definitions/poetry-pep440-version" - }, - "poetry-long-dependency": { - "type": "object", - "required": ["version"], - "additionalProperties": false, - "properties": { - "version": { - "$ref": "#/definitions/poetry-pep440-version" - }, - "python": { - "type": "string", - "description": "The python versions for which the dependency should be installed." - }, - "platform": { - "type": "string", - "description": "The platform(s) for which the dependency should be installed." - }, - "markers": { - "type": "string", - "description": "The PEP 508 compliant environment markers for which the dependency should be installed." - }, - "allow-prereleases": { - "type": "boolean", - "description": "Whether the dependency allows prereleases or not." - }, - "allows-prereleases": { - "type": "boolean", - "description": "Whether the dependency allows prereleases or not." - }, - "optional": { - "type": "boolean", - "description": "Whether the dependency is optional or not." - }, - "extras": { - "type": "array", - "description": "The required extras for this dependency.", - "items": { - "type": "string" - } - }, - "source": { - "type": "string", - "description": "The exclusive source used to search for this dependency." - } - } - }, - "poetry-git-dependency": { - "type": "object", - "required": ["git"], - "additionalProperties": false, - "properties": { - "git": { - "type": "string", - "description": "The url of the git repository.", - "format": "uri" - }, - "branch": { - "type": "string", - "description": "The branch to checkout." - }, - "tag": { - "type": "string", - "description": "The tag to checkout." - }, - "rev": { - "type": "string", - "description": "The revision to checkout." - }, - "python": { - "type": "string", - "description": "The python versions for which the dependency should be installed." - }, - "platform": { - "type": "string", - "description": "The platform(s) for which the dependency should be installed." - }, - "markers": { - "type": "string", - "description": "The PEP 508 compliant environment markers for which the dependency should be installed." - }, - "allow-prereleases": { - "type": "boolean", - "description": "Whether the dependency allows prereleases or not." - }, - "allows-prereleases": { - "type": "boolean", - "description": "Whether the dependency allows prereleases or not." - }, - "optional": { - "type": "boolean", - "description": "Whether the dependency is optional or not." - }, - "extras": { - "type": "array", - "description": "The required extras for this dependency.", - "items": { - "type": "string" - } - } - } - }, - "poetry-file-dependency": { - "type": "object", - "required": ["file"], - "additionalProperties": false, - "properties": { - "file": { - "type": "string", - "description": "The path to the file." - }, - "python": { - "type": "string", - "description": "The python versions for which the dependency should be installed." - }, - "platform": { - "type": "string", - "description": "The platform(s) for which the dependency should be installed." - }, - "markers": { - "type": "string", - "description": "The PEP 508 compliant environment markers for which the dependency should be installed." - }, - "optional": { - "type": "boolean", - "description": "Whether the dependency is optional or not." - }, - "extras": { - "type": "array", - "description": "The required extras for this dependency.", - "items": { - "type": "string" - } - } - } - }, - "poetry-path-dependency": { - "type": "object", - "required": ["path"], - "additionalProperties": false, - "properties": { - "path": { - "type": "string", - "description": "The path to the dependency." - }, - "python": { - "type": "string", - "description": "The python versions for which the dependency should be installed." - }, - "platform": { - "type": "string", - "description": "The platform(s) for which the dependency should be installed." - }, - "markers": { - "type": "string", - "description": "The PEP 508 compliant environment markers for which the dependency should be installed." - }, - "optional": { - "type": "boolean", - "description": "Whether the dependency is optional or not." - }, - "extras": { - "type": "array", - "description": "The required extras for this dependency.", - "items": { - "type": "string" - } - }, - "develop": { - "type": "boolean", - "description": "Whether to install the dependency in development mode." - } - } - }, - "poetry-url-dependency": { - "type": "object", - "required": ["url"], - "additionalProperties": false, - "properties": { - "url": { - "type": "string", - "description": "The url to the file." - }, - "python": { - "type": "string", - "description": "The python versions for which the dependency should be installed." - }, - "platform": { - "type": "string", - "description": "The platform(s) for which the dependency should be installed." - }, - "markers": { - "type": "string", - "description": "The PEP 508 compliant environment markers for which the dependency should be installed." - }, - "optional": { - "type": "boolean", - "description": "Whether the dependency is optional or not." - }, - "extras": { - "type": "array", - "description": "The required extras for this dependency.", - "items": { - "type": "string" - } - } - } - }, - "poetry-multiple-constraints-dependency": { - "type": "array", - "minItems": 1, - "items": { - "oneOf": [ - { - "$ref": "#/definitions/poetry-dependency" - }, - { - "$ref": "#/definitions/poetry-long-dependency" - }, - { - "$ref": "#/definitions/poetry-git-dependency" - }, - { - "$ref": "#/definitions/poetry-file-dependency" - }, - { - "$ref": "#/definitions/poetry-path-dependency" - }, - { - "$ref": "#/definitions/poetry-url-dependency" - } - ] - } - }, - "poetry-scripts": { - "type": "object", - "patternProperties": { - "^[a-zA-Z-_.0-9]+$": { - "oneOf": [ - { - "$ref": "#/definitions/poetry-script" - }, - { - "$ref": "#/definitions/poetry-extra-script" - } - ] - } - } - }, - "poetry-script": { - "type": "string", - "description": "A simple script pointing to a callable object." - }, - "poetry-extra-script": { - "type": "object", - "description": "A script that should be installed only if extras are activated.", - "additionalProperties": false, - "properties": { - "callable": { - "$ref": "#/definitions/poetry-script" - }, - "extras": { - "type": "array", - "description": "The required extras for this script.", - "items": { - "type": "string" - } - } - } - }, - "poetry-repository": { - "type": "object", - "additionalProperties": false, - "properties": { - "name": { - "type": "string", - "description": "The name of the repository" - }, - "url": { - "type": "string", - "description": "The url of the repository", - "format": "uri" - }, - "default": { - "type": "boolean", - "description": "Make this repository the default (disable PyPI)" - }, - "secondary": { - "type": "boolean", - "description": "Declare this repository as secondary, i.e. it will only be looked up last for packages." - } - } - }, - - "BuildSystem": { - "title": "Build System", - "type": "object", - "x-taplo": { - "links": { - "key": "https://www.python.org/dev/peps/pep-0518/#build-system-table" - } - }, - "description": "Build-related data.\n", - "required": ["requires"], - "properties": { - "requires": { - "description": "A list of strings representing [PEP 508](https://www.python.org/dev/peps/pep-0508) dependencies required to execute the build system.\n", - "type": "array", - "items": { - "type": "string" - }, - "x-taplo": { - "links": { - "key": "https://www.python.org/dev/peps/pep-0518/#build-system-table" - } - } - }, - "build-backend": { - "description": "The build backend for the package.\n", - "type": "string", - "x-taplo": { - "links": { - "key": "https://www.python.org/dev/peps/pep-0517/" - } - } - } - } - } - }, - "type": "object", - "properties": { - "build-system": { - "$ref": "#/definitions/BuildSystem" - }, - "tool": { - "type": "object", - "description": "A table for tool configurations.\n\nEvery tool that is used by the project can have its own sub-table for its configuration.\n", - "additionalProperties": true, - "x-taplo": { - "links": { - "key": "https://www.python.org/dev/peps/pep-0518/#id28" - } - }, - "properties": { - "poetry": { - "name": "Package", - "type": "object", - "additionalProperties": false, - "required": ["name", "version", "description"], - "properties": { - "name": { - "type": "string", - "description": "Package name." - }, - "version": { - "type": "string", - "description": "Version of the package. It should follow semantic versioning, but it is not enforced." - }, - "description": { - "type": "string", - "description": "Short package description." - }, - "keywords": { - "type": "array", - "items": { - "type": "string", - "description": "A tag/keyword that this package relates to." - } - }, - "homepage": { - "type": "string", - "description": "Homepage URL for the project.", - "format": "uri" - }, - "repository": { - "type": "string", - "description": "Repository URL for the project.", - "format": "uri" - }, - "documentation": { - "type": "string", - "description": "Documentation URL for the project.", - "format": "uri" - }, - "license": { - "type": "string", - "description": "License name." - }, - "authors": { - "$ref": "#/definitions/poetry-authors" - }, - "maintainers": { - "$ref": "#/definitions/poetry-maintainers" - }, - "readme": { - "type": "string", - "description": "The path to the README file" - }, - "classifiers": { - "type": "array", - "description": "A list of trove classifers." - }, - "packages": { - "type": "array", - "description": "A list of packages to include in the final distribution.", - "items": { - "type": "object", - "description": "Information about where the package resides.", - "additionalProperties": false, - "required": ["include"], - "properties": { - "include": { - "type": "string", - "description": "What to include in the package." - }, - "from": { - "type": "string", - "description": "Where the source directory of the package resides." - }, - "format": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "string" - } - } - ], - "description": "The format(s) for which the package must be included." - } - } - } - }, - "include": { - "type": "array", - "description": "A list of files and folders to include." - }, - "exclude": { - "type": "array", - "description": "A list of files and folders to exclude." - }, - "dependencies": { - "type": "object", - "description": "This is a hash of package name (keys) and version constraints (values) that are required to run this package.", - "required": ["python"], - "properties": { - "python": { - "type": "string", - "description": "The Python versions the package is compatible with.", - "$ref": "#/definitions/poetry-dependency" - } - }, - "patternProperties": { - "^[a-zA-Z-_.0-9]+$": { - "$ref": "#/definitions/poetry-dependency-any" - } - } - }, - "dev-dependencies": { - "type": "object", - "description": "This is a hash of package name (keys) and version constraints (values) that this package requires for developing it (testing tools and such).", - "patternProperties": { - "^[a-zA-Z-_.0-9]+$": { - "$ref": "#/definitions/poetry-dependency-any" - } - } - }, - "extras": { - "type": "object", - "patternProperties": { - "^[a-zA-Z-_.0-9]+$": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "build": { - "type": "string", - "description": "The file used to build extensions." - }, - "source": { - "type": "array", - "description": "A set of additional repositories where packages can be found.", - "additionalProperties": { - "$ref": "#/definitions/poetry-repository" - }, - "items": { - "$ref": "#/definitions/poetry-repository" - } - }, - "scripts": { - "type": "object", - "description": "A hash of scripts to be installed.", - "items": { - "type": "string" - } - }, - "plugins": { - "type": "object", - "description": "A hash of hashes representing plugins", - "patternProperties": { - "^[a-zA-Z-_.0-9]+$": { - "type": "object", - "patternProperties": { - "^[a-zA-Z-_.0-9]+$": { - "type": "string" - } - } - } - } - }, - "urls": { - "type": "object", - "patternProperties": { - "^.+$": { - "type": "string", - "description": "The full url of the custom url." - } - } - } - } - } - } - } - }, - "additionalProperties": true -} diff --git a/site/site/public/schemas/replit.toml.json b/site/site/public/schemas/replit.toml.json deleted file mode 100644 index 7bb7b6919..000000000 --- a/site/site/public/schemas/replit.toml.json +++ /dev/null @@ -1,218 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema", - "title": "Repl.it config schema (.replit)", - "description": "https://docs.replit.com/programming-ide/configuring-repl", - "x-taplo-info": { - "authors": ["Emily Grace Seville (https://github.com/EmilySeville7cfg)"], - "patterns": ["\\.replit(?:\\.toml)?$"] - }, - "type": "object", - "properties": { - "run": { - "description": "Command to run REPL", - "type": ["string", "array"], - "items": { - "type": "string" - } - }, - "language": { - "description": "Language name used in REPL", - "type": "string", - "$comment": "List is taken from https://replit.com/talk/learn/How-to-Get-a-List-of-All-Replit-Langauges/34411", - "enum": [ - "clojure", - "haskell", - "kotlin", - "qbasic", - "forth", - "lolcode", - "brainf***", - "emoticon", - "bloop", - "react_native", - "unlambda", - "javascript", - "babel", - "coffeescript", - "scheme", - "apl", - "lua", - "python", - "ruby", - "roy", - "php", - "python3", - "nodejs", - "enzyme", - "go", - "java", - "cpp", - "cpp11", - "c", - "csharp", - "fsharp", - "web_project", - "html", - "rust", - "swift", - "python_turtle", - "basic", - "jest", - "django", - "express", - "sinatra", - "rails", - "rlang", - "nextjs", - "gatsbyjs", - "reactjs", - "reactts", - "reactre", - "flow", - "bash", - "quil", - "polygott", - "crystal", - "julia", - "perl6", - "elixir", - "nim", - "dart", - "gatsbyjsv2", - "reason_nodejs", - "tcl", - "erlang", - "typescript", - "ocaml", - "pygame", - "love2d", - "reason", - "Tkinter", - "tkinter", - "java_swing", - "php_server", - "nodejs_prybar", - "elisp", - "php7", - "sqlite", - "java10", - "php_cli", - "nodejs_beta", - "pyxel", - "static", - "go_beta", - "nodejs_static", - "python3_beta", - "raku", - "testj", - "wasm", - "java10_beta", - "python_beta", - "html_beta", - "testj_beta", - "scala", - "riddlejs", - "java_maven" - ] - }, - "audio": { - "description": "Enable/disable system-wide audio in REPL", - "type": "boolean" - }, - "packager": { - "description": "Universal Package Manager (UPM) configuration", - "type": "object", - "properties": { - "afterInstall": { - "description": "Command to run on new package install", - "type": "string" - }, - "ignoredPaths": { - "description": "List of ignored path", - "type": "array", - "items": { - "type": "string", - "minLength": 1 - }, - "uniqueItems": true, - "minItems": 1 - }, - "ignoredPackages": { - "description": "List of ignored packages", - "type": "array", - "items": { - "type": "string", - "minLength": 1 - }, - "uniqueItems": true, - "minItems": 1 - }, - "language": { - "description": "Language name", - "type": "string", - "enum": [ - "python-python3-poetry", - "python-python2-poetry", - "nodejs-npm", - "nodejs-yarn", - "ruby-bundler", - "elisp-cask", - "dart-pub", - "java-maven", - "rlang", - "dotnet", - "rust" - ] - }, - "features": { - "description": "Universal Package Manager (UPM) features", - "type": "object", - "properties": { - "packageSearch": { - "description": "Enable/disable package search panel", - "type": "boolean" - }, - "guessImports": { - "description": "Enable/disable guessing required packages", - "type": "boolean" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - "languages": { - "description": "Language configuration", - "type": "object", - "patternProperties": { - ".": { - "description": "Language configuration", - "type": "object", - "properties": { - "glob": { - "description": "Glob for language files", - "type": "string", - "minLength": 1 - }, - "languageServer": { - "description": "Language Server Protocol (LSP) configuration", - "type": "object", - "properties": { - "start": { - "description": "Command to run server", - "type": "string" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false -} - diff --git a/site/site/public/schemas/rust-toolchain.toml.json b/site/site/public/schemas/rust-toolchain.toml.json deleted file mode 100644 index 4de85554b..000000000 --- a/site/site/public/schemas/rust-toolchain.toml.json +++ /dev/null @@ -1,346 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema", - "title": "Schema for rust-toolchain.toml", - "description": "https://rust-lang.github.io/rustup/overrides.html#the-toolchain-file", - "x-taplo-info": { - "authors": [ - "ian-h-chamberlain (https://github.com/ian-h-chamberlain)" - ], - "patterns": [ - "^(.*(/|\\\\)rust-toolchain([.]toml)?)$" - ] - }, - "properties": { - "toolchain": { - "description": "A \"toolchain\" is a complete installation of the Rust\ncompiler (`rustc`) and related tools (like `cargo`). A toolchain\nspecification includes the release channel or version, and the host\nplatform that the toolchain runs on.", - "type": "object", - "minProperties": 1, - "oneOf": [ - { - "properties": { - "channel": { - "description": "Rust is released to three different \"channels\": stable, beta,\nand nightly.", - "type": "string", - "oneOf": [ - { - "enum": [ - "stable", - "beta", - "nightly" - ] - }, - { - "$comment": "Empty schema allows for custom rustup toolchains, specific nightlies, etc." - } - ], - "x-taplo": { - "links": { - "key": "https://rust-lang.github.io/rustup/concepts/channels.html" - } - } - }, - "components": { - "description": "Each release of Rust includes several \"components\", some of\nwhich are required (like `rustc`) and some that are optional (like\n[`clippy`][clippy]).\n\n[clippy]: https://github.com/rust-lang/rust-clippy", - "type": "array", - "items": { - "type": "string", - "oneOf": [ - { - "enum": [ - "rustc", - "cargo", - "rustfmt", - "rust-std", - "rust-docs", - "rls", - "clippy", - "miri", - "rust-src", - "rust-analysis", - "rust-mingw", - "llvm-tools-preview", - "rustc-dev" - ], - "x-taplo": { - "docs": { - "enumValues": [ - "The Rust compiler and [Rustdoc].\n\n[rustdoc]: https://doc.rust-lang.org/rustdoc/", - "[Cargo] is a package manager and build tool.\n\n[cargo]: https://doc.rust-lang.org/cargo/", - "[Rustfmt] is a tool for automatically formatting code.\n\n[rustfmt]: https://github.com/rust-lang/rustfmt", - "This is the Rust [standard library]. There is a separate\n `rust-std` component for each target that `rustc` supports, such as\n `rust-std-x86_64-pc-windows-msvc`. See the [Cross-compilation] chapter for\n more detail.\n\n[standard library]: https://doc.rust-lang.org/std/\n[cross-compilation]: .https://rust-lang.github.io/rustup/cross-compilation.html", - "This is a local copy of the [Rust documentation]. Use the\n `rustup doc` command to open the documentation in a web browser. Run `rustup\n doc --help` for more options.\n\n[rust documentation]: https://doc.rust-lang.org/", - "[RLS] is a language server that provides support for editors and\n IDEs.\n\n[RLS]: https://github.com/rust-lang/rls", - "[Clippy] is a lint tool that provides extra checks for common\n mistakes and stylistic choices.\n\n[clippy]: https://github.com/rust-lang/rust-clippy", - "[Miri] is an experimental Rust interpreter, which can be used for\n checking for undefined-behavior.\n\n[miri]: https://github.com/rust-lang/miri/", - "This is a local copy of the source code of the Rust standard\n library. This can be used by some tools, such as [RLS], to provide\n auto-completion for functions within the standard library; [Miri] which is a\n Rust interpreter; and Cargo's experimental [build-std] feature, which allows\n you to rebuild the standard library locally.\n\n[RLS]: https://github.com/rust-lang/rls\n[miri]: https://github.com/rust-lang/miri/\n[build-std]: https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#build-std", - "Metadata about the standard library, used by tools like\n [RLS].\n\n[RLS]: https://github.com/rust-lang/rls", - "This contains a linker and platform libraries for building on\n the `x86_64-pc-windows-gnu` platform.", - "This is an experimental component which contains a\n collection of [LLVM] tools.\n\n[LLVM]: https://llvm.org/", - "This component contains the compiler as a library. Most users\n will not need this; it is only needed for development *of* tools that link\n to the compiler, such as making modifications to [Clippy].\n\n[clippy]: https://github.com/rust-lang/rust-clippy" - ] - } - } - }, - { - "$comment": "Empty schema to allow for forward compatibility of new components" - } - ] - }, - "x-taplo": { - "links": { - "key": "https://rust-lang.github.io/rustup/concepts/components.html" - } - } - }, - "targets": { - "description": "`rustc` is capable of generating code for many platforms. The\n\"target\" specifies the platform that the code will be generated for. By\ndefault, `cargo` and `rustc` use the host toolchain's platform as the\ntarget. To build for a different target, usually the target's standard\nlibrary needs to be installed first via the `rustup target` command.", - "type": "array", - "items": { - "oneOf": [ - { - "$comment": "Allow arbitary strings for new targets or custom target JSON", - "type": "string" - }, - { - "$comment": "From `rustc +nightly --print target-list`", - "enum": [ - "aarch64-apple-darwin", - "aarch64-apple-ios", - "aarch64-apple-ios-macabi", - "aarch64-apple-ios-sim", - "aarch64-apple-tvos", - "aarch64-fuchsia", - "aarch64-kmc-solid_asp3", - "aarch64-linux-android", - "aarch64-pc-windows-msvc", - "aarch64-unknown-freebsd", - "aarch64-unknown-hermit", - "aarch64-unknown-linux-gnu", - "aarch64-unknown-linux-gnu_ilp32", - "aarch64-unknown-linux-musl", - "aarch64-unknown-netbsd", - "aarch64-unknown-none", - "aarch64-unknown-none-softfloat", - "aarch64-unknown-openbsd", - "aarch64-unknown-redox", - "aarch64-unknown-uefi", - "aarch64-uwp-windows-msvc", - "aarch64-wrs-vxworks", - "aarch64_be-unknown-linux-gnu", - "aarch64_be-unknown-linux-gnu_ilp32", - "arm-linux-androideabi", - "arm-unknown-linux-gnueabi", - "arm-unknown-linux-gnueabihf", - "arm-unknown-linux-musleabi", - "arm-unknown-linux-musleabihf", - "armebv7r-none-eabi", - "armebv7r-none-eabihf", - "armv4t-unknown-linux-gnueabi", - "armv5te-unknown-linux-gnueabi", - "armv5te-unknown-linux-musleabi", - "armv5te-unknown-linux-uclibceabi", - "armv6-unknown-freebsd", - "armv6-unknown-netbsd-eabihf", - "armv6k-nintendo-3ds", - "armv7-apple-ios", - "armv7-linux-androideabi", - "armv7-unknown-freebsd", - "armv7-unknown-linux-gnueabi", - "armv7-unknown-linux-gnueabihf", - "armv7-unknown-linux-musleabi", - "armv7-unknown-linux-musleabihf", - "armv7-unknown-linux-uclibceabihf", - "armv7-unknown-netbsd-eabihf", - "armv7-wrs-vxworks-eabihf", - "armv7a-kmc-solid_asp3-eabi", - "armv7a-kmc-solid_asp3-eabihf", - "armv7a-none-eabi", - "armv7a-none-eabihf", - "armv7r-none-eabi", - "armv7r-none-eabihf", - "armv7s-apple-ios", - "asmjs-unknown-emscripten", - "avr-unknown-gnu-atmega328", - "bpfeb-unknown-none", - "bpfel-unknown-none", - "hexagon-unknown-linux-musl", - "i386-apple-ios", - "i586-pc-windows-msvc", - "i586-unknown-linux-gnu", - "i586-unknown-linux-musl", - "i686-apple-darwin", - "i686-linux-android", - "i686-pc-windows-gnu", - "i686-pc-windows-msvc", - "i686-unknown-freebsd", - "i686-unknown-haiku", - "i686-unknown-linux-gnu", - "i686-unknown-linux-musl", - "i686-unknown-netbsd", - "i686-unknown-openbsd", - "i686-unknown-uefi", - "i686-uwp-windows-gnu", - "i686-uwp-windows-msvc", - "i686-wrs-vxworks", - "m68k-unknown-linux-gnu", - "mips-unknown-linux-gnu", - "mips-unknown-linux-musl", - "mips-unknown-linux-uclibc", - "mips64-unknown-linux-gnuabi64", - "mips64-unknown-linux-muslabi64", - "mips64el-unknown-linux-gnuabi64", - "mips64el-unknown-linux-muslabi64", - "mipsel-sony-psp", - "mipsel-unknown-linux-gnu", - "mipsel-unknown-linux-musl", - "mipsel-unknown-linux-uclibc", - "mipsel-unknown-none", - "mipsisa32r6-unknown-linux-gnu", - "mipsisa32r6el-unknown-linux-gnu", - "mipsisa64r6-unknown-linux-gnuabi64", - "mipsisa64r6el-unknown-linux-gnuabi64", - "msp430-none-elf", - "nvptx64-nvidia-cuda", - "powerpc-unknown-freebsd", - "powerpc-unknown-linux-gnu", - "powerpc-unknown-linux-gnuspe", - "powerpc-unknown-linux-musl", - "powerpc-unknown-netbsd", - "powerpc-unknown-openbsd", - "powerpc-wrs-vxworks", - "powerpc-wrs-vxworks-spe", - "powerpc64-unknown-freebsd", - "powerpc64-unknown-linux-gnu", - "powerpc64-unknown-linux-musl", - "powerpc64-wrs-vxworks", - "powerpc64le-unknown-freebsd", - "powerpc64le-unknown-linux-gnu", - "powerpc64le-unknown-linux-musl", - "riscv32gc-unknown-linux-gnu", - "riscv32gc-unknown-linux-musl", - "riscv32i-unknown-none-elf", - "riscv32imac-unknown-none-elf", - "riscv32imc-esp-espidf", - "riscv32imc-unknown-none-elf", - "riscv64gc-unknown-freebsd", - "riscv64gc-unknown-linux-gnu", - "riscv64gc-unknown-linux-musl", - "riscv64gc-unknown-none-elf", - "riscv64imac-unknown-none-elf", - "s390x-unknown-linux-gnu", - "s390x-unknown-linux-musl", - "sparc-unknown-linux-gnu", - "sparc64-unknown-linux-gnu", - "sparc64-unknown-netbsd", - "sparc64-unknown-openbsd", - "sparcv9-sun-solaris", - "thumbv4t-none-eabi", - "thumbv6m-none-eabi", - "thumbv7a-pc-windows-msvc", - "thumbv7a-uwp-windows-msvc", - "thumbv7em-none-eabi", - "thumbv7em-none-eabihf", - "thumbv7m-none-eabi", - "thumbv7neon-linux-androideabi", - "thumbv7neon-unknown-linux-gnueabihf", - "thumbv7neon-unknown-linux-musleabihf", - "thumbv8m.base-none-eabi", - "thumbv8m.main-none-eabi", - "thumbv8m.main-none-eabihf", - "wasm32-unknown-emscripten", - "wasm32-unknown-unknown", - "wasm32-wasi", - "wasm64-unknown-unknown", - "x86_64-apple-darwin", - "x86_64-apple-ios", - "x86_64-apple-ios-macabi", - "x86_64-apple-tvos", - "x86_64-fortanix-unknown-sgx", - "x86_64-fuchsia", - "x86_64-linux-android", - "x86_64-pc-solaris", - "x86_64-pc-windows-gnu", - "x86_64-pc-windows-msvc", - "x86_64-sun-solaris", - "x86_64-unknown-dragonfly", - "x86_64-unknown-freebsd", - "x86_64-unknown-haiku", - "x86_64-unknown-hermit", - "x86_64-unknown-illumos", - "x86_64-unknown-l4re-uclibc", - "x86_64-unknown-linux-gnu", - "x86_64-unknown-linux-gnux32", - "x86_64-unknown-linux-musl", - "x86_64-unknown-netbsd", - "x86_64-unknown-none", - "x86_64-unknown-none-hermitkernel", - "x86_64-unknown-none-linuxkernel", - "x86_64-unknown-openbsd", - "x86_64-unknown-redox", - "x86_64-unknown-uefi", - "x86_64-uwp-windows-gnu", - "x86_64-uwp-windows-msvc", - "x86_64-wrs-vxworks" - ] - } - ] - }, - "x-taplo": { - "links": { - "key": "https://rust-lang.github.io/rustup/cross-compilation.html" - } - } - }, - "profile": { - "description": "In order to make it easier to work with components, a\n\"profile\" defines a grouping of components.", - "type": "string", - "default": "default", - "enum": [ - "minimal", - "default", - "complete" - ], - "x-taplo": { - "links": { - "key": "https://rust-lang.github.io/rustup/concepts/profiles.html" - }, - "docs": { - "enumValues": [ - "This profile includes as few components as possible to get a\nworking compiler (`rustc`, `rust-std`, and `cargo`). It's recommended to use\nthis component on Windows systems if you don't use local documentation (the\nlarge number of files can cause issues with some Antivirus systems), and in\nCI.", - "This profile includes all of components in the **minimal**\nprofile, and adds `rust-docs`, `rustfmt`, and `clippy`. This profile will be\nused by `rustup` by default, and it's the one recommended for general use.", - "This profile includes all the components available through\n`rustup`. This should never be used, as it includes *every* component ever\nincluded in the metadata and thus will almost always fail. If you are\nlooking for a way to install devtools such as `miri` or IDE integration\ntools (`rls`), you should use the `default` profile and\ninstall the needed additional components manually, either by using `rustup\ncomponent add` or by using `-c` when installing the toolchain." - ] - } - } - } - }, - "required": [ - "channel" - ] - }, - { - "properties": { - "path": { - "type": "string", - "description": "Path to a custom local toolchain. Since a `path` directive directly names a local toolchain, other options\nlike `components`, `targets`, and `profile` have no effect. `channel`\nand `path` are mutually exclusive, since a `path` already points to a\nspecific toolchain. A relative `path` is resolved relative to the\nlocation of the `rust-toolchain.toml` file." - } - }, - "required": [ - "path" - ] - } - ], - "x-taplo": { - "links": { - "key": "https://rust-lang.github.io/rustup/concepts/toolchains.html" - }, - "initKeys": [ - "channel" - ] - } - } - }, - "required": [ - "toolchain" - ] -} diff --git a/site/site/public/schemas/rustfmt.toml.json b/site/site/public/schemas/rustfmt.toml.json deleted file mode 100644 index 901f19922..000000000 --- a/site/site/public/schemas/rustfmt.toml.json +++ /dev/null @@ -1,476 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "rustfmt schema", - "type": "object", - "description": "https://rust-lang.github.io/rustfmt", - "x-taplo-info": { - "authors": ["Aloso (https://github.com/Aloso)"], - "patterns": ["^(.*(/|\\\\)\\.?rustfmt\\.toml|rustfmt\\.toml)$"] - }, - "properties": { - "array_width": { - "type": "integer", - "description": "Maximum width of an array literal before falling back to vertical formatting.\n\n[Documentation](https://rust-lang.github.io/rustfmt/#array_width)", - "default": 60 - }, - "attr_fn_like_width": { - "type": "integer", - "description": "Maximum width of the args of a function-like attributes before falling back to vertical formatting.\n\n[Documentation](https://rust-lang.github.io/rustfmt/#attr_fn_like_width)", - "default": 70 - }, - "binop_separator": { - "type": "string", - "description": "Where to put a binary operator when a binary expression goes multiline\n\n[Documentation](https://rust-lang.github.io/rustfmt/#binop_separator)\n\n### Unstable\nThis option requires Nightly Rust.", - "default": "Front", - "enum": ["Front", "Back"] - }, - "blank_lines_lower_bound": { - "type": "integer", - "description": "Minimum number of blank lines which must be put between items\n\n[Documentation](https://rust-lang.github.io/rustfmt/#blank_lines_lower_bound)\n\n### Unstable\nThis option requires Nightly Rust.", - "default": 0 - }, - "blank_lines_upper_bound": { - "type": "integer", - "description": "Maximum number of blank lines which can be put between items\n\n[Documentation](https://rust-lang.github.io/rustfmt/#blank_lines_upper_bound)\n\n### Unstable\nThis option requires Nightly Rust.", - "default": 1 - }, - "brace_style": { - "type": "string", - "description": "Brace style for items\n\n[Documentation](https://rust-lang.github.io/rustfmt/#brace_style)\n\n### Unstable\nThis option requires Nightly Rust.", - "default": "SameLineWhere", - "enum": ["AlwaysNextLine", "PreferSameLine", "SameLineWhere"] - }, - "chain_width": { - "type": "integer", - "description": "Maximum length of a chain to fit on a single line.\n\n[Documentation](https://rust-lang.github.io/rustfmt/#chain_width)", - "default": 60 - }, - "color": { - "type": "string", - "description": "What Color option to use when none is supplied: Always, Never, Auto\n\n[Documentation](https://rust-lang.github.io/rustfmt/#color)\n\n### Unstable\nThis option requires Nightly Rust.", - "default": "Auto", - "enum": ["Always", "Never", "Auto"] - }, - "combine_control_expr": { - "type": "boolean", - "description": "Combine control expressions with function calls\n\n[Documentation](https://rust-lang.github.io/rustfmt/#combine_control_expr)\n\n### Unstable\nThis option requires Nightly Rust.", - "default": true, - "enum": [true, false] - }, - "comment_width": { - "type": "integer", - "description": "Maximum length of comments. No effect unless wrap_comments = true\n\n[Documentation](https://rust-lang.github.io/rustfmt/#comment_width)\n\n### Unstable\nThis option requires Nightly Rust.", - "default": 80 - }, - "condense_wildcard_suffixes": { - "type": "boolean", - "description": "Replace strings of _ wildcards by a single .. in tuple patterns\n\n[Documentation](https://rust-lang.github.io/rustfmt/#condense_wildcard_suffixes)\n\n### Unstable\nThis option requires Nightly Rust.", - "default": false, - "enum": [true, false] - }, - "control_brace_style": { - "type": "string", - "description": "Brace style for control flow constructs\n\n[Documentation](https://rust-lang.github.io/rustfmt/#control_brace_style)\n\n### Unstable\nThis option requires Nightly Rust.", - "default": "AlwaysSameLine", - "enum": ["AlwaysSameLine", "ClosingNextLine", "AlwaysNextLine"] - }, - "disable_all_formatting": { - "type": "boolean", - "description": "Don't reformat anything\n\n[Documentation](https://rust-lang.github.io/rustfmt/#disable_all_formatting)", - "default": false, - "enum": [true, false] - }, - "edition": { - "type": "string", - "description": "The edition of the parser (RFC 2052)\n\n[Documentation](https://rust-lang.github.io/rustfmt/#edition)", - "default": "2015", - "enum": ["2015", "2018", "2021"] - }, - "emit_mode": { - "type": "string", - "description": "What emit Mode to use when none is supplied\n\n[Documentation](https://rust-lang.github.io/rustfmt/#emit_mode)\n\n### Unstable\nThis option requires Nightly Rust.", - "default": "Files", - "enum": [ - "Files", - "Stdout", - "Coverage", - "Checkstyle", - "Json", - "ModifiedLines", - "Diff" - ] - }, - "empty_item_single_line": { - "type": "boolean", - "description": "Put empty-body functions and impls on a single line\n\n[Documentation](https://rust-lang.github.io/rustfmt/#empty_item_single_line)\n\n### Unstable\nThis option requires Nightly Rust.", - "default": true, - "enum": [true, false] - }, - "enum_discrim_align_threshold": { - "type": "integer", - "description": "Align enum variants discrims, if their diffs fit within threshold\n\n[Documentation](https://rust-lang.github.io/rustfmt/#enum_discrim_align_threshold)\n\n### Unstable\nThis option requires Nightly Rust.", - "default": 0 - }, - "error_on_line_overflow": { - "type": "boolean", - "description": "Error if unable to get all lines within max_width\n\n[Documentation](https://rust-lang.github.io/rustfmt/#error_on_line_overflow)\n\n### Unstable\nThis option requires Nightly Rust.", - "default": false, - "enum": [true, false] - }, - "error_on_unformatted": { - "type": "boolean", - "description": "Error if unable to get comments or string literals within max_width, or they are left with trailing whitespaces\n\n[Documentation](https://rust-lang.github.io/rustfmt/#error_on_unformatted)\n\n### Unstable\nThis option requires Nightly Rust.", - "default": false, - "enum": [true, false] - }, - "fn_args_layout": { - "type": "string", - "description": "Control the layout of arguments in a function\n\n[Documentation](https://rust-lang.github.io/rustfmt/#fn_args_layout)", - "default": "Tall", - "enum": ["Compressed", "Tall", "Vertical"] - }, - "fn_call_width": { - "type": "integer", - "description": "Maximum width of the args of a function call before falling back to vertical formatting.\n\n[Documentation](https://rust-lang.github.io/rustfmt/#fn_call_width)", - "default": 60 - }, - "fn_single_line": { - "type": "boolean", - "description": "Put single-expression functions on a single line\n\n[Documentation](https://rust-lang.github.io/rustfmt/#fn_single_line)\n\n### Unstable\nThis option requires Nightly Rust.", - "default": false, - "enum": [true, false] - }, - "force_explicit_abi": { - "type": "boolean", - "description": "Always print the abi for extern items\n\n[Documentation](https://rust-lang.github.io/rustfmt/#force_explicit_abi)", - "default": true, - "enum": [true, false] - }, - "force_multiline_blocks": { - "type": "boolean", - "description": "Force multiline closure bodies and match arms to be wrapped in a block\n\n[Documentation](https://rust-lang.github.io/rustfmt/#force_multiline_blocks)\n\n### Unstable\nThis option requires Nightly Rust.", - "default": false, - "enum": [true, false] - }, - "format_code_in_doc_comments": { - "type": "boolean", - "description": "Format the code snippet in doc comments.\n\n[Documentation](https://rust-lang.github.io/rustfmt/#format_code_in_doc_comments)\n\n### Unstable\nThis option requires Nightly Rust.", - "default": false, - "enum": [true, false] - }, - "format_generated_files": { - "type": "boolean", - "description": "Format generated files\n\n[Documentation](https://rust-lang.github.io/rustfmt/#format_generated_files)\n\n### Unstable\nThis option requires Nightly Rust.", - "default": true, - "enum": [true, false] - }, - "format_macro_bodies": { - "type": "boolean", - "description": "Format the bodies of macros\n\n[Documentation](https://rust-lang.github.io/rustfmt/#format_macro_bodies)\n\n### Unstable\nThis option requires Nightly Rust.", - "default": true, - "enum": [true, false] - }, - "format_macro_matchers": { - "type": "boolean", - "description": "Format the metavariable matching patterns in macros\n\n[Documentation](https://rust-lang.github.io/rustfmt/#format_macro_matchers)\n\n### Unstable\nThis option requires Nightly Rust.", - "default": false, - "enum": [true, false] - }, - "format_strings": { - "type": "boolean", - "description": "Format string literals where necessary\n\n[Documentation](https://rust-lang.github.io/rustfmt/#format_strings)\n\n### Unstable\nThis option requires Nightly Rust.", - "default": false, - "enum": [true, false] - }, - "group_imports": { - "type": "string", - "description": "Controls the strategy for how imports are grouped together\n\n[Documentation](https://rust-lang.github.io/rustfmt/#group_imports)\n\n### Unstable\nThis option requires Nightly Rust.", - "default": "Preserve", - "enum": ["Preserve", "StdExternalCrate", "One"] - }, - "hard_tabs": { - "type": "boolean", - "description": "Use tab characters for indentation, spaces for alignment\n\n[Documentation](https://rust-lang.github.io/rustfmt/#hard_tabs)", - "default": false, - "enum": [true, false] - }, - "hex_literal_case": { - "type": "string", - "description": "Format hexadecimal integer literals\n\n[Documentation](https://rust-lang.github.io/rustfmt/#hex_literal_case)\n\n### Unstable\nThis option requires Nightly Rust.", - "default": "Preserve", - "enum": ["Preserve", "Upper", "Lower"] - }, - "hide_parse_errors": { - "type": "boolean", - "description": "Hide errors from the parser\n\n[Documentation](https://rust-lang.github.io/rustfmt/#hide_parse_errors)\n\n### Unstable\nThis option requires Nightly Rust.", - "default": false, - "enum": [true, false] - }, - "ignore": { - "type": "array", - "description": "Skip formatting the specified files and directories\n\n[Documentation](https://rust-lang.github.io/rustfmt/#ignore)\n\n### Unstable\nThis option requires Nightly Rust.", - "default": [] - }, - "imports_granularity": { - "type": "string", - "description": "Merge or split imports to the provided granularity\n\n[Documentation](https://rust-lang.github.io/rustfmt/#imports_granularity)\n\n### Unstable\nThis option requires Nightly Rust.", - "default": "Preserve", - "enum": ["Preserve", "Crate", "Module", "Item", "One"] - }, - "imports_indent": { - "type": "string", - "description": "Indent of imports\n\n[Documentation](https://rust-lang.github.io/rustfmt/#imports_indent)\n\n### Unstable\nThis option requires Nightly Rust.", - "default": "Block", - "enum": ["Visual", "Block"] - }, - "imports_layout": { - "type": "string", - "description": "Item layout inside a import block\n\n[Documentation](https://rust-lang.github.io/rustfmt/#imports_layout)\n\n### Unstable\nThis option requires Nightly Rust.", - "default": "Mixed", - "enum": [ - "Vertical", - "Horizontal", - "HorizontalVertical", - "LimitedHorizontalVertical", - "Mixed" - ] - }, - "indent_style": { - "type": "string", - "description": "How do we indent expressions or items\n\n[Documentation](https://rust-lang.github.io/rustfmt/#indent_style)\n\n### Unstable\nThis option requires Nightly Rust.", - "default": "Block", - "enum": ["Visual", "Block"] - }, - "inline_attribute_width": { - "type": "integer", - "description": "Write an item and its attribute on the same line if their combined width is below a threshold\n\n[Documentation](https://rust-lang.github.io/rustfmt/#inline_attribute_width)\n\n### Unstable\nThis option requires Nightly Rust.", - "default": 0 - }, - "license_template_path": { - "type": "string", - "description": "Beginning of file must match license template\n\n[Documentation](https://rust-lang.github.io/rustfmt/#license_template_path)\n\n### Unstable\nThis option requires Nightly Rust.", - "default": "\"\"" - }, - "make_backup": { - "type": "boolean", - "description": "Backup changed files\n\n[Documentation](https://rust-lang.github.io/rustfmt/#make_backup)\n\n### Unstable\nThis option requires Nightly Rust.", - "default": false, - "enum": [true, false] - }, - "match_arm_blocks": { - "type": "boolean", - "description": "Wrap the body of arms in blocks when it does not fit on the same line with the pattern of arms\n\n[Documentation](https://rust-lang.github.io/rustfmt/#match_arm_blocks)\n\n### Unstable\nThis option requires Nightly Rust.", - "default": true, - "enum": [true, false] - }, - "match_arm_leading_pipes": { - "type": "string", - "description": "Determines whether leading pipes are emitted on match arms\n\n[Documentation](https://rust-lang.github.io/rustfmt/#match_arm_leading_pipes)", - "default": "Never", - "enum": ["Always", "Never", "Preserve"] - }, - "match_block_trailing_comma": { - "type": "boolean", - "description": "Put a trailing comma after a block based match arm (non-block arms are not affected)\n\n[Documentation](https://rust-lang.github.io/rustfmt/#match_block_trailing_comma)", - "default": false, - "enum": [true, false] - }, - "max_width": { - "type": "integer", - "description": "Maximum width of each line\n\n[Documentation](https://rust-lang.github.io/rustfmt/#max_width)", - "default": 100 - }, - "merge_derives": { - "type": "boolean", - "description": "Merge multiple `#[derive(...)]` into a single one\n\n[Documentation](https://rust-lang.github.io/rustfmt/#merge_derives)", - "default": true, - "enum": [true, false] - }, - "newline_style": { - "type": "string", - "description": "Unix or Windows line endings\n\n[Documentation](https://rust-lang.github.io/rustfmt/#newline_style)", - "default": "Auto", - "enum": ["Auto", "Windows", "Unix", "Native"] - }, - "normalize_comments": { - "type": "boolean", - "description": "Convert /* */ comments to // comments where possible\n\n[Documentation](https://rust-lang.github.io/rustfmt/#normalize_comments)\n\n### Unstable\nThis option requires Nightly Rust.", - "default": false, - "enum": [true, false] - }, - "normalize_doc_attributes": { - "type": "boolean", - "description": "Normalize doc attributes as doc comments\n\n[Documentation](https://rust-lang.github.io/rustfmt/#normalize_doc_attributes)\n\n### Unstable\nThis option requires Nightly Rust.", - "default": false, - "enum": [true, false] - }, - "overflow_delimited_expr": { - "type": "boolean", - "description": "Allow trailing bracket/brace delimited expressions to overflow\n\n[Documentation](https://rust-lang.github.io/rustfmt/#overflow_delimited_expr)\n\n### Unstable\nThis option requires Nightly Rust.", - "default": false, - "enum": [true, false] - }, - "print_misformatted_file_names": { - "type": "boolean", - "description": "Prints the names of mismatched files that were formatted. Prints the names of files that would be formated when used with `--check` mode.\n\n[Documentation](https://rust-lang.github.io/rustfmt/#print_misformatted_file_names)", - "default": false, - "enum": [true, false] - }, - "remove_nested_parens": { - "type": "boolean", - "description": "Remove nested parens\n\n[Documentation](https://rust-lang.github.io/rustfmt/#remove_nested_parens)", - "default": true, - "enum": [true, false] - }, - "reorder_impl_items": { - "type": "boolean", - "description": "Reorder impl items\n\n[Documentation](https://rust-lang.github.io/rustfmt/#reorder_impl_items)\n\n### Unstable\nThis option requires Nightly Rust.", - "default": false, - "enum": [true, false] - }, - "reorder_imports": { - "type": "boolean", - "description": "Reorder import and extern crate statements alphabetically\n\n[Documentation](https://rust-lang.github.io/rustfmt/#reorder_imports)", - "default": true, - "enum": [true, false] - }, - "reorder_modules": { - "type": "boolean", - "description": "Reorder module statements alphabetically in group\n\n[Documentation](https://rust-lang.github.io/rustfmt/#reorder_modules)", - "default": true, - "enum": [true, false] - }, - "report_fixme": { - "type": "string", - "description": "Report all, none or unnumbered occurrences of FIXME in source file comments\n\n[Documentation](https://rust-lang.github.io/rustfmt/#report_fixme)\n\n### Unstable\nThis option requires Nightly Rust.", - "default": "Never", - "enum": ["Always", "Unnumbered", "Never"] - }, - "report_todo": { - "type": "string", - "description": "Report all, none or unnumbered occurrences of TODO in source file comments\n\n[Documentation](https://rust-lang.github.io/rustfmt/#report_todo)\n\n### Unstable\nThis option requires Nightly Rust.", - "default": "Never", - "enum": ["Always", "Unnumbered", "Never"] - }, - "required_version": { - "type": "string", - "description": "Require a specific version of rustfmt\n\n[Documentation](https://rust-lang.github.io/rustfmt/#required_version)\n\n### Unstable\nThis option requires Nightly Rust.", - "default": "1.4.38" - }, - "single_line_if_else_max_width": { - "type": "integer", - "description": "Maximum line length for single line if-else expressions. A value of zero means always break if-else expressions.\n\n[Documentation](https://rust-lang.github.io/rustfmt/#single_line_if_else_max_width)", - "default": 50 - }, - "skip_children": { - "type": "boolean", - "description": "Don't reformat out of line modules\n\n[Documentation](https://rust-lang.github.io/rustfmt/#skip_children)\n\n### Unstable\nThis option requires Nightly Rust.", - "default": false, - "enum": [true, false] - }, - "space_after_colon": { - "type": "boolean", - "description": "Leave a space after the colon\n\n[Documentation](https://rust-lang.github.io/rustfmt/#space_after_colon)\n\n### Unstable\nThis option requires Nightly Rust.", - "default": true, - "enum": [true, false] - }, - "space_before_colon": { - "type": "boolean", - "description": "Leave a space before the colon\n\n[Documentation](https://rust-lang.github.io/rustfmt/#space_before_colon)\n\n### Unstable\nThis option requires Nightly Rust.", - "default": false, - "enum": [true, false] - }, - "spaces_around_ranges": { - "type": "boolean", - "description": "Put spaces around the .. and ..= range operators\n\n[Documentation](https://rust-lang.github.io/rustfmt/#spaces_around_ranges)\n\n### Unstable\nThis option requires Nightly Rust.", - "default": false, - "enum": [true, false] - }, - "struct_field_align_threshold": { - "type": "integer", - "description": "Align struct fields if their diffs fits within threshold\n\n[Documentation](https://rust-lang.github.io/rustfmt/#struct_field_align_threshold)\n\n### Unstable\nThis option requires Nightly Rust.", - "default": 0 - }, - "struct_lit_single_line": { - "type": "boolean", - "description": "Put small struct literals on a single line\n\n[Documentation](https://rust-lang.github.io/rustfmt/#struct_lit_single_line)\n\n### Unstable\nThis option requires Nightly Rust.", - "default": true, - "enum": [true, false] - }, - "struct_lit_width": { - "type": "integer", - "description": "Maximum width in the body of a struct lit before falling back to vertical formatting.\n\n[Documentation](https://rust-lang.github.io/rustfmt/#struct_lit_width)", - "default": 18 - }, - "struct_variant_width": { - "type": "integer", - "description": "Maximum width in the body of a struct variant before falling back to vertical formatting.\n\n[Documentation](https://rust-lang.github.io/rustfmt/#struct_variant_width)", - "default": 35 - }, - "tab_spaces": { - "type": "integer", - "description": "Number of spaces per tab\n\n[Documentation](https://rust-lang.github.io/rustfmt/#tab_spaces)", - "default": 4 - }, - "trailing_comma": { - "type": "string", - "description": "How to handle trailing commas for lists\n\n[Documentation](https://rust-lang.github.io/rustfmt/#trailing_comma)\n\n### Unstable\nThis option requires Nightly Rust.", - "default": "Vertical", - "enum": ["Always", "Never", "Vertical"] - }, - "trailing_semicolon": { - "type": "boolean", - "description": "Add trailing semicolon after break, continue and return\n\n[Documentation](https://rust-lang.github.io/rustfmt/#trailing_semicolon)\n\n### Unstable\nThis option requires Nightly Rust.", - "default": true, - "enum": [true, false] - }, - "type_punctuation_density": { - "type": "string", - "description": "Determines if '+' or '=' are wrapped in spaces in the punctuation of types\n\n[Documentation](https://rust-lang.github.io/rustfmt/#type_punctuation_density)\n\n### Unstable\nThis option requires Nightly Rust.", - "default": "Wide", - "enum": ["Compressed", "Wide"] - }, - "unstable_features": { - "type": "boolean", - "description": "Enables unstable features. Only available on nightly channel\n\n[Documentation](https://rust-lang.github.io/rustfmt/#unstable_features)\n\n### Unstable\nThis option requires Nightly Rust.", - "default": false, - "enum": [true, false] - }, - "use_field_init_shorthand": { - "type": "boolean", - "description": "Use field initialization shorthand if possible\n\n[Documentation](https://rust-lang.github.io/rustfmt/#use_field_init_shorthand)", - "default": false, - "enum": [true, false] - }, - "use_small_heuristics": { - "type": "string", - "description": "Whether to use different formatting for items and expressions if they satisfy a heuristic notion of 'small'\n\n[Documentation](https://rust-lang.github.io/rustfmt/#use_small_heuristics)", - "default": "Default", - "enum": ["Off", "Max", "Default"] - }, - "use_try_shorthand": { - "type": "boolean", - "description": "Replace uses of the try! macro by the ? shorthand\n\n[Documentation](https://rust-lang.github.io/rustfmt/#use_try_shorthand)", - "default": false, - "enum": [true, false] - }, - "version": { - "type": "string", - "description": "Version of formatting rules\n\n[Documentation](https://rust-lang.github.io/rustfmt/#version)\n\n### Unstable\nThis option requires Nightly Rust.", - "default": "One", - "enum": ["One", "Two"] - }, - "where_single_line": { - "type": "boolean", - "description": "Force where-clauses to be on a single line\n\n[Documentation](https://rust-lang.github.io/rustfmt/#where_single_line)\n\n### Unstable\nThis option requires Nightly Rust.", - "default": false, - "enum": [true, false] - }, - "wrap_comments": { - "type": "boolean", - "description": "Break comments to fit on the line\n\n[Documentation](https://rust-lang.github.io/rustfmt/#wrap_comments)\n\n### Unstable\nThis option requires Nightly Rust.", - "default": false, - "enum": [true, false] - } - } -} From fd36c66ca89082ec858e24def1736578aaae525e Mon Sep 17 00:00:00 2001 From: Jakub Panek Date: Fri, 28 Feb 2025 22:18:02 +0100 Subject: [PATCH 03/13] fix clippy warnings --- crates/taplo-cli/src/commands/lint.rs | 2 +- crates/taplo-cli/src/commands/toml_test.rs | 2 +- crates/taplo-common/src/config.rs | 2 +- crates/taplo-common/src/schema/mod.rs | 6 ++--- crates/taplo-common/src/util.rs | 10 +++---- crates/taplo-lsp/src/handlers/completion.rs | 17 ++++-------- crates/taplo-lsp/src/handlers/hover.rs | 12 ++------- .../taplo-lsp/src/handlers/semantic_tokens.rs | 4 +-- crates/taplo-lsp/src/query.rs | 27 +++++++------------ crates/taplo-wasm/src/environment.rs | 24 ++--------------- crates/taplo/src/dom/index.rs | 4 +-- crates/taplo/src/dom/node.rs | 2 +- crates/taplo/src/parser/mod.rs | 2 +- crates/taplo/src/util/shared.rs | 2 +- 14 files changed, 36 insertions(+), 80 deletions(-) diff --git a/crates/taplo-cli/src/commands/lint.rs b/crates/taplo-cli/src/commands/lint.rs index 003843058..8db2b81b1 100644 --- a/crates/taplo-cli/src/commands/lint.rs +++ b/crates/taplo-cli/src/commands/lint.rs @@ -53,7 +53,7 @@ impl Taplo { } } - if matches!(cmd.files.get(0).map(|it| it.as_str()), Some("-")) { + if matches!(cmd.files.first().map(|it| it.as_str()), Some("-")) { self.lint_stdin(cmd).await } else { self.lint_files(cmd).await diff --git a/crates/taplo-cli/src/commands/toml_test.rs b/crates/taplo-cli/src/commands/toml_test.rs index 3fa514861..a76506a28 100644 --- a/crates/taplo-cli/src/commands/toml_test.rs +++ b/crates/taplo-cli/src/commands/toml_test.rs @@ -90,7 +90,7 @@ impl<'a> TomlTestValue<'a> { } } -impl<'a> Serialize for TomlTestValue<'a> { +impl Serialize for TomlTestValue<'_> { fn serialize(&self, serializer: S) -> Result where S: serde::Serializer, diff --git a/crates/taplo-common/src/config.rs b/crates/taplo-common/src/config.rs index 730a17a33..24289debe 100644 --- a/crates/taplo-common/src/config.rs +++ b/crates/taplo-common/src/config.rs @@ -129,7 +129,7 @@ impl Config { pub fn format_scopes<'s>( &'s self, path: &'s Path, - ) -> impl Iterator + Clone + 's { + ) -> impl Iterator + Clone + 's { self.rules_for(path) .filter_map(|rule| match (&rule.keys, &rule.options.formatting) { (Some(keys), Some(opts)) => Some(keys.iter().map(move |k| (k, opts.clone()))), diff --git a/crates/taplo-common/src/schema/mod.rs b/crates/taplo-common/src/schema/mod.rs index 96e204377..a4c0282e8 100644 --- a/crates/taplo-common/src/schema/mod.rs +++ b/crates/taplo-common/src/schema/mod.rs @@ -716,21 +716,21 @@ impl NodeValidationError { Ok(Self { keys, node, error }) } + #[must_use] pub fn text_ranges(&self) -> Box + '_> { match self.error.kind { ValidationErrorKind::AdditionalProperties { .. } => { let include_children = false; if self.keys.is_empty() { - return Box::new(self.node.text_ranges(include_children).into_iter()); + return Box::new(self.node.text_ranges(include_children)); } Box::new( self.keys .clone() .into_iter() - .map(move |key| self.node.get(key).text_ranges(include_children)) - .flatten(), + .flat_map(move |key| self.node.get(key).text_ranges(include_children)), ) } _ => Box::new(self.node.text_ranges(true)), diff --git a/crates/taplo-common/src/util.rs b/crates/taplo-common/src/util.rs index 39837c2d2..7c12ab1d6 100644 --- a/crates/taplo-common/src/util.rs +++ b/crates/taplo-common/src/util.rs @@ -62,13 +62,13 @@ impl PartialEq for ArcHashValue { #[derive(Eq)] pub struct HashValue<'v>(pub &'v Value); -impl<'v> PartialEq for HashValue<'v> { +impl PartialEq for HashValue<'_> { fn eq(&self, other: &Self) -> bool { self.0 == other.0 } } -impl<'v> Hash for HashValue<'v> { +impl Hash for HashValue<'_> { fn hash(&self, state: &mut H) { match &self.0 { Value::Null => 0.hash(state), @@ -126,10 +126,10 @@ pub fn get_reqwest_client(timeout: std::time::Duration) -> Result reqwest::ClientBuilder { fn get_cert(path: &Path) -> Result { - let is_der = path.extension().map_or(false, |ext| ext == "der"); + let is_der = path.extension().is_some_and(|ext| ext == "der"); let buf = std::fs::read(path)?; tracing::info!( "Found a custom CA {}. Reading the CA...", @@ -164,7 +164,7 @@ pub fn get_reqwest_client(timeout: std::time::Duration) -> Result( || s["type"] == "object" || s["type"] .as_array() - .map_or(false, |arr| arr.iter().any(|v| v == "object")) + .is_some_and(|arr| arr.iter().any(|v| v == "object")) }) }) { Ok(s) => s, @@ -113,8 +113,7 @@ pub async fn completion( .filter(|(full_key, _, _)| match doc.dom.path(full_key) { Some(n) => { node.0 == *full_key - || n.as_table() - .map_or(false, |t| t.kind() == TableKind::Pseudo) + || n.as_table().is_some_and(|t| t.kind() == TableKind::Pseudo) } None => true, }) @@ -209,9 +208,7 @@ pub async fn completion( .into_iter() // Filter out existing items. .filter(|(full_key, _, _)| match doc.dom.path(full_key) { - Some(n) => n - .as_table() - .map_or(false, |t| t.kind() == TableKind::Pseudo), + Some(n) => n.as_table().is_some_and(|t| t.kind() == TableKind::Pseudo), None => true, }) .map(|(_, relative_keys, schema)| CompletionItem { @@ -318,9 +315,7 @@ pub async fn completion( .into_iter() // Filter out existing items. .filter(|(full_key, _, _)| match doc.dom.path(full_key) { - Some(n) => n - .as_table() - .map_or(false, |t| t.kind() == TableKind::Pseudo), + Some(n) => n.as_table().is_some_and(|t| t.kind() == TableKind::Pseudo), None => true, }) .map(|(_, relative_keys, schema)| CompletionItem { @@ -418,9 +413,7 @@ pub async fn completion( .into_iter() // Filter out existing items. .filter(|(full_key, _, _)| match doc.dom.path(full_key) { - Some(n) => n - .as_table() - .map_or(false, |t| t.kind() == TableKind::Pseudo), + Some(n) => n.as_table().is_some_and(|t| t.kind() == TableKind::Pseudo), None => true, }) .map(|(_, relative_keys, schema)| CompletionItem { diff --git a/crates/taplo-lsp/src/handlers/hover.rs b/crates/taplo-lsp/src/handlers/hover.rs index 48d80ba2b..c861a378e 100644 --- a/crates/taplo-lsp/src/handlers/hover.rs +++ b/crates/taplo-lsp/src/handlers/hover.rs @@ -142,11 +142,7 @@ pub(crate) async fn hover( s += desc; } - let link_title = if let Some(s) = schema["title"].as_str() { - s - } else { - "..." - }; + let link_title = schema["title"].as_str().unwrap_or("..."); if links_in_hover { if let Some(link) = &ext_links.key { @@ -212,11 +208,7 @@ pub(crate) async fn hover( if let Some(enum_docs) = enum_docs.get(idx).cloned().flatten() { if links_in_hover { let link_title = - if let Some(s) = schema["title"].as_str() { - s - } else { - "..." - }; + schema["title"].as_str().unwrap_or("..."); if let Some(enum_link) = enum_links.get(idx).and_then(Option::as_ref) diff --git a/crates/taplo-lsp/src/handlers/semantic_tokens.rs b/crates/taplo-lsp/src/handlers/semantic_tokens.rs index 182870844..544883b36 100644 --- a/crates/taplo-lsp/src/handlers/semantic_tokens.rs +++ b/crates/taplo-lsp/src/handlers/semantic_tokens.rs @@ -86,7 +86,7 @@ pub fn create_tokens(syntax: &SyntaxNode, mapper: &Mapper) -> Vec .parent() .and_then(|p| p.next_sibling()) .and_then(|t| t.first_child()) - .map_or(false, |t| t.kind() == INLINE_TABLE); + .is_some_and(|t| t.kind() == INLINE_TABLE); if is_table_key { builder.add_token(&token, TokenType::TomlTableKey, &[]); @@ -98,7 +98,7 @@ pub fn create_tokens(syntax: &SyntaxNode, mapper: &Mapper) -> Vec .parent() .and_then(|p| p.next_sibling()) .and_then(|t| t.first_child()) - .map_or(false, |t| t.kind() == ARRAY); + .is_some_and(|t| t.kind() == ARRAY); if is_array_key { builder.add_token(&token, TokenType::TomlArrayKey, &[]); diff --git a/crates/taplo-lsp/src/query.rs b/crates/taplo-lsp/src/query.rs index e7d8aa19d..75c25136d 100644 --- a/crates/taplo-lsp/src/query.rs +++ b/crates/taplo-lsp/src/query.rs @@ -167,13 +167,10 @@ impl Query { pub fn header_key(&self) -> Option { match (&self.before, &self.after) { (Some(before), _) => { - let Some(header_syntax) = before + let header_syntax = before .syntax .parent_ancestors() - .find(|s| matches!(s.kind(), TABLE_ARRAY_HEADER | TABLE_HEADER)) - else { - return None; - }; + .find(|s| matches!(s.kind(), TABLE_ARRAY_HEADER | TABLE_HEADER))?; header_syntax.descendants().find(|n| n.kind() == KEY) } @@ -188,13 +185,10 @@ impl Query { None => return None, }; - let Some(keys) = syntax + let keys = syntax .parent_ancestors() .find(|n| n.kind() == ENTRY) - .and_then(|entry| entry.children().find(|c| c.kind() == KEY)) - else { - return None; - }; + .and_then(|entry| entry.children().find(|c| c.kind() == KEY))?; Some(keys) } @@ -206,13 +200,10 @@ impl Query { None => return None, }; - let Some(value) = syntax + let value = syntax .parent_ancestors() .find(|n| n.kind() == ENTRY) - .and_then(|entry| entry.children().find(|c| c.kind() == VALUE)) - else { - return None; - }; + .and_then(|entry| entry.children().find(|c| c.kind() == VALUE))?; Some(value) } @@ -294,7 +285,7 @@ impl Query { #[must_use] pub fn in_entry_keys(&self) -> bool { self.entry_key() - .map_or(false, |k| k.text_range().contains(self.offset)) + .is_some_and(|k| k.text_range().contains(self.offset)) } #[must_use] @@ -318,7 +309,7 @@ impl Query { let in_value = self .entry_value() // We are inside the value even if the cursor is right after it. - .map_or(false, |k| k.text_range().contains_inclusive(self.offset)); + .is_some_and(|k| k.text_range().contains_inclusive(self.offset)); if in_value { return true; @@ -341,7 +332,7 @@ impl Query { #[must_use] pub fn is_single_quote_value(&self) -> bool { - self.entry_value().map_or(false, |v| { + self.entry_value().is_some_and(|v| { v.descendants_with_tokens() .any(|t| matches!(t.kind(), STRING_LITERAL | MULTI_LINE_STRING_LITERAL)) }) diff --git a/crates/taplo-wasm/src/environment.rs b/crates/taplo-wasm/src/environment.rs index 304dbf46a..da40f90dc 100644 --- a/crates/taplo-wasm/src/environment.rs +++ b/crates/taplo-wasm/src/environment.rs @@ -43,17 +43,7 @@ impl AsyncRead for JsAsyncRead { } }; - let promise = match Promise::try_from(ret) { - Ok(p) => p, - Err(err) => { - return Poll::Ready(Err(io::Error::new( - io::ErrorKind::Other, - format!("{:?}", err), - ))); - } - }; - - self.fut = Some(JsFuture::from(promise)); + self.fut = Some(JsFuture::from(Promise::from(ret))); } if let Some(fut) = self.fut.as_mut() { @@ -113,17 +103,7 @@ impl AsyncWrite for JsAsyncWrite { } }; - let promise = match Promise::try_from(ret) { - Ok(p) => p, - Err(err) => { - return Poll::Ready(Err(io::Error::new( - io::ErrorKind::Other, - format!("{:?}", err), - ))); - } - }; - - self.fut = Some(JsFuture::from(promise)); + self.fut = Some(JsFuture::from(Promise::from(ret))); } if let Some(fut) = self.fut.as_mut() { diff --git a/crates/taplo/src/dom/index.rs b/crates/taplo/src/dom/index.rs index 8be514e29..ddc576e8c 100644 --- a/crates/taplo/src/dom/index.rs +++ b/crates/taplo/src/dom/index.rs @@ -50,8 +50,8 @@ impl Index for String { } } -impl<'a, T> Sealed for &'a T where T: ?Sized + Sealed {} -impl<'a, T> Index for &'a T +impl Sealed for &T where T: ?Sized + Sealed {} +impl Index for &T where T: ?Sized + Index, { diff --git a/crates/taplo/src/dom/node.rs b/crates/taplo/src/dom/node.rs index 5ef2a6366..7741228df 100644 --- a/crates/taplo/src/dom/node.rs +++ b/crates/taplo/src/dom/node.rs @@ -180,7 +180,7 @@ impl Node { &self, keys: Keys, include_children: bool, - ) -> Result + ExactSizeIterator, Error> { + ) -> Result, Error> { let mut all = self.flat_iter_impl(); let mut err: Option = None; diff --git a/crates/taplo/src/parser/mod.rs b/crates/taplo/src/parser/mod.rs index 65e8afe57..987a2e3ef 100644 --- a/crates/taplo/src/parser/mod.rs +++ b/crates/taplo/src/parser/mod.rs @@ -74,7 +74,7 @@ pub(crate) struct Parser<'p> { errors: Vec, } -impl<'p> Parser<'p> { +impl Parser<'_> { /// Required for patch syntax /// and key matches. /// diff --git a/crates/taplo/src/util/shared.rs b/crates/taplo/src/util/shared.rs index 0c125796d..1a28ab749 100644 --- a/crates/taplo/src/util/shared.rs +++ b/crates/taplo/src/util/shared.rs @@ -53,7 +53,7 @@ where } pub(crate) fn update(&self, f: impl FnOnce(&mut T)) { - let mut inner = self.0.load_full().take().unwrap(); + let mut inner = self.0.load_full().unwrap(); f(Arc::make_mut(&mut inner)); self.0.store(Some(inner)) } From cda3e6db52840f32c15c371912807d415445fe01 Mon Sep 17 00:00:00 2001 From: MichiRecRoom <1008889+LikeLakers2@users.noreply.github.com> Date: Sat, 21 Sep 2024 14:17:00 -0400 Subject: [PATCH 04/13] `total_len` already appears to be in bytes ...so there's no need to get that slice of `remainder`, convert it to `&[u8]`, and get the length of that. closes #681 --- crates/taplo/src/syntax.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/crates/taplo/src/syntax.rs b/crates/taplo/src/syntax.rs index 036ecf2a9..bae4279d2 100644 --- a/crates/taplo/src/syntax.rs +++ b/crates/taplo/src/syntax.rs @@ -141,7 +141,7 @@ fn lex_string(lex: &mut Lexer) -> bool { } if c == '"' && !escaped { - lex.bump(remainder[0..total_len].as_bytes().len()); + lex.bump(total_len); return true; } @@ -171,7 +171,7 @@ fn lex_multi_line_string(lex: &mut Lexer) -> bool { return false; } - lex.bump(remainder[0..total_len].as_bytes().len()); + lex.bump(total_len); return true; } else { quote_count += 1; @@ -205,7 +205,7 @@ fn lex_multi_line_string(lex: &mut Lexer) -> bool { return false; } - lex.bump(remainder[0..total_len].as_bytes().len()); + lex.bump(total_len); true } else { false @@ -220,7 +220,7 @@ fn lex_string_literal(lex: &mut Lexer) -> bool { total_len += c.len_utf8(); if c == '\'' { - lex.bump(remainder[0..total_len].as_bytes().len()); + lex.bump(total_len); return true; } } @@ -242,7 +242,7 @@ fn lex_multi_line_string_literal(lex: &mut Lexer) -> bool { for c in remainder.chars() { if quotes_found { if c != '\'' { - lex.bump(remainder[0..total_len].as_bytes().len()); + lex.bump(total_len); return true; } else { if quote_count > 4 { @@ -269,7 +269,7 @@ fn lex_multi_line_string_literal(lex: &mut Lexer) -> bool { // End of input if quotes_found { - lex.bump(remainder[0..total_len].as_bytes().len()); + lex.bump(total_len); true } else { false From b66bff2a7a09f2902003bef790b632d17f359de4 Mon Sep 17 00:00:00 2001 From: Jakub Panek Date: Fri, 28 Feb 2025 22:29:14 +0100 Subject: [PATCH 05/13] fix wasm_bindgen unexpected cfg --- Cargo.lock | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c1857b71c..034341bab 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1877,6 +1877,12 @@ dependencies = [ "untrusted", ] +[[package]] +name = "rustversion" +version = "1.0.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7c45b9784283f1b2e7fb61b42047c2fd678ef0960d4f6f1eba131594cc369d4" + [[package]] name = "ryu" version = "1.0.16" @@ -2756,24 +2762,24 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.95" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "128d1e363af62632b8eb57219c8fd7877144af57558fb2ef0368d0087bddeb2e" +checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" dependencies = [ "cfg-if", "once_cell", + "rustversion", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.95" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb6dd4d3ca0ddffd1dd1c9c04f94b868c37ff5fac97c30b97cff2d74fce3a358" +checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6" dependencies = [ "bumpalo", "log", - "once_cell", "proc-macro2", "quote", "syn 2.0.48", @@ -2794,9 +2800,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.95" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e79384be7f8f5a9dd5d7167216f022090cf1f9ec128e6e6a482a2cb5c5422c56" +checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -2804,9 +2810,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.95" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68" +checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" dependencies = [ "proc-macro2", "quote", @@ -2817,9 +2823,12 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.95" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65fc09f10666a9f147042251e0dda9c18f166ff7de300607007e96bdebc1068d" +checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d" +dependencies = [ + "unicode-ident", +] [[package]] name = "web-sys" From 153a29e823da92eb76f8ba12b4fa65b40be44e40 Mon Sep 17 00:00:00 2001 From: Jakub Panek Date: Fri, 28 Feb 2025 22:57:31 +0100 Subject: [PATCH 06/13] bump ahash --- Cargo.lock | 4 ++-- Cargo.toml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 034341bab..06439b844 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -19,9 +19,9 @@ checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" [[package]] name = "ahash" -version = "0.8.9" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d713b3834d76b85304d4d525563c1276e2e30dc97cc67bfb4585a4a29fc2c89f" +checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" dependencies = [ "cfg-if", "getrandom", diff --git a/Cargo.toml b/Cargo.toml index 6c4ed9942..4baad216e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,13 +12,13 @@ homepage = "https://taplo.tamasfe.dev" repository = "https://github.com/tamasfe/taplo" [workspace.dependencies] -ahash = { version = "0.8.3" } +ahash = { version = "0.8.4" } anyhow = { version = "1.0.53" } arc-swap = { version = "1.5.0" } async-trait = { version = "0.1.52" } clap = { version = "4.4.18", default-features = false, features = ["std"] } either = { version = "1.6.1" } -futures = { version = "0.3.5" } +futures = { version = "0.3.30" } getrandom = { version = "0.2", default-features = false } glob = { version = "0.3" } globset = { version = "0.4.8" } From 6c2307e506217cc5062f974ce0c9c5dbf23d8558 Mon Sep 17 00:00:00 2001 From: Jakub Panek Date: Sat, 1 Mar 2025 23:32:48 +0000 Subject: [PATCH 07/13] fix LICENSE --- LICENSE.md => LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename LICENSE.md => LICENSE (99%) diff --git a/LICENSE.md b/LICENSE similarity index 99% rename from LICENSE.md rename to LICENSE index 2d867a736..39430b364 100644 --- a/LICENSE.md +++ b/LICENSE @@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file +SOFTWARE. From 9b4dfaa7b22d86a5876b694ac9451a92de7a7ad5 Mon Sep 17 00:00:00 2001 From: Jakub Panek Date: Sat, 1 Mar 2025 23:35:47 +0000 Subject: [PATCH 08/13] update dockerignore --- .dockerignore | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.dockerignore b/.dockerignore index 5a815607e..fb748912b 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,5 +1,9 @@ -target -docker .github -.vscode .lapce +.vscode +docker +editors +js +scripts +site +target From d9fcce918eeda713f970763f2f8982e8cd246a3d Mon Sep 17 00:00:00 2001 From: Jakub Panek Date: Sat, 1 Mar 2025 23:43:37 +0000 Subject: [PATCH 09/13] add completions generation to cli --- .github/workflows/ci.yaml | 4 +- Cargo.lock | 84 +++++++++++++++------------- Cargo.toml | 13 +++-- crates/lsp-async-stub/Cargo.toml | 2 +- crates/taplo-cli/Cargo.toml | 20 ++++--- crates/taplo-cli/src/args.rs | 4 ++ crates/taplo-cli/src/commands/mod.rs | 16 ++++++ crates/taplo-common/Cargo.toml | 4 +- crates/taplo-lsp/Cargo.toml | 2 +- crates/taplo-wasm/Cargo.toml | 16 +++--- crates/taplo/Cargo.toml | 2 +- taplo.toml | 1 + 12 files changed, 100 insertions(+), 68 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index ca70deb21..a4a1b4842 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -96,7 +96,7 @@ jobs: - name: Install latest Rust toolchain run: | rustup update --no-self-update - rustup default 1.70 + rustup default 1.74 - uses: Swatinem/rust-cache@v2 - name: Test MSRV for taplo run: | @@ -111,7 +111,7 @@ jobs: - name: Install latest Rust toolchain run: | rustup update --no-self-update - rustup default 1.70 + rustup default 1.74 - uses: Swatinem/rust-cache@v2 - name: Test taplo-cli run: | diff --git a/Cargo.lock b/Cargo.lock index 06439b844..01495fd4d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -344,9 +344,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.4.18" +version = "4.5.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e578d6ec4194633722ccf9544794b71b1385c3c027efe0c55db226fc880865c" +checksum = "027bb0d98429ae334a8698531da7077bdf906419543a35a55c2cb1b66437d767" dependencies = [ "clap_builder", "clap_derive", @@ -354,9 +354,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.4.18" +version = "4.5.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4df4df40ec50c46000231c914968278b1eb05098cf8f1b3a518a95030e71d1c7" +checksum = "5589e0cba072e0f3d23791efac0fd8627b49c829c196a492e88168e6a669d863" dependencies = [ "anstream", "anstyle", @@ -364,11 +364,20 @@ dependencies = [ "strsim", ] +[[package]] +name = "clap_complete" +version = "4.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5a2d6eec27fce550d708b2be5d798797e5a55b246b323ef36924a0001996352" +dependencies = [ + "clap", +] + [[package]] name = "clap_derive" -version = "4.4.7" +version = "4.5.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf9804afaaf59a91e75b022a30fb7229a7901f60c755489cc61c9b423b836442" +checksum = "bf4ced95c6f4a675af3da73304b9ac4ed991640c36374e4b46795c49e17cf1ed" dependencies = [ "heck", "proc-macro2", @@ -378,9 +387,9 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.6.0" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "702fc72eb24e5a1e48ce58027a675bc24edd52096d5397d4aea7c6dd9eca0bd1" +checksum = "f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6" [[package]] name = "codespan-reporting" @@ -842,7 +851,7 @@ dependencies = [ "bstr", "log", "regex-automata 0.4.5", - "regex-syntax 0.8.2", + "regex-syntax 0.8.5", ] [[package]] @@ -886,9 +895,9 @@ dependencies = [ [[package]] name = "heck" -version = "0.4.1" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" [[package]] name = "hermit-abi" @@ -1342,9 +1351,9 @@ dependencies = [ [[package]] name = "num" -version = "0.4.1" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b05180d69e3da0e530ba2a1dae5110317e49e3b7f3d41be227dc5f92e49ee7af" +checksum = "35bd024e8b2ff75562e5f34e7f4905839deb4b22955ef5e73d2fea1b9813cb23" dependencies = [ "num-bigint", "num-complex", @@ -1356,11 +1365,10 @@ dependencies = [ [[package]] name = "num-bigint" -version = "0.4.4" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" +checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" dependencies = [ - "autocfg", "num-integer", "num-traits", ] @@ -1373,9 +1381,9 @@ checksum = "63335b2e2c34fae2fb0aa2cecfd9f0832a1e24b3b32ecec612c3426d46dc8aaa" [[package]] name = "num-complex" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23c6602fda94a57c990fe0df199a035d83576b496aa29f4e634a8ac6004e68a6" +checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495" dependencies = [ "num-traits", ] @@ -1407,9 +1415,9 @@ dependencies = [ [[package]] name = "num-iter" -version = "0.1.44" +version = "0.1.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d869c01cc0c455284163fd0092f1f93835385ccab5a98a0dcc497b2f8bf055a9" +checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf" dependencies = [ "autocfg", "num-integer", @@ -1418,11 +1426,10 @@ dependencies = [ [[package]] name = "num-rational" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0" +checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824" dependencies = [ - "autocfg", "num-bigint", "num-integer", "num-traits", @@ -1430,9 +1437,9 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.18" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ "autocfg", ] @@ -1458,9 +1465,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.19.0" +version = "1.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" [[package]] name = "oorandom" @@ -1706,7 +1713,7 @@ dependencies = [ "aho-corasick", "memchr", "regex-automata 0.4.5", - "regex-syntax 0.8.2", + "regex-syntax 0.8.5", ] [[package]] @@ -1726,7 +1733,7 @@ checksum = "5bb987efffd3c6d0d8f5f89510bb458559eab11e4f869acb20bf845e016259cd" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.8.2", + "regex-syntax 0.8.5", ] [[package]] @@ -1737,9 +1744,9 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] name = "regex-syntax" -version = "0.8.2" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" +checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "reqwest" @@ -2131,9 +2138,9 @@ checksum = "9091b6114800a5f2141aee1d1b9d6ca3592ac062dc5decb3764ec5895a47b4eb" [[package]] name = "strsim" -version = "0.10.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] name = "symbolic-common" @@ -2246,6 +2253,7 @@ dependencies = [ "anyhow", "async-ctrlc", "clap", + "clap_complete", "codespan-reporting", "futures", "glob", @@ -2737,9 +2745,9 @@ checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] name = "walkdir" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" dependencies = [ "same-file", "winapi-util", @@ -2864,11 +2872,11 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.6" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" +checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "winapi", + "windows-sys 0.52.0", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 4baad216e..d98197ccd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,18 +5,19 @@ members = ["crates/*"] resolver = "2" [workspace.package] -authors = ["tamasfe"] -edition = "2021" -license = "MIT" -homepage = "https://taplo.tamasfe.dev" -repository = "https://github.com/tamasfe/taplo" +authors = ["tamasfe"] +edition = "2021" +license = "MIT" +rust-version = "1.74" +homepage = "https://taplo.tamasfe.dev" +repository = "https://github.com/tamasfe/taplo" [workspace.dependencies] ahash = { version = "0.8.4" } anyhow = { version = "1.0.53" } arc-swap = { version = "1.5.0" } async-trait = { version = "0.1.52" } -clap = { version = "4.4.18", default-features = false, features = ["std"] } +clap = { version = "4.5.31", default-features = false, features = ["std"] } either = { version = "1.6.1" } futures = { version = "0.3.30" } getrandom = { version = "0.2", default-features = false } diff --git a/crates/lsp-async-stub/Cargo.toml b/crates/lsp-async-stub/Cargo.toml index 6135092e1..1bf4f993d 100644 --- a/crates/lsp-async-stub/Cargo.toml +++ b/crates/lsp-async-stub/Cargo.toml @@ -2,7 +2,7 @@ name = "lsp-async-stub" description = "An LSP server stub for futures" version = "0.6.4" -rust-version = "1.70" +rust-version = { workspace = true } authors = { workspace = true } edition = { workspace = true } homepage = { workspace = true } diff --git a/crates/taplo-cli/Cargo.toml b/crates/taplo-cli/Cargo.toml index a533aafa3..eb3969262 100644 --- a/crates/taplo-cli/Cargo.toml +++ b/crates/taplo-cli/Cargo.toml @@ -2,9 +2,9 @@ name = "taplo-cli" description = "A CLI for Taplo TOML toolkit" version = "0.9.3" -rust-version = "1.70" categories = ["development-tools", "command-line-utilities"] keywords = ["toml", "linter", "formatter"] +rust-version = { workspace = true } authors = { workspace = true } edition = { workspace = true } homepage = { workspace = true } @@ -12,12 +12,13 @@ license = { workspace = true } repository = { workspace = true } [features] -default = ["lint", "lsp", "rustls-tls", "toml-test"] -lint = ["taplo-common/schema", "taplo-common/reqwest", "reqwest"] -lsp = ["async-ctrlc", "taplo-lsp", "lint"] -native-tls = ["taplo-common/native-tls", "taplo-lsp?/native-tls"] -rustls-tls = ["taplo-common/rustls-tls", "taplo-lsp?/rustls-tls"] -toml-test = ["lint"] +default = ["lint", "lsp", "rustls-tls", "toml-test", "completions"] +lint = ["taplo-common/schema", "taplo-common/reqwest", "reqwest"] +lsp = ["async-ctrlc", "taplo-lsp", "lint"] +native-tls = ["taplo-common/native-tls", "taplo-lsp?/native-tls"] +rustls-tls = ["taplo-common/rustls-tls", "taplo-lsp?/rustls-tls"] +toml-test = ["lint"] +completions = ["dep:clap_complete"] [dependencies] taplo = { path = "../taplo", features = ["serde"] } @@ -43,15 +44,16 @@ tracing = { workspace = true } tracing-subscriber = { workspace = true, features = ["env-filter"] } url = { workspace = true } -[target.'cfg(not(target_arch = "wasm32"))'.dependencies] +[target.'cfg(not(target_family = "wasm"))'.dependencies] ansi_term = { version = "0.12" } async-ctrlc = { version = "1.2.0", features = ["stream"], optional = true } +clap_complete = { version = "4.4.18", optional = true } lsp-async-stub = { path = "../lsp-async-stub", features = ["tokio-tcp", "tokio-stdio"] } # `prettydiff` is also a CLI that pulls in `clap` by default prettydiff = { version = "0.6.1", default-features = false } tokio = { workspace = true, features = ["sync", "fs", "time", "io-std", "rt-multi-thread", "parking_lot"] } -[target.'cfg(target_arch = "wasm32")'.dependencies] +[target.'cfg(target_family = "wasm")'.dependencies] tokio = { workspace = true, features = ["sync", "parking_lot", "io-util"] } [package.metadata.auto-tag] diff --git a/crates/taplo-cli/src/args.rs b/crates/taplo-cli/src/args.rs index 8d0d06012..9c5c557cc 100644 --- a/crates/taplo-cli/src/args.rs +++ b/crates/taplo-cli/src/args.rs @@ -78,6 +78,10 @@ pub enum TaploCommand { /// Start a decoder for `toml-test` (https://github.com/BurntSushi/toml-test). #[cfg(feature = "toml-test")] TomlTest {}, + + /// Generate completions for Taplo CLI + #[cfg(feature = "completions")] + Completions { shell: String }, } #[derive(Clone, Args)] diff --git a/crates/taplo-cli/src/commands/mod.rs b/crates/taplo-cli/src/commands/mod.rs index 76173a32b..1e6b8bd95 100644 --- a/crates/taplo-cli/src/commands/mod.rs +++ b/crates/taplo-cli/src/commands/mod.rs @@ -25,6 +25,22 @@ impl Taplo { }; match taplo.cmd { + #[cfg(feature = "completions")] + TaploCommand::Completions { shell } => { + use anyhow::anyhow; + use clap::CommandFactory; + use clap_complete::{generate, shells::Shell}; + use std::{io::stdout, str::FromStr}; + + let shell = Shell::from_str(&shell).map_err(|e| anyhow!(e))?; + generate( + shell, + &mut TaploArgs::command(), + TaploArgs::command().get_bin_name().unwrap(), + &mut stdout(), + ); + Ok(()) + } TaploCommand::Config { cmd } => self.execute_config(cmd).await, TaploCommand::Format(fmt) => self.execute_format(fmt).await, TaploCommand::Get(cmd) => self.execute_get(cmd).await, diff --git a/crates/taplo-common/Cargo.toml b/crates/taplo-common/Cargo.toml index 0befedd22..c586c2080 100644 --- a/crates/taplo-common/Cargo.toml +++ b/crates/taplo-common/Cargo.toml @@ -2,15 +2,13 @@ name = "taplo-common" description = "Shared code for taplo utilities." version = "0.5.2" -rust-version = "1.70" +rust-version = { workspace = true } authors = { workspace = true } edition = { workspace = true } homepage = { workspace = true } license = { workspace = true } repository = { workspace = true } -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - [features] # default-tls enables native-tls but without enabling native-tls specific features. native-tls = ["reqwest/default-tls"] diff --git a/crates/taplo-lsp/Cargo.toml b/crates/taplo-lsp/Cargo.toml index 793f79b2e..6da91acb1 100644 --- a/crates/taplo-lsp/Cargo.toml +++ b/crates/taplo-lsp/Cargo.toml @@ -2,7 +2,7 @@ name = "taplo-lsp" description = "Language server for Taplo" version = "0.7.2" -rust-version = "1.70" +rust-version = { workspace = true } authors = { workspace = true } edition = { workspace = true } homepage = { workspace = true } diff --git a/crates/taplo-wasm/Cargo.toml b/crates/taplo-wasm/Cargo.toml index c851bd5a7..ba9f74c3b 100644 --- a/crates/taplo-wasm/Cargo.toml +++ b/crates/taplo-wasm/Cargo.toml @@ -1,11 +1,13 @@ [package] -name = "taplo-wasm" -version = "0.2.1" -edition = "2021" -publish = false -repository = "https://github.com/tamasfe/taplo" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html +name = "taplo-wasm" +version = "0.2.1" +publish = false +rust-version = { workspace = true } +authors = { workspace = true } +edition = { workspace = true } +homepage = { workspace = true } +license = { workspace = true } +repository = { workspace = true } [lib] crate-type = ["cdylib"] diff --git a/crates/taplo/Cargo.toml b/crates/taplo/Cargo.toml index aa86e2dec..34d2b7b01 100644 --- a/crates/taplo/Cargo.toml +++ b/crates/taplo/Cargo.toml @@ -2,7 +2,7 @@ name = "taplo" description = "A TOML parser, analyzer and formatter library" version = "0.13.2" -rust-version = "1.70" # clap 4.4 = MSRV 1.70, clap 4.5 = MSRV 1.74 +rust-version = "1.74" categories = ["parser-implementations", "parsing"] keywords = ["toml", "parser", "formatter", "linter"] readme = false diff --git a/taplo.toml b/taplo.toml index 3c78e217e..c04be7205 100644 --- a/taplo.toml +++ b/taplo.toml @@ -4,6 +4,7 @@ exclude = [ "**/node_modules/**", "**/invalid/*", "test-data/**", + "target", ] [formatting] From a2a26201b1d78a799eda1103e9d1c0bcda1e1bfb Mon Sep 17 00:00:00 2001 From: Jakub Panek Date: Sat, 1 Mar 2025 23:44:06 +0000 Subject: [PATCH 10/13] refactor logging setup --- crates/taplo-cli/src/lib.rs | 2 +- crates/taplo-common/src/log.rs | 61 +++++++++++++--------------------- 2 files changed, 24 insertions(+), 39 deletions(-) diff --git a/crates/taplo-cli/src/lib.rs b/crates/taplo-cli/src/lib.rs index 77237e8a0..abc4e2be3 100644 --- a/crates/taplo-cli/src/lib.rs +++ b/crates/taplo-cli/src/lib.rs @@ -139,7 +139,7 @@ impl Taplo { let excluded = total - files.len(); - tracing::info!(total, excluded, "found files"); + tracing::info!(total, excluded, ?files, "found files"); Ok(files) } diff --git a/crates/taplo-common/src/log.rs b/crates/taplo-common/src/log.rs index 5e8717e74..5837fcd5d 100644 --- a/crates/taplo-common/src/log.rs +++ b/crates/taplo-common/src/log.rs @@ -53,64 +53,49 @@ impl Write for BlockingWrite { } pub fn setup_stderr_logging(e: impl Environment, spans: bool, verbose: bool, colors: Option) { - let span_events = if spans { - FmtSpan::NEW | FmtSpan::CLOSE - } else { - FmtSpan::NONE - }; - let registry = tracing_subscriber::registry(); - let env_filter = match e.env_var("RUST_LOG") { + let colors = match colors { + None => e.atty_stderr(), + Some(v) => v, + }; + + let registry = registry.with(match e.env_var("RUST_LOG") { Some(log) => EnvFilter::new(log), None => EnvFilter::default().add_directive(tracing::Level::INFO.into()), + }); + + let event_format = tracing_subscriber::fmt::format().pretty().with_ansi(colors); + + let layer = tracing_subscriber::fmt::layer() + .with_ansi(colors) + .with_writer(move || BlockingWrite(e.stderr())); + + let layer = if spans { + layer.with_span_events(FmtSpan::NEW | FmtSpan::CLOSE) + } else { + layer }; if verbose { registry - .with(env_filter) - .with( - tracing_subscriber::fmt::layer() - .with_ansi(match colors { - None => e.atty_stderr(), - Some(v) => v, - }) - .with_span_events(span_events) - .event_format(tracing_subscriber::fmt::format().pretty().with_ansi( - match colors { - None => e.atty_stderr(), - Some(v) => v, - }, - )) - .with_writer(move || BlockingWrite(e.stderr())), - ) + .with(layer.event_format(event_format)) .try_init() .ok(); } else { registry - .with(env_filter) .with( - tracing_subscriber::fmt::layer() - .with_ansi(match colors { - None => e.atty_stderr(), - Some(v) => v, - }) + layer .event_format( - tracing_subscriber::fmt::format() + event_format .compact() .with_source_location(false) .with_target(false) - .without_time() - .with_ansi(match colors { - None => e.atty_stderr(), - Some(v) => v, - }), + .without_time(), ) .without_time() .with_file(false) - .with_line_number(false) - .with_span_events(span_events) - .with_writer(move || BlockingWrite(e.stderr())), + .with_line_number(false), ) .try_init() .ok(); From 5670a4afd7502db5c7a50d39e98348382b81ebfe Mon Sep 17 00:00:00 2001 From: Jakub Panek Date: Sun, 2 Mar 2025 00:13:18 +0000 Subject: [PATCH 11/13] add devcontainer --- .devcontainer/devcontainer-lock.json | 24 ++++++++++++++++++++++++ .devcontainer/devcontainer.json | 19 +++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 .devcontainer/devcontainer-lock.json create mode 100644 .devcontainer/devcontainer.json diff --git a/.devcontainer/devcontainer-lock.json b/.devcontainer/devcontainer-lock.json new file mode 100644 index 000000000..3e07d0ac9 --- /dev/null +++ b/.devcontainer/devcontainer-lock.json @@ -0,0 +1,24 @@ +{ + "features": { + "ghcr.io/devcontainers-contrib/features/fish-apt-get:1": { + "version": "1.0.3", + "resolved": "ghcr.io/devcontainers-contrib/features/fish-apt-get@sha256:f9df986f56634ef9a17a5003459de3bd4d958690f91bc0151267ed74c1353ef0", + "integrity": "sha256:f9df986f56634ef9a17a5003459de3bd4d958690f91bc0151267ed74c1353ef0" + }, + "ghcr.io/devcontainers/features/docker-outside-of-docker:1": { + "version": "1.6.0", + "resolved": "ghcr.io/devcontainers/features/docker-outside-of-docker@sha256:63dc56535ecaed989f2e6c8ca04acb5012999cd0e19f125504350b2e075b0c2c", + "integrity": "sha256:63dc56535ecaed989f2e6c8ca04acb5012999cd0e19f125504350b2e075b0c2c" + }, + "ghcr.io/devcontainers/features/node:1": { + "version": "1.6.1", + "resolved": "ghcr.io/devcontainers/features/node@sha256:71590121aaf7b2040f3e1e2dfc4bb9a1389277fd5a88a7199094542b82ce5340", + "integrity": "sha256:71590121aaf7b2040f3e1e2dfc4bb9a1389277fd5a88a7199094542b82ce5340" + }, + "ghcr.io/devcontainers/features/rust:1": { + "version": "1.3.1", + "resolved": "ghcr.io/devcontainers/features/rust@sha256:2f9cfd1fda3ab3a8839760f1854ec5909aade2e95a7acc0bc3cb90bc8af4b810", + "integrity": "sha256:2f9cfd1fda3ab3a8839760f1854ec5909aade2e95a7acc0bc3cb90bc8af4b810" + } + } +} \ No newline at end of file diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 000000000..9f7b4c69b --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,19 @@ +// For format details, see https://aka.ms/devcontainer.json. For config options, see the +// README at: https://github.com/devcontainers/templates/tree/main/src/ubuntu +{ + "name": "Ubuntu", + // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile + "image": "mcr.microsoft.com/devcontainers/base:noble", + "features": { + "ghcr.io/devcontainers-contrib/features/fish-apt-get:1": {}, + "ghcr.io/devcontainers/features/docker-outside-of-docker:1": {}, + "ghcr.io/devcontainers/features/node:1": {}, + "ghcr.io/devcontainers/features/rust:1": { + "version": "latest", + "profile": "complete", + "targets": "wasm32-unknown-unknown" + }, + } + // Configure tool-specific properties. + // "customizations": {}, +} \ No newline at end of file From 17b8dccc2b128845d20be6158c7598f200dc4b4b Mon Sep 17 00:00:00 2001 From: Jakub Panek Date: Sun, 2 Mar 2025 02:00:54 +0000 Subject: [PATCH 12/13] add musl wheels --- .github/workflows/releases.yaml | 14 +++++++-- docker-bake.hcl | 20 ++----------- docker/alpine/Dockerfile | 52 ++++++++++++++++++++++----------- pyproject.toml | 1 - 4 files changed, 48 insertions(+), 39 deletions(-) diff --git a/.github/workflows/releases.yaml b/.github/workflows/releases.yaml index 578a4cdc0..b4442adf7 100644 --- a/.github/workflows/releases.yaml +++ b/.github/workflows/releases.yaml @@ -330,8 +330,16 @@ jobs: PUSH: ${{ github.event_name == 'push' }} run: | docker buildx bake - - name: Rename - run: | + - run: | + mkdir -p ./target/wheels + mv ./target/alpine/linux_*/taplo*.whl ./target/wheels/ + - uses: actions/upload-artifact@v4 + with: + name: wheels-musl + path: | + ./target/wheels/* + retention-days: 1 + - run: | cd ./target/alpine mv ./linux_386/taplo ./linux_386/taplo-x86 mv ./linux_amd64/taplo ./linux_amd64/taplo-x86_64 @@ -481,7 +489,7 @@ jobs: pypi_test_taplo_cli: name: Test python wheels - needs: ["pypi_build_taplo_cli"] + needs: ["pypi_build_taplo_cli", "build_cli_linux_musl"] runs-on: ${{ matrix.os }} strategy: fail-fast: false diff --git a/docker-bake.hcl b/docker-bake.hcl index a32ee9fb1..11eba9ba1 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -18,28 +18,13 @@ variable "PUSH" { default = false } -variable "APK_FAMILY_PACKAGES" { - default = [ - "make", - "clang", - "git", - "lld", - "build-base", - "openssl-dev", - "openssl-libs-static", - ] -} - - variable "platforms" { default = [ "linux/i386", "linux/amd64", "linux/arm64", - // "linux/riscv64", - // "linux/s390x", + "linux/riscv64", "linux/arm/v7", - // "linux/arm/v6", ] } @@ -72,7 +57,6 @@ target "alpine" { args = { RUST_VERSION = RUST_VERSION XX_VERSION = XX_VERSION - DISTRIBUTION_VERSION = "3.20" - DISTRIBUTION_PACKAGES = join(" ", APK_FAMILY_PACKAGES) + DISTRIBUTION_VERSION = "3.21" } } diff --git a/docker/alpine/Dockerfile b/docker/alpine/Dockerfile index 2e300b750..744849d66 100644 --- a/docker/alpine/Dockerfile +++ b/docker/alpine/Dockerfile @@ -10,17 +10,14 @@ COPY --from=xx / / SHELL [ "/bin/ash", "-c" ] -# install host dependencies -ARG DISTRIBUTION_PACKAGES RUN \ - --mount=type=cache,id=apk,sharing=private,target=/var/cache/apk \ - --mount=type=cache,id=apk,sharing=private,target=/etc/apk/cache \ + --mount=type=cache,id=apk,target=/var/cache/apk \ + --mount=type=cache,id=apk,target=/etc/apk/cache \ < Date: Sun, 2 Mar 2025 04:00:52 +0000 Subject: [PATCH 13/13] bump walkdir in test-gen --- util/test-gen/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/test-gen/Cargo.toml b/util/test-gen/Cargo.toml index a39302937..95de2949e 100644 --- a/util/test-gen/Cargo.toml +++ b/util/test-gen/Cargo.toml @@ -13,4 +13,4 @@ quote = "1.0" serde = "1" serde_json = "1" serde_yaml = "0.8" -walkdir = "2" +walkdir = "2.5.0"