Skip to content

Commit

Permalink
doc: explain pub and add features
Browse files Browse the repository at this point in the history
  • Loading branch information
nrdxp committed Aug 2, 2024
1 parent 019a8d0 commit a967bce
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ code without having to perform a full evaluation. This could be used, e.g. to sh
- **Modular Structure**: Organize Nix code into directories, each defined by a `mod.nix` file.
- **Automatic Importing**: Nix files in a module directory are automatically imported.
- **Isolation**: Modules are imported into the Nix store, enforcing boundaries and preventing relative path access.
- **Scoping**: Each module and member has access to `self`, `super`, `atom`, and `std`.
- **Introspection**: Unlike legacy modules, code is specified in its final form instead of as prototypes (functions), leading to much better and simpler introspective analysis.
- **Simplicity**: The system is kept purposefully simple and flexible in order to remain performant and flexible.
- **Scoping**: Each module and member has access to `self`, `super`, `atom`, `pub` and `std`.
- **Standard Library**: Includes a standard library (`std`) augmented with `builtins`.

## How It Works
Expand All @@ -29,6 +31,7 @@ code without having to perform a full evaluation. This could be used, e.g. to sh
- `super`: Parent module (if applicable).
- `atom`: Top-level module.
- `std`: Standard library and `builtins`.
- `pub`: External resources, such as other atoms, free-form nix expressions, remote sources, etc.

3. **Composition**: Modules are composed recursively, with `mod.nix` contents taking precedence.

Expand Down

0 comments on commit a967bce

Please sign in to comment.