nushell/crates
Reilly Wood a43e66ef92
Add LRU regex cache (#7587)
Closes #7572 by adding a cache for compiled regexes of type
`Arc<Mutex<LruCache<String, Regex>>>` to `EngineState` .

The cache is limited to 100 entries (limit chosen arbitrarily) and
evicts least-recently-used items first.

This PR makes a noticeable difference when using regexes for
`color_config`, e.g.:
```bash
#first set string formatting in config.nu like:
string: { if $in =~ '^#\w{6}$' { $in } else { 'white' } }`

# then try displaying and exploring a table with many strings
# this is instant after the PR, but takes hundreds of milliseconds before
['#ff0033', '#0025ee', '#0087aa', 'string', '#4101ff', '#ff0033', '#0025ee', '#0087aa', 'string', '#6103ff', '#ff0033', '#0025ee', '#0087aa', 'string', '#6103ff', '#ff0033', '#0025ee', '#0087aa', 'string', '#6103ff', '#ff0033', '#0025ee', '#0087aa', 'string', '#6103ff','#ff0033', '#0025ee', '#0087aa', 'string', '#6103ff','#ff0033', '#0025ee', '#0087aa', 'string', '#6103ff','#ff0033', '#0025ee', '#0087aa', 'string', '#6103ff','#ff0033', '#0025ee', '#0087aa', 'string', '#6103ff','#ff0033', '#0025ee', '#0087aa', 'string', '#6103ff']
```

## New dependency (`lru`)
This uses [the popular `lru` crate](https://lib.rs/crates/lru). The new
dependency adds 19.8KB to a Linux release build of Nushell. I think this
is OK, especially since the crate can be useful elsewhere in Nu.
2022-12-23 14:30:04 -08:00
..
nu_plugin_custom_values Bump to new development version 0.73.1 (#7544) 2022-12-21 12:35:50 -06:00
nu_plugin_example Bump to new development version 0.73.1 (#7544) 2022-12-21 12:35:50 -06:00
nu_plugin_gstat Bump to new development version 0.73.1 (#7544) 2022-12-21 12:35:50 -06:00
nu_plugin_inc Bump to new development version 0.73.1 (#7544) 2022-12-21 12:35:50 -06:00
nu_plugin_python (nu_plugin_python): Send back the signature required fields. (#7489) 2022-12-15 14:37:12 -06:00
nu_plugin_query Bump to new development version 0.73.1 (#7544) 2022-12-21 12:35:50 -06:00
nu-cli let case_insensitive option work for variable completion as well (#7539) 2022-12-22 08:50:59 -06:00
nu-color-config Fix #7551 record support in color_config (#7567) 2022-12-22 12:55:50 +01:00
nu-command add metadata to wrap (#7586) 2022-12-23 15:56:28 -06:00
nu-engine Add LRU regex cache (#7587) 2022-12-23 14:30:04 -08:00
nu-explore Remove preview.rs (#7555) 2022-12-21 21:51:30 +01:00
nu-glob Bump to new development version 0.73.1 (#7544) 2022-12-21 12:35:50 -06:00
nu-json Bump to new development version 0.73.1 (#7544) 2022-12-21 12:35:50 -06:00
nu-parser tighter restrictions on alias and def names (#7392) 2022-12-22 12:31:34 -08:00
nu-path Bump to new development version 0.73.1 (#7544) 2022-12-21 12:35:50 -06:00
nu-plugin Bump to new development version 0.73.1 (#7544) 2022-12-21 12:35:50 -06:00
nu-pretty-hex Bump to new development version 0.73.1 (#7544) 2022-12-21 12:35:50 -06:00
nu-protocol Add LRU regex cache (#7587) 2022-12-23 14:30:04 -08:00
nu-system Bump to new development version 0.73.1 (#7544) 2022-12-21 12:35:50 -06:00
nu-table Bump to new development version 0.73.1 (#7544) 2022-12-21 12:35:50 -06:00
nu-term-grid Bump to new development version 0.73.1 (#7544) 2022-12-21 12:35:50 -06:00
nu-test-support Make config.filesize_format/config.filesize_metric conflict resolution consistent (#7410) 2022-12-22 08:46:55 -06:00
nu-utils Change other instances of $nothing to null (#7569) 2022-12-22 12:30:10 -08:00
old Bump to new development version 0.73.1 (#7544) 2022-12-21 12:35:50 -06:00
README.md Remove old nushell/merge engine-q 2022-02-07 14:54:06 -05:00

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.