Skip to content

Commit

Permalink
move shrs crate to crates/shrs
Browse files Browse the repository at this point in the history
We keep the shrs_example crate in the repository root since it depends
on both the "shrs" crate, as well as the plugins, so having it under
`crates/shrs/examples/` would be a bit arbitrary, since it rather acts
as an integration test for all the crates and plugins.

Resolves #233.
  • Loading branch information
not-my-profile committed Aug 8, 2023
1 parent 1c3fe81 commit 0b5bf0d
Show file tree
Hide file tree
Showing 21 changed files with 67 additions and 81 deletions.
72 changes: 2 additions & 70 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,74 +1,6 @@
[package]
name = "shrs"
version = "0.0.1"
edition = "2021"
license = "MIT OR Apache-2.0"
authors = ["MrPicklePinosaur"]
description = "modular library to build your own shell in rust"
homepage = "https://mrpicklepinosaur.github.io/shrs/"
categories = ["command-line-interface", "command-line-utilities", "development-tools"]
keywords = ["shrs", "shell", "posix", "unix"]
readme = "README.md"
repository = "https://github.com/MrPicklePinosaur/shrs"

[workspace]
members = [
"shrs_example",
"crates/shrs_core",
"crates/shrs_line",
"crates/shrs_lang",
"crates/shrs_vi",
"crates/shrs_utils",
"crates/shrs_job",
"plugins/shrs_output_capture",
"plugins/shrs_cd_tools",
"plugins/shrs_command_timer",
"plugins/shrs_derive_completion",
"plugins/shrs_run_context",
"plugins/shrs_mux",
"plugins/shrs_cd_stack",
"plugins/shrs_lang_options",
"plugins/shrs_file_logger"
"crates/*",
"plugins/*",
]

[features]
default = ["serde"]
serde = ["dep:serde", "shrs_core/serde"]

[dependencies]
regex = "1"
signal-hook = "0.3"
clap = { version = "4.1", features = ["derive"] }
crossterm = "0.26"
derive_builder = "0.12"
dirs = "5"

pino_deref = "0.1"

thiserror = "1"
anyhow = "1"
lazy_static = "1.4"
log = "0.4"

shrs_core = { path = "crates/shrs_core", version = "0.0.1-dev" }
shrs_line = { path = "crates/shrs_line", version = "0.0.1-dev" }
shrs_lang = { path = "crates/shrs_lang", version = "0.0.1-dev" }
shrs_job = { path = "crates/shrs_job", version = "0.0.1-dev" }

serde = { version = "1", features = ["derive"], optional = true }

[dev-dependencies]
rexpect = "0.5"

ron = "0.8"
serde = { version = "1", features = ["derive"] }
criterion = { version = "0.5" }

[target.x86_64-unknown-linux-gnu]
linker = "/usr/bin/clang"
rustflags = ["-Clink-arg=-fuse-ld=lld", "-Clink-arg=-Wl,--no-rosegment"]

[[bench]]
name = "bench"
harness = false

54 changes: 54 additions & 0 deletions crates/shrs/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
[package]
name = "shrs"
version = "0.0.1"
edition = "2021"
license = "MIT OR Apache-2.0"
authors = ["MrPicklePinosaur"]
description = "modular library to build your own shell in rust"
homepage = "https://mrpicklepinosaur.github.io/shrs/"
categories = ["command-line-interface", "command-line-utilities", "development-tools"]
keywords = ["shrs", "shell", "posix", "unix"]
readme = "README.md"
repository = "https://github.com/MrPicklePinosaur/shrs"

[features]
default = ["serde"]
serde = ["dep:serde", "shrs_core/serde"]

[dependencies]
regex = "1"
signal-hook = "0.3"
clap = { version = "4.1", features = ["derive"] }
crossterm = "0.26"
derive_builder = "0.12"
dirs = "5"

pino_deref = "0.1"

thiserror = "1"
anyhow = "1"
lazy_static = "1.4"
log = "0.4"

shrs_core = { path = "../shrs_core", version = "0.0.1-dev" }
shrs_line = { path = "../shrs_line", version = "0.0.1-dev" }
shrs_lang = { path = "../shrs_lang", version = "0.0.1-dev" }
shrs_job = { path = "../shrs_job", version = "0.0.1-dev" }

serde = { version = "1", features = ["derive"], optional = true }

[dev-dependencies]
rexpect = "0.5"

ron = "0.8"
serde = { version = "1", features = ["derive"] }
criterion = { version = "0.5" }

[target.x86_64-unknown-linux-gnu]
linker = "/usr/bin/clang"
rustflags = ["-Clink-arg=-fuse-ld=lld", "-Clink-arg=-Wl,--no-rosegment"]

[[bench]]
name = "bench"
harness = false

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion docs/content/docs/getting-started/example-shell.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ toc = true
top = false
+++

[shrs_example](https://github.com/MrPicklePinosaur/shrs/tree/master/shrs_example)
[shrs_example](https://github.com/MrPicklePinosaur/shrs/tree/master/crates/shrs/examples/shrs_example)
is an example shell that makes use of the default features provided by
**shrs**. If you want a working shell quickly, you can simply install the
binary directly. However, the goal of **shrs** is to provide a fully
Expand Down
2 changes: 1 addition & 1 deletion plugins/shrs_cd_stack/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ readme = "README.md"
repository = "https://github.com/MrPicklePinosaur/shrs"

[dependencies]
shrs = { path = "../../", version = "0.0.1" }
shrs = { path = "../../crates/shrs", version = "0.0.1" }
2 changes: 1 addition & 1 deletion plugins/shrs_cd_tools/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ description = "Variety of utilities for running commands conditionally on direct
repository = "https://github.com/MrPicklePinosaur/sh.rs"

[dependencies]
shrs = { path = "../../", version = "0.0.1-dev" }
shrs = { path = "../../crates/shrs", version = "0.0.1-dev" }

derive_builder = "0.12"
anymap = "0.12"
Expand Down
2 changes: 1 addition & 1 deletion plugins/shrs_command_timer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ readme = "README.md"
repository = "https://github.com/MrPicklePinosaur/shrs"

[dependencies]
shrs = { path = "../../", version = "0.0.1" }
shrs = { path = "../../crates/shrs", version = "0.0.1" }
2 changes: 1 addition & 1 deletion plugins/shrs_derive_completion/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ name = "tests"
path = "tests/test.rs"

[dependencies]
shrs = { path = "../../", version = "0.0.1" }
shrs = { path = "../../crates/shrs", version = "0.0.1" }

derive_builder = "0.12"

Expand Down
2 changes: 1 addition & 1 deletion plugins/shrs_file_logger/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ readme = "README.md"
repository = "https://github.com/MrPicklePinosaur/shrs"

[dependencies]
shrs = { path = "../../", version = "0.0.1" }
shrs = { path = "../../crates/shrs", version = "0.0.1" }

log4rs = { version = "1.2" }
log = { version = "0.4" }
2 changes: 1 addition & 1 deletion plugins/shrs_lang_options/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ readme = "README.md"
repository = "https://github.com/MrPicklePinosaur/shrs"

[dependencies]
shrs = { path = "../../", version = "0.0.1" }
shrs = { path = "../../crates/shrs", version = "0.0.1" }
shrs_mux = {path = "../shrs_mux/", version = "0.0.1"}

2 changes: 1 addition & 1 deletion plugins/shrs_mux/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ readme = "README.md"
repository = "https://github.com/MrPicklePinosaur/shrs"

[dependencies]
shrs = { path = "../../", version = "0.0.1" }
shrs = { path = "../../crates/shrs", version = "0.0.1" }
2 changes: 1 addition & 1 deletion plugins/shrs_output_capture/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ readme = "README.md"
repository = "https://github.com/MrPicklePinosaur/shrs"

[dependencies]
shrs = { path = "../../", version = "0.0.1" }
shrs = { path = "../../crates/shrs", version = "0.0.1" }
2 changes: 1 addition & 1 deletion plugins/shrs_run_context/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ description = "Save and load run context"
repository = "https://github.com/MrPicklePinosaur/sh.rs"

[dependencies]
shrs = { path = "../../", version = "0.0.1", features = ["serde"] }
shrs = { path = "../../crates/shrs", version = "0.0.1", features = ["serde"] }
clap = { version = "4.1", features = ["derive"] }

ron = { version = "0.8" }
2 changes: 1 addition & 1 deletion shrs_example/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ repository = "https://github.com/MrPicklePinosaur/sh.rs"
build = "build.rs"

[dependencies]
shrs = { path = "../", version = "0.0.1" }
shrs = { path = "../crates/shrs", version = "0.0.1" }
shrs_output_capture = { path = "../plugins/shrs_output_capture", version = "0.0.1" }
shrs_cd_tools = { path = "../plugins/shrs_cd_tools", version = "0.0.1" }
shrs_command_timer = { path = "../plugins/shrs_command_timer", version = "0.0.1" }
Expand Down

0 comments on commit 0b5bf0d

Please sign in to comment.