document: https://diesel.rs/guides/getting-started/ https://www.rectcircle.cn/posts/rust-diesel/ install: 1 2 // 只安装pg依赖 cargo install diesel_cli --no-default-features --features postgres 配置文件 1 2 3 # echo DATABASE_URL=postgres://username:password@localhost/diesel_demo > .env echo DATABASE_URL=postgres://localhost/test?user=root&password=example > .env cargo.toml 目前只支持uuid 0.6 1 2 3 4 diesel = { version = "1.4.4", features = ["postgres", "numeric", "chrono", "uuid"] } bigdecimal = "0.0.14" chrono = "0.4"