Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
22bd8e4737
|
|||
|
e1e3a8bf8d
|
|||
| 208539f559 | |||
| ab91c3fa4f |
@@ -13,15 +13,16 @@ jobs:
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v5
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
fetch-depth: 0 # Important for git describe --tags
|
||||
|
||||
- name: Install Rust
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: 1.95
|
||||
toolchain: 1.96.1
|
||||
components: cargo
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
|
||||
- name: Extract Version from Cargo.toml
|
||||
id: version
|
||||
|
||||
@@ -13,45 +13,55 @@ jobs:
|
||||
name: Check
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||
with:
|
||||
toolchain: 1.95
|
||||
toolchain: 1.96.1
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
- run: cargo check
|
||||
|
||||
test:
|
||||
name: Test Suite
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||
with:
|
||||
toolchain: 1.95
|
||||
toolchain: 1.96.1
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
- run: cargo test
|
||||
|
||||
fmt:
|
||||
name: Rustfmt
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||
with:
|
||||
toolchain: 1.95
|
||||
toolchain: 1.96.1
|
||||
- run: rustup component add rustfmt
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
- run: cargo fmt --all -- --check
|
||||
|
||||
clippy:
|
||||
name: Clippy
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||
with:
|
||||
toolchain: 1.95
|
||||
toolchain: 1.96.1
|
||||
- run: rustup component add clippy
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
- run: cargo clippy -- -D warnings
|
||||
|
||||
build:
|
||||
name: build
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||
with:
|
||||
toolchain: 1.95
|
||||
toolchain: 1.96.1
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
- run: cargo build
|
||||
|
||||
Generated
+3
-497
@@ -2,171 +2,6 @@
|
||||
# It is not intended for manual editing.
|
||||
version = 4
|
||||
|
||||
[[package]]
|
||||
name = "async-channel"
|
||||
version = "1.9.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "81953c529336010edd6d8e358f886d9581267795c61b19475b71314bffa46d35"
|
||||
dependencies = [
|
||||
"concurrent-queue",
|
||||
"event-listener 2.5.3",
|
||||
"futures-core",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "async-channel"
|
||||
version = "2.5.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "924ed96dd52d1b75e9c1a3e6275715fd320f5f9439fb5a4a11fa51f4221158d2"
|
||||
dependencies = [
|
||||
"concurrent-queue",
|
||||
"event-listener-strategy",
|
||||
"futures-core",
|
||||
"pin-project-lite",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "async-executor"
|
||||
version = "1.14.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c96bf972d85afc50bf5ab8fe2d54d1586b4e0b46c97c50a0c9e71e2f7bcd812a"
|
||||
dependencies = [
|
||||
"async-task",
|
||||
"concurrent-queue",
|
||||
"fastrand",
|
||||
"futures-lite",
|
||||
"pin-project-lite",
|
||||
"slab",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "async-global-executor"
|
||||
version = "2.4.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "05b1b633a2115cd122d73b955eadd9916c18c8f510ec9cd1686404c60ad1c29c"
|
||||
dependencies = [
|
||||
"async-channel 2.5.0",
|
||||
"async-executor",
|
||||
"async-io",
|
||||
"async-lock",
|
||||
"blocking",
|
||||
"futures-lite",
|
||||
"once_cell",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "async-io"
|
||||
version = "2.6.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "456b8a8feb6f42d237746d4b3e9a178494627745c3c56c6ea55d92ba50d026fc"
|
||||
dependencies = [
|
||||
"autocfg",
|
||||
"cfg-if",
|
||||
"concurrent-queue",
|
||||
"futures-io",
|
||||
"futures-lite",
|
||||
"parking",
|
||||
"polling",
|
||||
"rustix",
|
||||
"slab",
|
||||
"windows-sys",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "async-lock"
|
||||
version = "3.4.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "290f7f2596bd5b78a9fec8088ccd89180d7f9f55b94b0576823bbbdc72ee8311"
|
||||
dependencies = [
|
||||
"event-listener 5.4.1",
|
||||
"event-listener-strategy",
|
||||
"pin-project-lite",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "async-std"
|
||||
version = "1.13.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2c8e079a4ab67ae52b7403632e4618815d6db36d2a010cfe41b02c1b1578f93b"
|
||||
dependencies = [
|
||||
"async-channel 1.9.0",
|
||||
"async-global-executor",
|
||||
"async-io",
|
||||
"async-lock",
|
||||
"crossbeam-utils",
|
||||
"futures-channel",
|
||||
"futures-core",
|
||||
"futures-io",
|
||||
"futures-lite",
|
||||
"gloo-timers",
|
||||
"kv-log-macro",
|
||||
"log",
|
||||
"memchr",
|
||||
"once_cell",
|
||||
"pin-project-lite",
|
||||
"pin-utils",
|
||||
"slab",
|
||||
"wasm-bindgen-futures",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "async-task"
|
||||
version = "4.7.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de"
|
||||
|
||||
[[package]]
|
||||
name = "atomic-waker"
|
||||
version = "1.1.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0"
|
||||
|
||||
[[package]]
|
||||
name = "autocfg"
|
||||
version = "1.5.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8"
|
||||
|
||||
[[package]]
|
||||
name = "bitflags"
|
||||
version = "2.11.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c4512299f36f043ab09a583e57bceb5a5aab7a73db1805848e8fef3c9e8c78b3"
|
||||
|
||||
[[package]]
|
||||
name = "blocking"
|
||||
version = "1.6.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e83f8d02be6967315521be875afa792a316e28d57b5a2d401897e2a7921b7f21"
|
||||
dependencies = [
|
||||
"async-channel 2.5.0",
|
||||
"async-task",
|
||||
"futures-io",
|
||||
"futures-lite",
|
||||
"piper",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "bumpalo"
|
||||
version = "3.20.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5d20789868f4b01b2f2caec9f5c4e0213b41e3e5702a50157d699ae31ced2fcb"
|
||||
|
||||
[[package]]
|
||||
name = "cfg-if"
|
||||
version = "1.0.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801"
|
||||
|
||||
[[package]]
|
||||
name = "concurrent-queue"
|
||||
version = "2.5.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973"
|
||||
dependencies = [
|
||||
"crossbeam-utils",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "const_format"
|
||||
version = "0.2.36"
|
||||
@@ -188,152 +23,20 @@ dependencies = [
|
||||
"unicode-xid",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "crossbeam-utils"
|
||||
version = "0.8.21"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28"
|
||||
|
||||
[[package]]
|
||||
name = "dotenvy"
|
||||
version = "0.15.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b"
|
||||
|
||||
[[package]]
|
||||
name = "errno"
|
||||
version = "0.3.14"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb"
|
||||
dependencies = [
|
||||
"libc",
|
||||
"windows-sys",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "event-listener"
|
||||
version = "2.5.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0"
|
||||
|
||||
[[package]]
|
||||
name = "event-listener"
|
||||
version = "5.4.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e13b66accf52311f30a0db42147dadea9850cb48cd070028831ae5f5d4b856ab"
|
||||
dependencies = [
|
||||
"concurrent-queue",
|
||||
"parking",
|
||||
"pin-project-lite",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "event-listener-strategy"
|
||||
version = "0.5.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8be9f3dfaaffdae2972880079a491a1a8bb7cbed0b8dd7a347f668b4150a3b93"
|
||||
dependencies = [
|
||||
"event-listener 5.4.1",
|
||||
"pin-project-lite",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "fastrand"
|
||||
version = "2.4.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9f1f227452a390804cdb637b74a86990f2a7d7ba4b7d5693aac9b4dd6defd8d6"
|
||||
|
||||
[[package]]
|
||||
name = "futures-channel"
|
||||
version = "0.3.32"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "07bbe89c50d7a535e539b8c17bc0b49bdb77747034daa8087407d655f3f7cc1d"
|
||||
dependencies = [
|
||||
"futures-core",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "futures-core"
|
||||
version = "0.3.32"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7e3450815272ef58cec6d564423f6e755e25379b217b0bc688e295ba24df6b1d"
|
||||
|
||||
[[package]]
|
||||
name = "futures-io"
|
||||
version = "0.3.32"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "cecba35d7ad927e23624b22ad55235f2239cfa44fd10428eecbeba6d6a717718"
|
||||
|
||||
[[package]]
|
||||
name = "futures-lite"
|
||||
version = "2.6.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f78e10609fe0e0b3f4157ffab1876319b5b0db102a2c60dc4626306dc46b44ad"
|
||||
dependencies = [
|
||||
"fastrand",
|
||||
"futures-core",
|
||||
"futures-io",
|
||||
"parking",
|
||||
"pin-project-lite",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "futures-task"
|
||||
version = "0.3.32"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "037711b3d59c33004d3856fbdc83b99d4ff37a24768fa1be9ce3538a1cde4393"
|
||||
|
||||
[[package]]
|
||||
name = "futures-util"
|
||||
version = "0.3.32"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "389ca41296e6190b48053de0321d02a77f32f8a5d2461dd38762c0593805c6d6"
|
||||
dependencies = [
|
||||
"futures-core",
|
||||
"futures-task",
|
||||
"pin-project-lite",
|
||||
"slab",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "gloo-timers"
|
||||
version = "0.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "bbb143cf96099802033e0d4f4963b19fd2e0b728bcf076cd9cf7f6634f092994"
|
||||
dependencies = [
|
||||
"futures-channel",
|
||||
"futures-core",
|
||||
"js-sys",
|
||||
"wasm-bindgen",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "hermit-abi"
|
||||
version = "0.5.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "fc0fef456e4baa96da950455cd02c081ca953b141298e41db3fc7e36b1da849c"
|
||||
|
||||
[[package]]
|
||||
name = "icarus_envy"
|
||||
version = "0.7.0"
|
||||
version = "0.8.0"
|
||||
dependencies = [
|
||||
"async-std",
|
||||
"const_format",
|
||||
"dotenvy",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "js-sys"
|
||||
version = "0.3.97"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a1840c94c045fbcf8ba2812c95db44499f7c64910a912551aaaa541decebcacf"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"futures-util",
|
||||
"once_cell",
|
||||
"wasm-bindgen",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "konst"
|
||||
version = "0.2.20"
|
||||
@@ -349,91 +52,6 @@ version = "0.2.19"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a4933f3f57a8e9d9da04db23fb153356ecaf00cbd14aee46279c33dc80925c37"
|
||||
|
||||
[[package]]
|
||||
name = "kv-log-macro"
|
||||
version = "1.0.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0de8b303297635ad57c9f5059fd9cee7a47f8e8daa09df0fcd07dd39fb22977f"
|
||||
dependencies = [
|
||||
"log",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
version = "0.2.186"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "68ab91017fe16c622486840e4c83c9a37afeff978bd239b5293d61ece587de66"
|
||||
|
||||
[[package]]
|
||||
name = "linux-raw-sys"
|
||||
version = "0.12.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53"
|
||||
|
||||
[[package]]
|
||||
name = "log"
|
||||
version = "0.4.29"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897"
|
||||
dependencies = [
|
||||
"value-bag",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "memchr"
|
||||
version = "2.8.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79"
|
||||
|
||||
[[package]]
|
||||
name = "once_cell"
|
||||
version = "1.21.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50"
|
||||
|
||||
[[package]]
|
||||
name = "parking"
|
||||
version = "2.2.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba"
|
||||
|
||||
[[package]]
|
||||
name = "pin-project-lite"
|
||||
version = "0.2.17"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd"
|
||||
|
||||
[[package]]
|
||||
name = "pin-utils"
|
||||
version = "0.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184"
|
||||
|
||||
[[package]]
|
||||
name = "piper"
|
||||
version = "0.2.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c835479a4443ded371d6c535cbfd8d31ad92c5d23ae9770a61bc155e4992a3c1"
|
||||
dependencies = [
|
||||
"atomic-waker",
|
||||
"fastrand",
|
||||
"futures-io",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "polling"
|
||||
version = "3.11.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5d0e4f59085d47d8241c88ead0f274e8a0cb551f3625263c05eb8dd897c34218"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"concurrent-queue",
|
||||
"hermit-abi",
|
||||
"pin-project-lite",
|
||||
"rustix",
|
||||
"windows-sys",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "proc-macro2"
|
||||
version = "1.0.106"
|
||||
@@ -445,49 +63,13 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "quote"
|
||||
version = "1.0.45"
|
||||
version = "1.0.46"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924"
|
||||
checksum = "dfbc457d0c7a0759a614551b11a6409e5951f6c7537be1f1b7682b9ae9230368"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rustix"
|
||||
version = "1.1.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b6fe4565b9518b83ef4f91bb47ce29620ca828bd32cb7e408f0062e9930ba190"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
"errno",
|
||||
"libc",
|
||||
"linux-raw-sys",
|
||||
"windows-sys",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rustversion"
|
||||
version = "1.0.22"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d"
|
||||
|
||||
[[package]]
|
||||
name = "slab"
|
||||
version = "0.4.12"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5"
|
||||
|
||||
[[package]]
|
||||
name = "syn"
|
||||
version = "2.0.117"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"unicode-ident",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "unicode-ident"
|
||||
version = "1.0.24"
|
||||
@@ -499,79 +81,3 @@ name = "unicode-xid"
|
||||
version = "0.2.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853"
|
||||
|
||||
[[package]]
|
||||
name = "value-bag"
|
||||
version = "1.12.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7ba6f5989077681266825251a52748b8c1d8a4ad098cc37e440103d0ea717fc0"
|
||||
|
||||
[[package]]
|
||||
name = "wasm-bindgen"
|
||||
version = "0.2.120"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "df52b6d9b87e0c74c9edfa1eb2d9bf85e5d63515474513aa50fa181b3c4f5db1"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"once_cell",
|
||||
"rustversion",
|
||||
"wasm-bindgen-macro",
|
||||
"wasm-bindgen-shared",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wasm-bindgen-futures"
|
||||
version = "0.4.70"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "af934872acec734c2d80e6617bbb5ff4f12b052dd8e6332b0817bce889516084"
|
||||
dependencies = [
|
||||
"js-sys",
|
||||
"wasm-bindgen",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wasm-bindgen-macro"
|
||||
version = "0.2.120"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "78b1041f495fb322e64aca85f5756b2172e35cd459376e67f2a6c9dffcedb103"
|
||||
dependencies = [
|
||||
"quote",
|
||||
"wasm-bindgen-macro-support",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wasm-bindgen-macro-support"
|
||||
version = "0.2.120"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9dcd0ff20416988a18ac686d4d4d0f6aae9ebf08a389ff5d29012b05af2a1b41"
|
||||
dependencies = [
|
||||
"bumpalo",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn",
|
||||
"wasm-bindgen-shared",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wasm-bindgen-shared"
|
||||
version = "0.2.120"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "49757b3c82ebf16c57d69365a142940b384176c24df52a087fb748e2085359ea"
|
||||
dependencies = [
|
||||
"unicode-ident",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "windows-link"
|
||||
version = "0.2.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5"
|
||||
|
||||
[[package]]
|
||||
name = "windows-sys"
|
||||
version = "0.61.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc"
|
||||
dependencies = [
|
||||
"windows-link",
|
||||
]
|
||||
|
||||
+1
-2
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "icarus_envy"
|
||||
version = "0.7.0"
|
||||
version = "0.8.0"
|
||||
edition = "2024"
|
||||
rust-version = "1.95"
|
||||
|
||||
@@ -9,4 +9,3 @@ dotenvy = { version = "0.15.7" }
|
||||
const_format = { version = "0.2.36" }
|
||||
|
||||
[dev-dependencies]
|
||||
async-std = { version = "1.13.2" }
|
||||
|
||||
+13
-13
@@ -1,4 +1,4 @@
|
||||
pub async fn get_db_url() -> crate::EnvVar {
|
||||
pub fn get_db_url() -> crate::EnvVar {
|
||||
dotenvy::dotenv().ok();
|
||||
let key = crate::keys::DB_URL;
|
||||
let value = std::env::var(key).expect(key);
|
||||
@@ -6,7 +6,7 @@ pub async fn get_db_url() -> crate::EnvVar {
|
||||
crate::init_envvar(key, &value)
|
||||
}
|
||||
|
||||
pub async fn get_secret_main_key() -> crate::EnvVar {
|
||||
pub fn get_secret_main_key() -> crate::EnvVar {
|
||||
dotenvy::dotenv().ok();
|
||||
let key = crate::keys::SECRET_MAIN_KEY;
|
||||
let value = std::env::var(key).expect(key);
|
||||
@@ -14,7 +14,7 @@ pub async fn get_secret_main_key() -> crate::EnvVar {
|
||||
crate::init_envvar(key, &value)
|
||||
}
|
||||
|
||||
pub async fn get_service_passphrase() -> crate::EnvVar {
|
||||
pub fn get_service_passphrase() -> crate::EnvVar {
|
||||
dotenvy::dotenv().ok();
|
||||
let key = crate::keys::SERVICE_PASSPHRASE;
|
||||
let value = std::env::var(key).expect(key);
|
||||
@@ -22,7 +22,7 @@ pub async fn get_service_passphrase() -> crate::EnvVar {
|
||||
crate::init_envvar(key, &value)
|
||||
}
|
||||
|
||||
pub async fn get_secret_key() -> crate::EnvVar {
|
||||
pub fn get_secret_key() -> crate::EnvVar {
|
||||
dotenvy::dotenv().ok();
|
||||
let key = crate::keys::SECRET_KEY;
|
||||
let value = std::env::var(key).expect(key);
|
||||
@@ -30,7 +30,7 @@ pub async fn get_secret_key() -> crate::EnvVar {
|
||||
crate::init_envvar(key, &value)
|
||||
}
|
||||
|
||||
pub async fn get_root_directory() -> crate::EnvVar {
|
||||
pub fn get_root_directory() -> crate::EnvVar {
|
||||
dotenvy::dotenv().ok();
|
||||
let key = crate::keys::ROOT_DIRECTORY;
|
||||
let value = std::env::var(key).expect(key);
|
||||
@@ -38,7 +38,7 @@ pub async fn get_root_directory() -> crate::EnvVar {
|
||||
crate::init_envvar(key, &value)
|
||||
}
|
||||
|
||||
pub async fn get_icarus_base_api_url() -> crate::EnvVar {
|
||||
pub fn get_icarus_base_api_url() -> crate::EnvVar {
|
||||
dotenvy::dotenv().ok();
|
||||
let key = crate::keys::ICARUS_BASE_API_URL;
|
||||
let value = std::env::var(key).expect(key);
|
||||
@@ -46,7 +46,7 @@ pub async fn get_icarus_base_api_url() -> crate::EnvVar {
|
||||
crate::init_envvar(key, &value)
|
||||
}
|
||||
|
||||
pub async fn get_icarus_auth_base_api_url() -> crate::EnvVar {
|
||||
pub fn get_icarus_auth_base_api_url() -> crate::EnvVar {
|
||||
dotenvy::dotenv().ok();
|
||||
let key = crate::keys::ICARUS_AUTH_BASE_API_URL;
|
||||
let value = std::env::var(key).expect(key);
|
||||
@@ -54,7 +54,7 @@ pub async fn get_icarus_auth_base_api_url() -> crate::EnvVar {
|
||||
crate::init_envvar(key, &value)
|
||||
}
|
||||
|
||||
pub async fn get_app_env() -> crate::EnvVar {
|
||||
pub fn get_app_env() -> crate::EnvVar {
|
||||
dotenvy::dotenv().ok();
|
||||
let key = crate::keys::APP_ENV;
|
||||
let value = std::env::var(key).expect(key);
|
||||
@@ -62,14 +62,14 @@ pub async fn get_app_env() -> crate::EnvVar {
|
||||
crate::init_envvar(key, &value)
|
||||
}
|
||||
|
||||
pub async fn get_backend_port() -> crate::EnvVar {
|
||||
pub fn get_backend_port() -> crate::EnvVar {
|
||||
dotenvy::dotenv().ok();
|
||||
let key = crate::keys::BACKEND_PORT;
|
||||
let value = std::env::var(key).expect(key);
|
||||
crate::init_envvar(key, &value)
|
||||
}
|
||||
|
||||
pub async fn get_frontend_url() -> crate::EnvVar {
|
||||
pub fn get_frontend_url() -> crate::EnvVar {
|
||||
dotenvy::dotenv().ok();
|
||||
let key = crate::keys::FRONTEND_URL;
|
||||
let value = std::env::var(key).expect(key);
|
||||
@@ -77,7 +77,7 @@ pub async fn get_frontend_url() -> crate::EnvVar {
|
||||
crate::init_envvar(key, &value)
|
||||
}
|
||||
|
||||
pub async fn get_rust_log() -> crate::EnvVar {
|
||||
pub fn get_rust_log() -> crate::EnvVar {
|
||||
dotenvy::dotenv().ok();
|
||||
let key = crate::keys::RUST_LOG;
|
||||
let value = std::env::var(key).expect(key);
|
||||
@@ -85,7 +85,7 @@ pub async fn get_rust_log() -> crate::EnvVar {
|
||||
crate::init_envvar(key, &value)
|
||||
}
|
||||
|
||||
pub async fn get_allowed_origins() -> crate::EnvVar {
|
||||
pub fn get_allowed_origins() -> crate::EnvVar {
|
||||
dotenvy::dotenv().ok();
|
||||
let key = crate::keys::ALLOWED_ORIGINS;
|
||||
let value = std::env::var(key).expect(key);
|
||||
@@ -97,7 +97,7 @@ pub async fn get_allowed_origins() -> crate::EnvVar {
|
||||
}
|
||||
|
||||
/// Get environment not specified in the code
|
||||
pub async fn get_env(environment: &str) -> crate::EnvVar {
|
||||
pub fn get_env(environment: &str) -> crate::EnvVar {
|
||||
dotenvy::dotenv().ok();
|
||||
let my_error = format!("{environment} {}", crate::keys::error::GENERAL_ERROR);
|
||||
let value = std::env::var(environment).expect(&my_error);
|
||||
|
||||
+12
-12
@@ -2,7 +2,7 @@
|
||||
mod tests {
|
||||
#[test]
|
||||
fn test_dburl() {
|
||||
let result = async_std::task::block_on(icarus_envy::environment::get_db_url());
|
||||
let result = icarus_envy::environment::get_db_url();
|
||||
assert_eq!(
|
||||
result.value, "postgres://myuser:password@localhost:5432/my_db",
|
||||
"DATABASE_URL does not match {:?}",
|
||||
@@ -12,7 +12,7 @@ mod tests {
|
||||
|
||||
#[test]
|
||||
fn test_get_secret_main_key() {
|
||||
let result = async_std::task::block_on(icarus_envy::environment::get_secret_main_key());
|
||||
let result = icarus_envy::environment::get_secret_main_key();
|
||||
assert_eq!(
|
||||
result.value, "Somesupersecretpassword!!!45345435",
|
||||
"SECRET_MAIN_KEY does not match {:?}",
|
||||
@@ -22,7 +22,7 @@ mod tests {
|
||||
|
||||
#[test]
|
||||
fn test_get_service_passphrase() {
|
||||
let result = async_std::task::block_on(icarus_envy::environment::get_service_passphrase());
|
||||
let result = icarus_envy::environment::get_service_passphrase();
|
||||
assert_eq!(
|
||||
result.value, "T5OCHDHadAtuOWIqRAS7u8XHDDkzKT1Uvvw7mGMkNzKjVdlHA8xGdILf2adDHspO",
|
||||
"SERVICE_PASSPHRASE does not match {:?}",
|
||||
@@ -32,7 +32,7 @@ mod tests {
|
||||
|
||||
#[test]
|
||||
fn test_get_secret_key() {
|
||||
let result = async_std::task::block_on(icarus_envy::environment::get_secret_key());
|
||||
let result = icarus_envy::environment::get_secret_key();
|
||||
assert_eq!(
|
||||
result.value, "AmIGoodEnoughForYou?",
|
||||
"SECRET_KEY does not match {:?}",
|
||||
@@ -42,7 +42,7 @@ mod tests {
|
||||
|
||||
#[test]
|
||||
fn test_get_root_directory() {
|
||||
let result = async_std::task::block_on(icarus_envy::environment::get_root_directory());
|
||||
let result = icarus_envy::environment::get_root_directory();
|
||||
assert_eq!(
|
||||
result.value, "/path/to/root",
|
||||
"ROOT_DIRECTORY does not match {:?}",
|
||||
@@ -52,7 +52,7 @@ mod tests {
|
||||
|
||||
#[test]
|
||||
fn test_get_icarus_base_api_url() {
|
||||
let result = async_std::task::block_on(icarus_envy::environment::get_icarus_base_api_url());
|
||||
let result = icarus_envy::environment::get_icarus_base_api_url();
|
||||
assert_eq!(
|
||||
result.value, "https://icarus.com",
|
||||
"ICARUS_BASE_API_URL does not match {:?}",
|
||||
@@ -62,7 +62,7 @@ mod tests {
|
||||
|
||||
#[test]
|
||||
fn test_get_app_env() {
|
||||
let result = async_std::task::block_on(icarus_envy::environment::get_app_env());
|
||||
let result = icarus_envy::environment::get_app_env();
|
||||
assert_eq!(
|
||||
result.value,
|
||||
"development",
|
||||
@@ -74,7 +74,7 @@ mod tests {
|
||||
|
||||
#[test]
|
||||
fn test_get_backend_port() {
|
||||
let result = async_std::task::block_on(icarus_envy::environment::get_backend_port());
|
||||
let result = icarus_envy::environment::get_backend_port();
|
||||
assert_eq!(
|
||||
result.value,
|
||||
"8001",
|
||||
@@ -85,7 +85,7 @@ mod tests {
|
||||
}
|
||||
#[test]
|
||||
fn test_get_frontend_url() {
|
||||
let result = async_std::task::block_on(icarus_envy::environment::get_frontend_url());
|
||||
let result = icarus_envy::environment::get_frontend_url();
|
||||
assert_eq!(
|
||||
result.value,
|
||||
"http://localhost:4200",
|
||||
@@ -96,7 +96,7 @@ mod tests {
|
||||
}
|
||||
#[test]
|
||||
fn test_get_rust_log() {
|
||||
let result = async_std::task::block_on(icarus_envy::environment::get_rust_log());
|
||||
let result = icarus_envy::environment::get_rust_log();
|
||||
assert_eq!(
|
||||
result.value,
|
||||
"debug",
|
||||
@@ -107,7 +107,7 @@ mod tests {
|
||||
}
|
||||
#[test]
|
||||
fn test_get_allowed_origins() {
|
||||
let result = async_std::task::block_on(icarus_envy::environment::get_allowed_origins());
|
||||
let result = icarus_envy::environment::get_allowed_origins();
|
||||
assert_eq!(
|
||||
result.value,
|
||||
"https://soaricarus.com,https://www.soaricarus.com",
|
||||
@@ -152,7 +152,7 @@ mod tests {
|
||||
];
|
||||
|
||||
for (key, value) in keys.iter() {
|
||||
let result = async_std::task::block_on(icarus_envy::environment::get_env(key));
|
||||
let result = icarus_envy::environment::get_env(key);
|
||||
assert_eq!(
|
||||
result.value, *value,
|
||||
"{:?} does not match {:?}",
|
||||
|
||||
Reference in New Issue
Block a user