Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
f8c9a04556
|
|||
|
f2931691a1
|
|||
|
306f3537ef
|
|||
|
4a2c831fff
|
@@ -13,16 +13,15 @@ jobs:
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v6
|
||||
uses: actions/checkout@v5
|
||||
with:
|
||||
fetch-depth: 0 # Important for git describe --tags
|
||||
|
||||
- name: Install Rust
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: 1.96.1
|
||||
toolchain: 1.90.0
|
||||
components: cargo
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
|
||||
- name: Extract Version from Cargo.toml
|
||||
id: version
|
||||
|
||||
@@ -13,55 +13,50 @@ jobs:
|
||||
name: Check
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||
with:
|
||||
toolchain: 1.96.1
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
toolchain: 1.90.0
|
||||
- run: cargo check
|
||||
|
||||
test:
|
||||
name: Test Suite
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||
with:
|
||||
toolchain: 1.96.1
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
toolchain: 1.90.0
|
||||
- run: cargo test
|
||||
|
||||
fmt:
|
||||
name: Rustfmt
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||
with:
|
||||
toolchain: 1.96.1
|
||||
toolchain: 1.90.0
|
||||
- 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@v6
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||
with:
|
||||
toolchain: 1.96.1
|
||||
toolchain: 1.90.0
|
||||
- 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@v6
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||
with:
|
||||
toolchain: 1.96.1
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
toolchain: 1.90.0
|
||||
- run: cargo build
|
||||
|
||||
Generated
+505
-20
@@ -3,13 +3,177 @@
|
||||
version = 4
|
||||
|
||||
[[package]]
|
||||
name = "const_format"
|
||||
version = "0.2.36"
|
||||
name = "async-channel"
|
||||
version = "1.9.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4481a617ad9a412be3b97c5d403fef8ed023103368908b9c50af598ff467cc1e"
|
||||
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.13.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "497c00e0fd83a72a79a39fcbd8e3e2f055d6f6c7e025f3b3d91f4f8e76527fb8"
|
||||
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.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5fd03604047cee9b6ce9de9f70c6cd540a0520c813cbd49bae61f33ab80ed1dc"
|
||||
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.9.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2261d10cca569e4643e526d8dc2e62e433cc8aba21ab764233731f8d369bf394"
|
||||
|
||||
[[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.19.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "46c5e41b57b8bba42a04676d81cb89e9ee8e859a1a66f80a5a72e1cb76b34d43"
|
||||
|
||||
[[package]]
|
||||
name = "cfg-if"
|
||||
version = "1.0.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2fd1289c04a9ea8cb22300a459a72a385d7c73d3259e2ed7dcb2af674838cfa9"
|
||||
|
||||
[[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.35"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7faa7469a93a566e9ccc1c73fe783b4a65c274c5ace346038dca9c39fe0030ad"
|
||||
dependencies = [
|
||||
"const_format_proc_macros",
|
||||
"konst",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -23,6 +187,12 @@ 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"
|
||||
@@ -30,54 +200,369 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b"
|
||||
|
||||
[[package]]
|
||||
name = "icarus_envy"
|
||||
version = "0.8.0"
|
||||
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.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be"
|
||||
|
||||
[[package]]
|
||||
name = "futures-channel"
|
||||
version = "0.3.31"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10"
|
||||
dependencies = [
|
||||
"futures-core",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "futures-core"
|
||||
version = "0.3.31"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e"
|
||||
|
||||
[[package]]
|
||||
name = "futures-io"
|
||||
version = "0.3.31"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6"
|
||||
|
||||
[[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 = "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.5.0"
|
||||
dependencies = [
|
||||
"async-std",
|
||||
"const_format",
|
||||
"dotenvy",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "konst"
|
||||
version = "0.2.20"
|
||||
name = "js-sys"
|
||||
version = "0.3.81"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "128133ed7824fcd73d6e7b17957c5eb7bacb885649bd8c69708b2331a10bcefb"
|
||||
checksum = "ec48937a97411dcb524a265206ccd4c90bb711fca92b2792c407f268825b9305"
|
||||
dependencies = [
|
||||
"konst_macro_rules",
|
||||
"once_cell",
|
||||
"wasm-bindgen",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "konst_macro_rules"
|
||||
version = "0.2.19"
|
||||
name = "kv-log-macro"
|
||||
version = "1.0.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a4933f3f57a8e9d9da04db23fb153356ecaf00cbd14aee46279c33dc80925c37"
|
||||
checksum = "0de8b303297635ad57c9f5059fd9cee7a47f8e8daa09df0fcd07dd39fb22977f"
|
||||
dependencies = [
|
||||
"log",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
version = "0.2.177"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2874a2af47a2325c2001a6e6fad9b16a53b802102b528163885171cf92b15976"
|
||||
|
||||
[[package]]
|
||||
name = "linux-raw-sys"
|
||||
version = "0.11.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "df1d3c3b53da64cf5760482273a98e575c651a67eec7f77df96b5b642de8f039"
|
||||
|
||||
[[package]]
|
||||
name = "log"
|
||||
version = "0.4.28"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "34080505efa8e45a4b816c349525ebe327ceaa8559756f0356cba97ef3bf7432"
|
||||
dependencies = [
|
||||
"value-bag",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "memchr"
|
||||
version = "2.7.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273"
|
||||
|
||||
[[package]]
|
||||
name = "once_cell"
|
||||
version = "1.21.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d"
|
||||
|
||||
[[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.16"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b"
|
||||
|
||||
[[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.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "96c8c490f422ef9a4efd2cb5b42b76c8613d7e7dfc1caf667b8a3350a5acc066"
|
||||
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"
|
||||
version = "1.0.101"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934"
|
||||
checksum = "89ae43fd86e4158d6db51ad8e2b80f313af9cc74f5c0e03ccb87de09998732de"
|
||||
dependencies = [
|
||||
"unicode-ident",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "quote"
|
||||
version = "1.0.46"
|
||||
version = "1.0.41"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "dfbc457d0c7a0759a614551b11a6409e5951f6c7537be1f1b7682b9ae9230368"
|
||||
checksum = "ce25767e7b499d1b604768e7cde645d14cc8584231ea6b295e9c9eb22c02e1d1"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "unicode-ident"
|
||||
version = "1.0.24"
|
||||
name = "rustix"
|
||||
version = "1.1.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75"
|
||||
checksum = "cd15f8a2c5551a84d56efdc1cd049089e409ac19a3072d5037a17fd70719ff3e"
|
||||
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.11"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7a2ae44ef20feb57a68b23d846850f861394c2e02dc425a50098ae8c90267589"
|
||||
|
||||
[[package]]
|
||||
name = "syn"
|
||||
version = "2.0.106"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ede7c438028d4436d71104916910f5bb611972c5cfd7f89b8300a8186e6fada6"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"unicode-ident",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "unicode-ident"
|
||||
version = "1.0.19"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f63a545481291138910575129486daeaf8ac54aee4387fe7906919f7830c7d9d"
|
||||
|
||||
[[package]]
|
||||
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.11.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "943ce29a8a743eb10d6082545d861b24f9d1b160b7d741e0f2cdf726bec909c5"
|
||||
|
||||
[[package]]
|
||||
name = "wasm-bindgen"
|
||||
version = "0.2.104"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c1da10c01ae9f1ae40cbfac0bac3b1e724b320abfcf52229f80b547c0d250e2d"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"once_cell",
|
||||
"rustversion",
|
||||
"wasm-bindgen-macro",
|
||||
"wasm-bindgen-shared",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wasm-bindgen-backend"
|
||||
version = "0.2.104"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "671c9a5a66f49d8a47345ab942e2cb93c7d1d0339065d4f8139c486121b43b19"
|
||||
dependencies = [
|
||||
"bumpalo",
|
||||
"log",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn",
|
||||
"wasm-bindgen-shared",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wasm-bindgen-futures"
|
||||
version = "0.4.54"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7e038d41e478cc73bae0ff9b36c60cff1c98b8f38f8d7e8061e79ee63608ac5c"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"js-sys",
|
||||
"once_cell",
|
||||
"wasm-bindgen",
|
||||
"web-sys",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wasm-bindgen-macro"
|
||||
version = "0.2.104"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7ca60477e4c59f5f2986c50191cd972e3a50d8a95603bc9434501cf156a9a119"
|
||||
dependencies = [
|
||||
"quote",
|
||||
"wasm-bindgen-macro-support",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wasm-bindgen-macro-support"
|
||||
version = "0.2.104"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9f07d2f20d4da7b26400c9f4a0511e6e0345b040694e8a75bd41d578fa4421d7"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn",
|
||||
"wasm-bindgen-backend",
|
||||
"wasm-bindgen-shared",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wasm-bindgen-shared"
|
||||
version = "0.2.104"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "bad67dc8b2a1a6e5448428adec4c3e84c43e561d8c9ee8a9e5aabeb193ec41d1"
|
||||
dependencies = [
|
||||
"unicode-ident",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "web-sys"
|
||||
version = "0.3.81"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9367c417a924a74cae129e6a2ae3b47fabb1f8995595ab474029da749a8be120"
|
||||
dependencies = [
|
||||
"js-sys",
|
||||
"wasm-bindgen",
|
||||
]
|
||||
|
||||
[[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",
|
||||
]
|
||||
|
||||
+4
-3
@@ -1,11 +1,12 @@
|
||||
[package]
|
||||
name = "icarus_envy"
|
||||
version = "0.8.0"
|
||||
version = "0.5.0"
|
||||
edition = "2024"
|
||||
rust-version = "1.95"
|
||||
rust-version = "1.90"
|
||||
|
||||
[dependencies]
|
||||
dotenvy = { version = "0.15.7" }
|
||||
const_format = { version = "0.2.36" }
|
||||
const_format = { version = "0.2.35" }
|
||||
|
||||
[dev-dependencies]
|
||||
async-std = { version = "1.13.2" }
|
||||
|
||||
+13
-13
@@ -1,4 +1,4 @@
|
||||
pub fn get_db_url() -> crate::EnvVar {
|
||||
pub async 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 fn get_db_url() -> crate::EnvVar {
|
||||
crate::init_envvar(key, &value)
|
||||
}
|
||||
|
||||
pub fn get_secret_main_key() -> crate::EnvVar {
|
||||
pub async 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 fn get_secret_main_key() -> crate::EnvVar {
|
||||
crate::init_envvar(key, &value)
|
||||
}
|
||||
|
||||
pub fn get_service_passphrase() -> crate::EnvVar {
|
||||
pub async 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 fn get_service_passphrase() -> crate::EnvVar {
|
||||
crate::init_envvar(key, &value)
|
||||
}
|
||||
|
||||
pub fn get_secret_key() -> crate::EnvVar {
|
||||
pub async 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 fn get_secret_key() -> crate::EnvVar {
|
||||
crate::init_envvar(key, &value)
|
||||
}
|
||||
|
||||
pub fn get_root_directory() -> crate::EnvVar {
|
||||
pub async 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 fn get_root_directory() -> crate::EnvVar {
|
||||
crate::init_envvar(key, &value)
|
||||
}
|
||||
|
||||
pub fn get_icarus_base_api_url() -> crate::EnvVar {
|
||||
pub async 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 fn get_icarus_base_api_url() -> crate::EnvVar {
|
||||
crate::init_envvar(key, &value)
|
||||
}
|
||||
|
||||
pub fn get_icarus_auth_base_api_url() -> crate::EnvVar {
|
||||
pub async 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 fn get_icarus_auth_base_api_url() -> crate::EnvVar {
|
||||
crate::init_envvar(key, &value)
|
||||
}
|
||||
|
||||
pub fn get_app_env() -> crate::EnvVar {
|
||||
pub async 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 fn get_app_env() -> crate::EnvVar {
|
||||
crate::init_envvar(key, &value)
|
||||
}
|
||||
|
||||
pub fn get_backend_port() -> crate::EnvVar {
|
||||
pub async 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 fn get_frontend_url() -> crate::EnvVar {
|
||||
pub async 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 fn get_frontend_url() -> crate::EnvVar {
|
||||
crate::init_envvar(key, &value)
|
||||
}
|
||||
|
||||
pub fn get_rust_log() -> crate::EnvVar {
|
||||
pub async 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 fn get_rust_log() -> crate::EnvVar {
|
||||
crate::init_envvar(key, &value)
|
||||
}
|
||||
|
||||
pub fn get_allowed_origins() -> crate::EnvVar {
|
||||
pub async 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 fn get_allowed_origins() -> crate::EnvVar {
|
||||
}
|
||||
|
||||
/// Get environment not specified in the code
|
||||
pub fn get_env(environment: &str) -> crate::EnvVar {
|
||||
pub async 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 = icarus_envy::environment::get_db_url();
|
||||
let result = async_std::task::block_on(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 = icarus_envy::environment::get_secret_main_key();
|
||||
let result = async_std::task::block_on(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 = icarus_envy::environment::get_service_passphrase();
|
||||
let result = async_std::task::block_on(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 = icarus_envy::environment::get_secret_key();
|
||||
let result = async_std::task::block_on(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 = icarus_envy::environment::get_root_directory();
|
||||
let result = async_std::task::block_on(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 = icarus_envy::environment::get_icarus_base_api_url();
|
||||
let result = async_std::task::block_on(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 = icarus_envy::environment::get_app_env();
|
||||
let result = async_std::task::block_on(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 = icarus_envy::environment::get_backend_port();
|
||||
let result = async_std::task::block_on(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 = icarus_envy::environment::get_frontend_url();
|
||||
let result = async_std::task::block_on(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 = icarus_envy::environment::get_rust_log();
|
||||
let result = async_std::task::block_on(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 = icarus_envy::environment::get_allowed_origins();
|
||||
let result = async_std::task::block_on(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 = icarus_envy::environment::get_env(key);
|
||||
let result = async_std::task::block_on(icarus_envy::environment::get_env(key));
|
||||
assert_eq!(
|
||||
result.value, *value,
|
||||
"{:?} does not match {:?}",
|
||||
|
||||
Reference in New Issue
Block a user