rust-analyzer/project_model/index.html
github-merge-queue[bot] 8252e92bb1 deploy: e38a7b43f8
2025-09-15 08:14:29 +00:00

17 lines
No EOL
9.5 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="In rust-analyzer, we maintain a strict separation between pure abstract semantic project model and a concrete model of a particular build system."><title>project_model - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../static.files/rustdoc-84e720fa.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="project_model" data-themes="" data-resource-suffix="" data-rustdoc-version="1.89.0 (29483883e 2025-08-04)" data-channel="1.89.0" data-search-js="search-92309212.js" data-settings-js="settings-5514c975.js" ><script src="../static.files/storage-4e99c027.js"></script><script defer src="../crates.js"></script><script defer src="../static.files/main-fd3af306.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-32bb7600.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-044be391.svg"></head><body class="rustdoc mod crate"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../project_model/index.html">project_<wbr>model</a><span class="version">0.0.0</span></h2></div><div class="sidebar-elems"><ul class="block"><li><a id="all-types" href="all.html">All Items</a></li></ul><section id="rustdoc-toc"><h3><a href="#reexports">Crate Items</a></h3><ul class="block"><li><a href="#reexports" title="Re-exports">Re-exports</a></li><li><a href="#modules" title="Modules">Modules</a></li><li><a href="#structs" title="Structs">Structs</a></li><li><a href="#enums" title="Enums">Enums</a></li><li><a href="#types" title="Type Aliases">Type Aliases</a></li></ul></section><div id="rustdoc-modnav"></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><h1>Crate <span>project_model</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../src/project_model/lib.rs.html#1-282">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>In rust-analyzer, we maintain a strict separation between pure abstract
semantic project model and a concrete model of a particular build system.</p>
<p>Pure model is represented by the [<code>base_db::CrateGraph</code>] from another crate.</p>
<p>In this crate, we are concerned with “real world” project models.</p>
<p>Specifically, here we have a representation for a Cargo project
(<a href="struct.CargoWorkspace.html" title="struct project_model::CargoWorkspace"><code>CargoWorkspace</code></a>) and for manually specified layout (<a href="project_json/struct.ProjectJson.html" title="struct project_model::project_json::ProjectJson"><code>ProjectJson</code></a>).</p>
<p>Roughly, the things we do here are:</p>
<ul>
<li>Project discovery (wheres the relevant Cargo.toml for the current dir).</li>
<li>Custom build steps (<code>build.rs</code> code generation and compilation of
procedural macros).</li>
<li>Lowering of concrete model to a [<code>base_db::CrateGraph</code>]</li>
</ul>
</div></details><h2 id="reexports" class="section-header">Re-exports<a href="#reexports" class="anchor">§</a></h2><dl class="item-table reexports"><dt id="reexport.ProjectJson"><code>pub use crate::project_json::<a class="struct" href="project_json/struct.ProjectJson.html" title="struct project_model::project_json::ProjectJson">ProjectJson</a>;</code></dt><dt id="reexport.ProjectJsonData"><code>pub use crate::project_json::<a class="struct" href="project_json/struct.ProjectJsonData.html" title="struct project_model::project_json::ProjectJsonData">ProjectJsonData</a>;</code></dt></dl><h2 id="modules" class="section-header">Modules<a href="#modules" class="anchor">§</a></h2><dl class="item-table"><dt><a class="mod" href="project_json/index.html" title="mod project_model::project_json">project_<wbr>json</a></dt><dd><code>rust-project.json</code> file format.</dd><dt><a class="mod" href="toolchain_info/index.html" title="mod project_model::toolchain_info">toolchain_<wbr>info</a></dt></dl><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><dl class="item-table"><dt><a class="struct" href="struct.CargoConfig.html" title="struct project_model::CargoConfig">Cargo<wbr>Config</a></dt><dt><a class="struct" href="struct.CargoMetadataConfig.html" title="struct project_model::CargoMetadataConfig">Cargo<wbr>Metadata<wbr>Config</a></dt><dt><a class="struct" href="struct.CargoWorkspace.html" title="struct project_model::CargoWorkspace">Cargo<wbr>Workspace</a></dt><dd><a href="struct.CargoWorkspace.html" title="struct project_model::CargoWorkspace"><code>CargoWorkspace</code></a> represents the logical structure of, well, a Cargo
workspace. It pretty closely mirrors <code>cargo metadata</code> output.</dd><dt><a class="struct" href="struct.CfgOverrides.html" title="struct project_model::CfgOverrides">CfgOverrides</a></dt><dd>A set of cfg-overrides per crate.</dd><dt><a class="struct" href="struct.ManifestPath.html" title="struct project_model::ManifestPath">Manifest<wbr>Path</a></dt><dd>More or less [<code>AbsPathBuf</code>] with non-None parent.</dd><dt><a class="struct" href="struct.Metadata.html" title="struct project_model::Metadata">Metadata</a></dt><dd>Starting point for metadata returned by <code>cargo metadata</code></dd><dt><a class="struct" href="struct.PackageData.html" title="struct project_model::PackageData">Package<wbr>Data</a></dt><dd>Information associated with a cargo crate</dd><dt><a class="struct" href="struct.PackageDependency.html" title="struct project_model::PackageDependency">Package<wbr>Dependency</a></dt><dt><a class="struct" href="struct.PackageRoot.html" title="struct project_model::PackageRoot">Package<wbr>Root</a></dt><dd><code>PackageRoot</code> describes a package root folder.
Which may be an external dependency, or a member of
the current workspace.</dd><dt><a class="struct" href="struct.ProjectJsonFromCommand.html" title="struct project_model::ProjectJsonFromCommand">Project<wbr>Json<wbr>From<wbr>Command</a></dt><dt><a class="struct" href="struct.ProjectWorkspace.html" title="struct project_model::ProjectWorkspace">Project<wbr>Workspace</a></dt><dt><a class="struct" href="struct.Sysroot.html" title="struct project_model::Sysroot">Sysroot</a></dt><dt><a class="struct" href="struct.TargetData.html" title="struct project_model::TargetData">Target<wbr>Data</a></dt><dd>Information associated with a packages target</dd><dt><a class="struct" href="struct.WorkspaceBuildScripts.html" title="struct project_model::WorkspaceBuildScripts">Workspace<wbr>Build<wbr>Scripts</a></dt><dd>Output of the build script and proc-macro building steps for a workspace.</dd></dl><h2 id="enums" class="section-header">Enums<a href="#enums" class="anchor">§</a></h2><dl class="item-table"><dt><a class="enum" href="enum.CargoFeatures.html" title="enum project_model::CargoFeatures">Cargo<wbr>Features</a></dt><dt><a class="enum" href="enum.InvocationStrategy.html" title="enum project_model::InvocationStrategy">Invocation<wbr>Strategy</a></dt><dt><a class="enum" href="enum.ProcMacroDylibPath.html" title="enum project_model::ProcMacroDylibPath">Proc<wbr>Macro<wbr>Dylib<wbr>Path</a></dt><dt><a class="enum" href="enum.ProjectManifest.html" title="enum project_model::ProjectManifest">Project<wbr>Manifest</a></dt><dt><a class="enum" href="enum.ProjectWorkspaceKind.html" title="enum project_model::ProjectWorkspaceKind">Project<wbr>Workspace<wbr>Kind</a></dt><dt><a class="enum" href="enum.RustLibSource.html" title="enum project_model::RustLibSource">Rust<wbr>LibSource</a></dt><dd>Describes how to set the rustc source directory.</dd><dt><a class="enum" href="enum.RustSourceWorkspaceConfig.html" title="enum project_model::RustSourceWorkspaceConfig">Rust<wbr>Source<wbr>Workspace<wbr>Config</a></dt><dt><a class="enum" href="enum.TargetKind.html" title="enum project_model::TargetKind">Target<wbr>Kind</a></dt></dl><h2 id="types" class="section-header">Type Aliases<a href="#types" class="anchor">§</a></h2><dl class="item-table"><dt><a class="type" href="type.FileLoader.html" title="type project_model::FileLoader">File<wbr>Loader</a></dt><dt><a class="type" href="type.Package.html" title="type project_model::Package">Package</a></dt><dt><a class="type" href="type.Target.html" title="type project_model::Target">Target</a></dt></dl></section></div></main></body></html>