Expand description
§ABPL: Aritz’s BoilerPlate Library
A collection of junk that I only want to write once
Featuring:
- abpl::app::service_main: all you need to write a reloadable systemd service
- abpl::app::axum::HotReloadingAxumService: an axum service that can listen to multiple sockets while having zero-downtime reloads
- abpl::Error: an error macro that empowers you to create convenient-to-use error types that are typed and serializable (I feel like I’m underselling this)
- abpl::future::block_on: because OS threads are easier to debug during runtime but some widely-used crates needs the tokio runtime anyway
- Various newtypes
- And more!
§Cargo features
Almost everything here is opt-in – enable only what you need.
std(default): the standard library.#![no_std]support is aspirational, not functional – disabling this today does not currently build (a few spots reach foralloc-provided items likeString/Box/format!without actually importing them fromalloc). Treatstdas required until this note goes away.serde:Serialize/Deserializefor the error macro’s generated types and other newtypes.utoipa: utoipa::ToSchema for the same types, for OpenAPI schema generation.derive_error: the abpl::Error derive macro itself, plus itsDisplay/serde support.app: abpl::app – the reloadable-systemd-service lifecycle helper (config parsing, logging setup, signal handling).http: axum/tokio integration – abpl::app::axum::HotReloadingAxumService and the abpl::types::http socket abstractions. Impliesfuture_util.future_util: abpl::future::block_on/abpl::future::block_on_mt, the tokio-runtime bridging helpers.thread: abpl::thread – currently just a cancelable sleep.newtype_base64: base64-encoded byte-array newtypes. Impliesserde.
Run the test suite with --all-features rather than enabling individual features –
that’s what the test suite is written against.
Modules§
Derive Macros§
- Error
derive_error - Derives a full error type from a “kind” enum.