cbsk_base is a locked version cargo crates
you can use cbsk_base lock commonly used cargo crates versions
cbsk_base also supports some custom trait, like ToJson,FromJson and some macro
now locked version
| name | git | version |
|---|---|---|
| tokio | github | 1.38.1 |
| anyhow | github | 1.0.86 |
| once_cell | github | 1.19.0 |
| serde | github | 1.0.204 |
| serde_json | github | 1.0.120 |
| log | github | 0.4.22 |
| async-trait | github | 0.1.81 |
| async-recursion | github | 1.1.1 |
| parking_lot | github | 0.12.3 |
| fastdate | github | 0.3.30 |
serde example
use serde_derive_json,
the struct impl Serialize, will auto impl ToJson
the struct impl Deserialize, will auto impl FromJson
Cargo.toml file :
= { = "1.3.9", = ["serde_derive_json"] }
main.rs file :
use FromJson;
use ToJson;
use ;
option macro example
Cargo.toml file :
= { = "1.3.9", = ["macro", "anyhow"] }
main.rs file :
use anyhow;
root_path example
Cargo.toml file:
= { = "1.3.9", = ["root_path"] }
main.rs file: