mirror of
https://github.com/nushell/nushell.git
synced 2025-05-22 15:45:35 +00:00
~~I happened to be reviewing our uses of `thread::spawn()` and came to the conclusion that we're spawning a thread unnecessarily for plugin calls. We were basically doing this:~~ ~~1. Spawn a background thread to send data to the plugin over stdin~~ ~~2. Immediately do a blocking wait for the plugin's response~~ ~~As far as I can tell, there's no point in spawning a thread for 1 (and it may harm error handling) given that we're blocking right away for the response.~~ **Update:** the logic is correct, as confirmed by @WindSoilder [here](https://discord.com/channels/601130461678272522/855947301380947968/1072743414795350037). I've added a comment explaining the thread usage.
Nushell core libraries and plugins
These sub-crates form both the foundation for Nu and a set of plugins which extend Nu with additional functionality.
Foundational libraries are split into two kinds of crates:
- Core crates - those crates that work together to build the Nushell language engine
- Support crates - a set of crates that support the engine with additional features like JSON support, ANSI support, and more.
Plugins are likewise also split into two types:
- Core plugins - plugins that provide part of the default experience of Nu, including access to the system properties, processes, and web-connectivity features.
- Extra plugins - these plugins run a wide range of different capabilities like working with different file types, charting, viewing binary data, and more.