keelrun 0.4.1

Keel as a Rust front end: #[keel::wrap] plus a reqwest-middleware adapter, routing calls through the keel-core Engine chain (cache/rate/breaker/timeout/retry) from one `keel.toml`. No import hook (Rust has none to hang off of) — call `keel::init()` once from your own `main`. Published as `keelrun` (plain `keel` is taken on crates.io); add it as `cargo add keelrun --rename keel` so `#[keel::wrap]` resolves — see README.md.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//! Compile-time proof of `#[keel::wrap]`'s guardrails (module docs in
//! `crates/keel-macros/src/lib.rs`): a valid usage compiles, and each
//! documented v1 restriction produces a targeted `compile_error!`, not a
//! confusing downstream type error.
//!
//! `trybuild` compiles each `tests/ui/*.rs` file as its own crate with
//! `keel` as a dependency (this file's own package), so `#[keel::wrap]` is
//! exercised exactly as a real user would write it.

#[test]
fn ui() {
    let t = trybuild::TestCases::new();
    t.pass("tests/ui/pass_basic.rs");
    t.compile_fail("tests/ui/fail_missing_target.rs");
    t.compile_fail("tests/ui/fail_sync_fn.rs");
    t.compile_fail("tests/ui/fail_non_result_return.rs");
}