The Open-Source Libraries Powering Fresh
Building Fresh would have been insanely hard if it weren't for these libraries.
Packages specifically useful for building a TUI text editor:
| Crate | One-Line Summary |
|---|---|
| arboard | Cross-platform acesss to the system clipboard (CTRL+C for the win) |
| crossterm | Terminal manipulation, handling input, cursor movement, and colors across platforms (backend for ratatui) |
| deno | TypeScript/JavaScript embeddeble runtime, used for the plugin system (deno_ast, deno_core, etc.) |
| dirs | Abstracting away platform-specific user directories (like desktop, documents, cache) |
| ignore | Pattern matching for files, often using .gitignore syntax |
| lsp-types | Data structures corresponding to the types defined by the Language Server Protocol (LSP) |
| notify | Cross-platform filesystem event monitor/watcher for detecting file system changes (for detecting changes and auto-reverting buffers) |
| pulldown-cmark | Markdown parser (some LSP servers return markdown) |
| ratatui | Full-featured Text User Interfaces (TUI) library, very cool! |
| syntect | Syntax highlighting based on Sublime Text syntax definitions |
| tree-sitter | Incrementally parsing concrete syntax trees for various languages (used in auto-indent & semantic highlighting) |
General purpose libraries:
| Crate | One-Line Summary |
|---|---|
| anyhow | Makes it easy to align all your errors to a single type |
| async-trait | Enables the use of async functions in Rust traits, which is currently unsupported natively |
| chrono | Date and time manipulation and formatting |
| clap | command-line arguments parsing, auto-generated help messages, and more |
| libc | Low-level bindings to OS-level C standard library |
| libloading | dlopen wrapper (used for libgpm dynamic loading) |
| lru | Implements a simple, efficient Least Recently Used (LRU) cache based on a hash map and a linked list |
| nix | Bindings to Unix-like OS APIs (e.g., processes, file descriptors) |
| regex | Regular expression engine |
| schemars | Used for generating JSON Schema from Rust data structures for API validation and documentation (config.json autogenerated parser) |
| serde | Serializing/deserializing data structures efficiently, including json (with sede_json) |
| sha2 | SHA-256, SHA-512, etc. |
| tokio | Asynchronous runtime for concurrency (e.g. use it for async IO) |
| tracing | Tracing and structured logging (also using tracing-subscriber) |
Thanks to all these projects - and their maintainers :)