-
Notifications
You must be signed in to change notification settings - Fork 1
/
Cargo.toml
66 lines (60 loc) · 2.26 KB
/
Cargo.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
[package]
authors = ["lingdu <[email protected]>"]
categories = ["database"]
description = "❤ casbin adapter for rust with sea_orm"
documentation = "https://docs.rs/sea_orm_casbin_adapter"
edition = "2021"
homepage = "https://github.com/lingdu1234/sea_orm_casbin_adapter.git"
keywords = ["casbin", "mysql", "postgres", "sqlite", "sea_orm"]
license = "MIT"
name = "sea_orm_casbin_adapter"
readme = "README.md"
repository = "https://github.com/lingdu1234/sea_orm_casbin_adapter.git"
version = "0.3.8"
[package.metadata.docs.rs]
features = ["mysql", "runtime-tokio-rustls"]
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
async-trait = "0.1.53"
casbin = {version = "2.0.9", default-features = false, features = ["logging"]}
# option
actix-rt = {version = "2.7.0", default-features = false, optional = true}
async-std = {version = "1.11.0", optional = true}
sqlx = {version = "^0.5", optional = true}
tokio = {version = "1.18.2", optional = true, default-features = false}
[dev-dependencies]
tokio = {version = "1.18.2", features = ["full"]}
[dependencies.sea-orm]
default-features = false
features = ["macros"]
version = "0.8"
[features]
default = []
# default = ["mysql", "runtime-tokio-rustls"]
# sea-orm
mysql = ["sea-orm/sqlx-mysql"]
postgres = ["sea-orm/sqlx-postgres"]
sqlite = ["sea-orm/sqlx-sqlite"]
# casbin
# casbin_runtime = []
# runtime-async-std = ["async-std"]
# runtime-tokio = ["tokio/fs", "tokio/io-util"]
# async runtime
# async-std
async_runtime = []
runtime-async-std-native-tls = ["casbin/runtime-async-std", "sqlx/runtime-async-std-native-tls"]
runtime-async-std-rustls = ["casbin/runtime-async-std", "sqlx/runtime-async-std-rustls"]
# tokio
runtime-tokio-native-tls = ["casbin/runtime-tokio", "sqlx/runtime-tokio-native-tls"]
runtime-tokio-rustls = ["casbin/runtime-tokio", "sqlx/runtime-tokio-rustls"]
# actix (actually based on tokio)
runtime-actix-native-tls = ["casbin/runtime-tokio", "sqlx/runtime-actix-native-tls"]
runtime-actix-rustls = ["casbin/runtime-tokio", "sqlx/runtime-actix-rustls"]
[profile.release]
codegen-units = 1
debug = false
lto = true
opt-level = "z" # Optimize for size.
panic = 'abort'
# cargo build --features mysql,runtime-tokio-rustls
# crm publish --features mysql,runtime-tokio-rustls