Rust Micro Service Part0 Generate PB
Dependency
[dependencies]
anyhow = "1.0.82"
prost = "0.12.4"
prost-types = "0.12.4"
tonic = { version = "0.11.0", features = ["zstd", "tls"] }
[build-dependencies]
anyhow = "1.0.82"
tonic-build = "0.11.0"
[dependencies]
anyhow = "1.0.82"
prost = "0.12.4"
prost-types = "0.12.4"
tonic = { version = "0.11.0", features = ["zstd", "tls"] }
[build-dependencies]
anyhow = "1.0.82"
tonic-build = "0.11.0"
CREATE TYPE gender AS ENUM('female', 'male', 'unknown');
CREATE TABLE user_info(
email varchar(128) NOT NULL PRIMARY KEY,
name varchar(64) NOT NULL,
gender gender DEFAULT 'unknown',
);
[dependencies]
sha1-checked = "0.10.0"
base16ct = { version="0.2.0", features=["alloc"] }
Sha1::new()
hasher.update(content)
hasher.try_finalize()
to get the hashlet arr = hf.hash();
arr.to_vec()
We as developers often use git to manage our code. But do you know how git works?
And as a Curious developer, I want to know how git works.
Some questions I want to know are:
git add
git commit -m "message"
#[derive(Debug, Subcommand)]
pub enum GitSubCommand {
#[command(name = "init", about = "init a git repo")]
Init(InitOpts),
#[command(name = "add", about = "add files into index")]
Add(AddOpts),
}
We use git to manage our code, and do version control.
git init
or git clone
to start a project locally.git add
to add the files to the staging area.git commit
to commit the changes to the local repository.git push
to push the files to the remote repository.git pull origin master
to pull the changes from the remote repository.git checkout -b <new_branch>
to create and checkout to a new branch.git rebase master
to rebase changes from master to the current branch.JSON (JavaScript Object Notation) is a lightweight data-interchange format. It is easy for humans to read and write. It is easy for machines to parse and generate. It is based on a subset of the JavaScript Programming Language Standard ECMA-262 3rd Edition - December 1999.
in the first version of the deduplicate:
dedup_data
.So, I want to build a Cli App that convert a csv file to json, yaml, toml formated file.
And for Rust, there is crate clap
was used to build cli app.
And the final command to use the cli app, is something like this:
./target/debug/rcli csv -i test.csv