-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
117 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"type": "cppvsdbg", | ||
"request": "launch", | ||
"name": "Debug cmd in executable 'kvs'", | ||
"program": "${workspaceFolder}/target/debug/kvs.exe", | ||
"args": [ | ||
"set", | ||
"horseradish", | ||
"clams" | ||
], | ||
"cwd": "${workspaceFolder}", | ||
"preLaunchTask": "rust: cargo build", | ||
}, | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"label": "rust: cargo build", | ||
"type": "cargo", | ||
"command": "build", | ||
"args": [ | ||
// "--package kvs", | ||
// "--bin kvs" | ||
], | ||
"options": { | ||
"cwd": "${workspaceFolder}", | ||
}, | ||
"problemMatcher": [ | ||
"$rustc" | ||
], | ||
"group": "build", | ||
} | ||
] | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,65 +2,24 @@ | |
authors = ["Abhishek Shah <[email protected]>"] | ||
description = "A key-value store called kvs" | ||
edition = "2021" | ||
name = "kvstore" | ||
# licenses = ["MIT"] | ||
version = "1.2.0" | ||
|
||
[package] | ||
authors.workspace = true | ||
description = "A key-value store called kvs" | ||
# licenses.workspace = true | ||
edition = {workspace = true} | ||
name = "kvs" | ||
version = {workspace = true} | ||
default-run = "kvs" | ||
|
||
[[bin]] | ||
description = "kvs cli to interact with kvs library" | ||
name = "kvs" | ||
path = "src/bin/main.rs" | ||
|
||
[[bin]] | ||
name = "kvs-client" | ||
path = "crates/kvs-client/src/main.rs" | ||
|
||
[[bin]] | ||
name = "kvs-server" | ||
path = "crates/kvs-server/src/main.rs" | ||
|
||
[lib] | ||
doctest = false | ||
name = "kvs" | ||
path = "src/lib.rs" | ||
test = false | ||
license = "MIT" | ||
# https://doc.rust-lang.org/cargo/reference/workspaces.html | ||
|
||
[workspace] | ||
members = ["crates/kvs-client", "crates/kvs-server"] | ||
resolver = "2" | ||
|
||
[dependencies] | ||
clap = {version = "4.1.6", features = ["derive"]} | ||
dotenv = "0.15.0" | ||
env_logger = "0.10.0" | ||
lazy_static = "1.4.0" | ||
log = "0.4.20" | ||
ron = "0.8.1" | ||
serde = {version = "1.0.188", features = ["derive"]} | ||
serde_json = "1.0.104" | ||
thiserror = "1.0.38" | ||
members = ["crates/kvs-client", "crates/kvs-server", "lib"] | ||
default-members = ["lib", "crates/kvs-client"] | ||
|
||
[workspace.dependencies] | ||
clap = {version = "4.1.6", features = ["derive"]} | ||
clap = { version = "4.1.6", features = ["derive"] } | ||
dotenv = "0.15.0" | ||
env_logger = "0.10.0" | ||
kvs = {path = "."} | ||
kvs = { path = "lib" } | ||
lazy_static = "1.4.0" | ||
log = "0.4.20" | ||
ron = "0.8.1" | ||
|
||
[dev-dependencies] | ||
assert_cmd = "0.11" | ||
criterion = "0.3" | ||
predicates = "1.0.0" | ||
rand = "0.6.5" | ||
tempfile = "3.0.7" | ||
walkdir = "2.2.7" | ||
serde = { version = "1.0.188", features = ["derive"] } | ||
serde_json = "1.0.104" | ||
thiserror = "1.0.38" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,20 @@ | ||
[package] | ||
name = "kvs-client" | ||
version = { workspace = true } | ||
version = { workspace = true } | ||
edition = "2021" | ||
authors = { workspace = true } | ||
authors = { workspace = true } | ||
license.workspace = true | ||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
|
||
[dependencies] | ||
kvs = { workspace = true } | ||
clap = { workspace = true } | ||
clap = { workspace = true } | ||
|
||
[dev-dependencies] | ||
assert_cmd = "0.11" | ||
criterion = "0.3" | ||
predicates = "1.0.0" | ||
rand = "0.6.5" | ||
tempfile = "3.0.7" | ||
walkdir = "2.2.7" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,18 @@ | ||
fn main() { | ||
println!("Hello, world! from kvs client"); | ||
exit_program(0); | ||
} | ||
/// Non-zero exit code indicates a program error | ||
fn exit_program(code: i32) -> ! { | ||
std::process::exit(code) | ||
} | ||
|
||
#[derive(Debug, clap::Parser)] | ||
struct Cli { | ||
#[arg(short, long)] | ||
get: String, | ||
#[arg(short, long)] | ||
set: String, | ||
#[arg(short, long)] | ||
rm: String, | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
[package] | ||
name = "kvs" | ||
authors.workspace = true | ||
description.workspace = true | ||
edition = { workspace = true } | ||
version = { workspace = true } | ||
|
||
[[bin]] | ||
name = "kvs" | ||
path = "src/bin/main.rs" | ||
|
||
[dependencies] | ||
clap = { version = "4.1.6", features = ["derive"] } | ||
dotenv = "0.15.0" | ||
env_logger = "0.10.0" | ||
lazy_static = "1.4.0" | ||
log = "0.4.20" | ||
ron = "0.8.1" | ||
serde = { version = "1.0.188", features = ["derive"] } | ||
serde_json = "1.0.104" | ||
thiserror = "1.0.38" | ||
|
||
[dev-dependencies] | ||
assert_cmd = "0.11" | ||
criterion = "0.3" | ||
predicates = "1.0.0" | ||
rand = "0.6.5" | ||
tempfile = "3.0.7" | ||
walkdir = "2.2.7" |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters