Skip to content

Commit

Permalink
docs/readme: add project structure (#219)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ruixi-rebirth authored Jul 10, 2023
2 parents 622b137 + f1db95d commit 36ebbcc
Showing 1 changed file with 41 additions and 10 deletions.
51 changes: 41 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,44 @@ And diagnostic:
- [Developers' Manual](docs/dev.md) (internal design, contributing):
- Project matrix room: https://matrix.to/#/#nixd:matrix.org

## Tooling

We provide some extra tools based on our codebase.

### nix-ast-dump

Used for dumping internal data structures in nix parser.

Demo: [all-grammar.nix](tools/nix-ast-dump/test/all-grammar.nix)

## Proejct Structure

```
.
├── default.nix
├── docs
├── editors
├── flake.lock
├── flake.nix
├── LICENSE
├── lspserver # The C++ library for writing LSP servers.
├── meson.build
├── nixd # Modularized nixd components, test suite, and tools (binary)
│ ├── include # General header files
│ ├── lib
│ │ ├── AST # AST library for nix expressions, static analysis (rename, completion, location, range) & evaluation bindings.
│ │ ├── Expr # Expressions library (single AST nodes) with name lookups, locations, ...
│ │ ├── meson.build
│ │ ├── Nix # Extension to NixOS/nix
│ │ ├── Parser # Extension to the parser from NixOS/nix. with ranges support & error handling.
│ │ ├── Server # The nixd server library with controller (the process interacting with clients) and multiple workers (option, eval).
│ │ └── Support
│ ├── meson.build
│ ├── test # Library tests. (rarely used)
│ └── tools
│ ├── meson.build
│ ├── nix-ast-dump # Dump nix AST from the offical parser (NixOS/nix)
│ │ ├── meson.build
│ │ ├── nix-ast-dump.cpp
│ │ └── test
│ ├── nixd # The nixd binary (entry point)
│ │ ├── meson.build
│ │ ├── nixd.cpp
│ │ └── test # The regression tests.
│ └── nixd-ast-dump # Dump the AST nodes parsed from the extended parser, check leaks & memory safety.
│ ├── meson.build
│ ├── nixd-ast-dump.cpp
│ └── test
└── README.md
```

0 comments on commit 36ebbcc

Please sign in to comment.