forked from extern/nushell
# Description This adds a `SharedCow` type as a transparent copy-on-write pointer that clones to unique on mutate. As an initial test, the `Record` within `Value::Record` is shared. There are some pretty big wins for performance. I'll post benchmark results in a comment. The biggest winner is nested access, as that would have cloned the records for each cell path follow before and it doesn't have to anymore. The reusability of the `SharedCow` type is nice and I think it could be used to clean up the previous work I did with `Arc` in `EngineState`. It's meant to be a mostly transparent clone-on-write that just clones on `.to_mut()` or `.into_owned()` if there are actually multiple references, but avoids cloning if the reference is unique. # User-Facing Changes - `Value::Record` field is a different type (plugin authors) # Tests + Formatting - 🟢 `toolkit fmt` - 🟢 `toolkit clippy` - 🟢 `toolkit test` - 🟢 `toolkit test stdlib` # After Submitting - [ ] use for `EngineState` - [ ] use for `Value::List`
33 lines
830 B
TOML
33 lines
830 B
TOML
[package]
|
|
authors = ["The Nushell Project Developers"]
|
|
description = "Functionality for building Nushell plugins"
|
|
repository = "https://github.com/nushell/nushell/tree/main/crates/nu-plugin"
|
|
edition = "2021"
|
|
license = "MIT"
|
|
name = "nu-plugin"
|
|
version = "0.92.3"
|
|
|
|
[lib]
|
|
bench = false
|
|
|
|
[dependencies]
|
|
nu-engine = { path = "../nu-engine", version = "0.92.3" }
|
|
nu-protocol = { path = "../nu-protocol", version = "0.92.3" }
|
|
nu-utils = { path = "../nu-utils", version = "0.92.3" }
|
|
|
|
bincode = "1.3"
|
|
rmp-serde = "1.1"
|
|
serde = { workspace = true }
|
|
serde_json = { workspace = true }
|
|
log = "0.4"
|
|
miette = { workspace = true }
|
|
semver = "1.0"
|
|
typetag = "0.2"
|
|
thiserror = "1.0"
|
|
|
|
[target.'cfg(target_os = "windows")'.dependencies]
|
|
windows = { workspace = true, features = [
|
|
# For setting process creation flags
|
|
"Win32_System_Threading",
|
|
] }
|