aboutsummaryrefslogtreecommitdiff
path: root/docs/dev/architecture.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/dev/architecture.md')
-rw-r--r--docs/dev/architecture.md8
1 files changed, 8 insertions, 0 deletions
diff --git a/docs/dev/architecture.md b/docs/dev/architecture.md
index 39edf9e19..3de1b99a5 100644
--- a/docs/dev/architecture.md
+++ b/docs/dev/architecture.md
@@ -146,6 +146,8 @@ Reading the docs of the `base_db::input` module should be useful: everything els
146 146
147**Architecture Invariant:** particularities of the build system are *not* the part of the ground state. 147**Architecture Invariant:** particularities of the build system are *not* the part of the ground state.
148In particular, `base_db` knows nothing about cargo. 148In particular, `base_db` knows nothing about cargo.
149For example, `cfg` flags are a part of `base_db`, but `feature`s are not.
150A `foo` feature is a Cargo-level concept, which is lowered by Cargo to `--cfg feature=foo` argument on the command line.
149The `CrateGraph` structure is used to represent the dependencies between the crates abstractly. 151The `CrateGraph` structure is used to represent the dependencies between the crates abstractly.
150 152
151**Architecture Invariant:** `base_db` doesn't know about file system and file paths. 153**Architecture Invariant:** `base_db` doesn't know about file system and file paths.
@@ -447,3 +449,9 @@ This is cheap enough to enable in production.
447 449
448Similarly, we save live object counting (`RA_COUNT=1`). 450Similarly, we save live object counting (`RA_COUNT=1`).
449It is not cheap enough to enable in prod, and this is a bug which should be fixed. 451It is not cheap enough to enable in prod, and this is a bug which should be fixed.
452
453### Configurability
454
455rust-analyzer strives to be as configurable as possible while offering reasonable defaults where no configuration exists yet.
456There will always be features that some people find more annoying than helpful, so giving the users the ability to tweak or disable these is a big part of offering a good user experience.
457Mind the code--architecture gap: at the moment, we are using fewer feature flags than we really should.