Skip to content

Instantly share code, notes, and snippets.

@theMackabu
Created September 5, 2024 18:11
Show Gist options
  • Save theMackabu/d3bdd9c169607601f50c6bb77da5900f to your computer and use it in GitHub Desktop.
Save theMackabu/d3bdd9c169607601f50c6bb77da5900f to your computer and use it in GitHub Desktop.
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"sysroot": {
"type": "string",
"description": "Path to the sysroot directory. The sysroot is where rustc looks for the crates that are built-in to rust, such as std."
},
"sysroot_src": {
"type": "string",
"description": "Path to the directory with source code of sysroot crates. By default, this is `lib/rustlib/src/rust/library` relative to the sysroot."
},
"cfg_groups": {
"type": "object",
"additionalProperties": {
"type": "array",
"items": {
"type": "string"
}
},
"description": "List of groups of common cfg values, to allow sharing them between crates."
},
"crates": {
"type": "array",
"items": {
"type": "object",
"properties": {
"display_name": {
"type": "string",
"description": "Optional crate name used for display purposes, without affecting semantics."
},
"root_module": {
"type": "string",
"description": "Path to the root module of the crate."
},
"edition": {
"type": "string",
"enum": ["2015", "2018", "2021"],
"description": "Edition of the crate."
},
"deps": {
"type": "array",
"items": {
"type": "object",
"properties": {
"crate": {
"type": "integer",
"description": "Index of a crate in the `crates` array."
},
"name": {
"type": "string",
"description": "Name as should appear in the (implicit) `extern crate name` declaration."
}
},
"required": ["crate", "name"]
},
"description": "Dependencies"
},
"is_workspace_member": {
"type": "boolean",
"description": "Should this crate be treated as a member of current \"workspace\"."
},
"source": {
"type": "object",
"properties": {
"include_dirs": {
"type": "array",
"items": {
"type": "string"
}
},
"exclude_dirs": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": ["include_dirs", "exclude_dirs"],
"description": "Optionally specify the (super)set of `.rs` files comprising this crate."
},
"cfg_groups": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of cfg groups this crate inherits."
},
"cfg": {
"type": "array",
"items": {
"type": "string"
},
"description": "The set of cfgs activated for a given crate."
},
"target": {
"type": "string",
"description": "Target triple for this Crate."
},
"env": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"description": "Environment variables, used for the `env!` macro"
},
"is_proc_macro": {
"type": "boolean",
"description": "Whether the crate is a proc-macro crate."
},
"proc_macro_dylib_path": {
"type": "string",
"description": "For proc-macro crates, path to compiled proc-macro (.so file)."
}
},
"required": ["root_module", "edition", "deps", "cfg", "is_proc_macro"]
},
"description": "The set of crates comprising the current project."
}
},
"required": ["crates"]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment