Open loynoir opened 10 months ago
In my use-cases, i use vscode with the plugins Even Better TOML
and crates
, it is support completion and validation. In my opinion, the most of Rust configuration written in toml format, may be it is not a easy-cake to support another format.
Although its name is jsonschema
, but actually, it can also provide for yaml
and toml
Thank you for the proposal. This is quite a cool idea!
It seems that SchemaStore is a collective effort from the community, and unfortunately the Cargo team does not have the capacity to maintain such a JSON schema at this time. I would recommend people communicating and contributing to SchemaStore directly. Look closely into it. The community already done one for Cargo.toml
: https://github.com/SchemaStore/schemastore/pull/2368. It uses taplo, which is the engine behind Even Better TOML, to export JSON schema. That looks pretty straightforward if people want to give it a try.
We could have a feature
to enable https://crates.io/crates/schemars/0.8.15 on our types with a xtask to update the file checked in. There would be bugs in it but it can serve as a basis for community members to then update the schemastore based off of it.
Problem
.cargo/config.toml
does not have jsonshema.So editor can not use schemastore to support tab-completion and validation.
Proposed Solution
cargo
team implement jsonschema, publish and maintain related jsonschema in https://github.com/SchemaStore/schemastore.So editor can use schemastore to support tab-completion and validation.
Notes
https://doc.rust-lang.org/cargo/reference/config.html
vcpkg
https://github.com/microsoft/vcpkg/issues/34706