NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
crates.io · #2715 most downloaded on crates.io
Custom derive support for the abscissa application microframework
Last release 11 months ago
06 Nov 2025
Release timing varies
gaps range from 9 days to 1.8 years
Nearly every release is documented
notes for 13 of 13 stable releases
Nothing withdrawn
no release was ever pulled
8 years old
24 releases · first in 2018
Expose ConfigFile in testing API ([#944])
ConfigFile in testing API ([#944])backtrace and color-eyre optional ([#860])fs-err to 3.x ([#968])Component trait has been split up, and now depends on a new Injectable
trait. Injectable encapsulates all of the dependency injection functionality
and can be separately derived. Component can now be easily implemented
manually e.g. to add logic to the regular lifecycle hooks ([#985])toml to v0.9 ([#1007])syn 2 ([#1009])Nothing published for this version
One column per quarter.
Print all status messages to stderr ([#959])
pub some statics that don't have to be pub to fix build under deny(warnings) ([#960])allow() for const impl pattern that causes false positives in a rustc lint in derive macros ([#960])Application::boot_with_args ([#805])
Application::boot_with_args ([#805])abscissa new ([#856])tracing-log to v0.2 ([#878])toml to 0.8 ([#906])secrecy to v0.10 ([#928])RUST_LOG is not set ([#863])Update clap to v4; MSRV 1.60 ([#779])
clap to v4; MSRV 1.60 ([#779])OsString for argument parsing ([#791])Tokio: upgrade to v1.0 ([#426])
fs_err dependency ([#363])actix support ([#510])clap v3 for command-line argument parsing ([#562], [#617], [#634])APPLICATION -> APP; export from prelude; redo helpers ([#272])secrecy from 0.6 to 0.7 ([#314])arc-swap ([#425])color-backtrace with color-eyre ([#427])main as the default branch name ([#553])gimli-backtrace feature ([#422])generational-arena dependency ([#424])chrono dependency ([#579])darling dependency ([#619])The Abscissa v0.6.0 release now uses clap v3 for command-line argument parsing.
This is because Clap automatically handles things like version, help subcommands, and flags thereby providing a friendly help screen.
To migrate to the v0.6.0 version from other versions, add the v0.6.0 version of abscissa_core in your cargo.toml file.
[dependencies]
abscissa_core = "0.6.0"
[dev-dependencies]
abscissa_core = "0.6.0"
Now, replace gumdrop with clap v3 in the dependencies section of your Cargo.toml file.
clap = "3"
clap v3 uses a Parser proc macro: replace gumdrop's Option with Clap in your commands folder and commands.rs file.
use clap::Parser;
/// Command help message
#[derive(Command, Debug, Default, Parser)]
pub struct Command {
// This is a free command
#[clap()]
pub args: Vec<String>,
// This accepts short and long flags
#[clap(short, long)]
pub overwrite: bool,
}
commands.rs file./// Entry point for the application. It needs to be a struct to allow using subcommands!
#[derive(Command, Debug, Clap)]
#[clap(author, about, version)]
pub struct EntryPoint {
#[clap(subcommand)]
// Replace this with you app name
cmd: AppCmd,
/// Enable verbose logging
#[clap(short, long)]
pub verbose: bool,
/// Use the specified config file
#[clap(short, long)]
pub config: Option<String>,
}
impl Runnable for EntryPoint {
fn run(&self) {
self.cmd.run()
}
}
commands.rs file, replace the code below with Entrypoint.// Where App is the name of your Application
impl Configurable<AppConfig> for AppCmd
The code above becomes:
impl Configurable<AppConfig> for EntryPoint
version command from your application.In application.rs, replace AppCmd with EntryPoint
// Remove this
use crate::{commands::AppCmd, config::GorcConfig};
// Replace with this
use crate::{commands::EntryPoint, config::GorcConfig};
// Remove this
type Cmd = AppCmd;
// Replace with this
type Cmd = EntryPoint;
// Remove this
fn tracing_config(&self, command: &AppCmd) -> trace::Config {
// Replace with this
fn tracing_config(&self, command: &EntryPoint) -> trace::Config {
version argument to a flag in your tests/acceptance.rs file// Remove this
let mut cmd = runner.arg("version").capture_stdout().run();
// Replace with this
let mut cmd = runner.arg("--version").capture_stdout().run();
To install the v0.6.0 version of Abscissa in your local machine, run the command below.
cargo install abscissa --version 0.6.0
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
color-backtrace support ([#148])
color-backtrace support ([#148])gimli-backtrace Cargo feature ([#150])Cargo.lock ([#176])gen cmd subcommand ([#177])secrecy crate to v0.6 ([#169]).gitignore ([#175])lazy_static with once_cell ([#167], [#168])Abscissa primarily used lazy_static in two places:
APPLICATION constant in application.rsRUNNER object for invoking CLI tests in
tests/acceptance.rsBoth usages have now been replaced with once_cell, which is a better
fit for Abscissa's internal usages, and seems to stand a reasonable
chance of being incorporated into the Rust standard library:
https://github.com/rust-lang/rfcs/pull/2788
Existing applications will need to replace the lazy_static! directive
in application.rs:
lazy_static! {
/// Application state
pub static ref APPLICATION: application::Lock<MyApplication> = application::Lock::default();
}
with one based on the new AppCell type:
use abscissa_core::application::AppCell;
/// Application state
pub static APPLICATION: AppCell<MyApplication> = AppCell::new();
This change should otherwise be largely a drop-in replacement, and also
means you can remove lazy_static from [dependencies] in Cargo.toml.
For replacing RUNNER in tests/acceptance.rs, we suggest you edit
Cargo.toml, adding the following:
[dev-dependencies]
once_cell = "1.2"
And then changing the following in tests/acceptance.rs:
lazy_static! {
pub static ref RUNNER: CmdRunner = CmdRunner::default();
}
to:
use once_cell::sync::Lazy;
pub static RUNNER: Lazy<CmdRunner> = Lazy::new(|| CmdRunner::default());
log with tracing ([#154])tracing is a newer, more powerful application-level tracing library
which also subsumes the functionality of a logging framework, and
replaces Abscissa's previous logging component.
Existing apps will need to update their application.rs. Change the
following at the bottom of the trait impl:
impl Application {
// ...
/// Get logging configuration from command-line options
fn logging_config(&self, command: &MyCommand) -> logging::Config {
if command.verbose() {
logging::Config::verbose()
} else {
logging::Config::default()
}
}
}
to:
use abscissa_core::trace;
impl Application {
// ...
/// Get tracing configuration from command-line options
fn tracing_config(&self, command: &EntryPoint<MyCommand>) -> trace::Config {
if command.verbose {
trace::Config::verbose()
} else {
trace::Config::default()
}
}
}
Existing users may want to update their prelude.rs to look like:
/// Abscissa core prelude
pub use abscissa_core::prelude::*;
/// Application state accessors
pub use crate::application::{app_config, app_reader, app_writer};
Config custom derive with blanket impl ([#152])The previous custom derive for Config was replaced with a blanket
impl instead. This only requires that you remove the derive for
Config in existing applications' config.rs. Change:
use abscissa_core::{Config, EntryPoint};
/// MyApp Configuration
#[derive(Clone, Config, Debug, Deserialize, Serialize)]
#[serde(deny_unknown_fields)]
pub struct MyConfig {
// ...
}
to:
/// MyApp Configuration
#[derive(Clone, Debug, Deserialize, Serialize)]
#[serde(deny_unknown_fields)]
pub struct MyConfig {
// ...
}
(i.e. remove Config from the #[derive(...)] section)
failure ([#151])Since the time failure was written, std::error::Error has gained
many of the features it was originally useful for. Many libraries
now rely on it for bounds, especially in conjunction with Box for
type erasure.
There is no prescribed replacement for failure at a framework-level
(yet, see [#144] for some discussion).
The new abscissa_core::error::Context type subsumes the functionality
of both the previous abscissa_core::error::Error type and its previous
usages of failure::Context, e.g. capturing error sources and
backtraces.
All existing usages of abscissa_core::error::Error will need to be
updated, per the instructions below.
Existing apps are advised to do the following:
Cargo.toml: remove failureerror.rs: remove failure imports and Fail derive. thiserror
or err-derive are the suggested custom derive replacements.
The Error type definition should be changed from:/// Error type
#[derive(Debug)]
pub struct Error(abscissa_core::Error<ErrorKind>);
to:
use abscissa_core::error::Context;
/// Error type
#[derive(Debug)]
pub struct Error(Box<Context<ErrorKind>>);
error.rs: add impl ErrorKind with context method:
this is used for capturing an error source when using your own
application's ErrorKind type, ala similar functionality in
failure. Add the following impl to ErrorKind, allowing you to
capture an error context for any error type which meets the trait
bounds specified by the BoxError type:use abscissa_core::error::BoxError;
impl ErrorKind {
/// Create an error context from this error
pub fn context(self, source: impl Into<BoxError>) -> Context<ErrorKind> {
Context::new(self, Some(source.into()))
}
}
error.rs: replace ErrorKind impl of From with one for Context.
After using the above context method, it's useful be able to convert
it into() your application's wrapper type, particularly when writing
From coercions from foreign error types.Change:
impl From<abscissa_core::Error<ErrorKind>> for Error {
fn from(other: abscissa_core::Error<ErrorKind>) -> Self {
Error(other)
}
}
to:
use abscissa_core::error::Context;
impl From<Context<ErrorKind>> for Error {
fn from(context: Context<ErrorKind>) -> Self {
Error(Box::new(context))
}
}
error.rs: update Error impl of Deref:impl Deref for Error {
type Target = abscissa_core::Error<ErrorKind>;
fn deref(&self) -> &abscissa_core::Error<ErrorKind> {
&self.0
}
}
to:
impl Deref for Error {
type Target = Context<ErrorKind>;
fn deref(&self) -> &Context<ErrorKind> {
&self.0
}
}
error.rs: add a std::error::Error impl for the app Error type:impl std::error::Error for Error {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
self.0.source()
}
}
Nothing published for this version
Update dependencies: gumdrop 0.7, secrecy 0.4 ([#141])
gumdrop 0.7, secrecy 0.4 ([#141])Deref impl on Error newtype ([#129])usage: Use bold rather than explicit color ([#126])
heck to ident_case ([#124])Component ([#119])get_downcast_ref/get_downcast_mut to Registry ([#117])Registry ([#115])generational-arena for component storage ([#113])Registry::iter() without mutable reference([#110])usage: Fix bugs when traversing subcommands ([#107])
Merge abscissa_generator into abscissa CLI crate ([#95])
abscissa_generator into abscissa CLI crate ([#95])abscissa crate to abscissa_core ([#94])hashbrown dependency ([#93])Default bound + testing support ([#84], [#90])serde(deny_unknown_fields) ([#88])abscissa::testing ([#78])Nothing published for this version
Nothing published for this version
components: Add basic downcasting support ([#72])
PartialOrd for Box<dyn Component> ([#71])git init automatically ([#69])--force option ([#68])gumdrop v0.6 ([#63])Error/ErrorKind names ([#55])app_config()/app_reader()/app_writer() and prelude to template ([#52])Runnable/RunnableMut for Box<dyn Fn/FnMut> ([#48])term crate to termcolor crate ([#47])Callable to Runnable ([#45])secrecy crate for secret-keeping ([#43], [#53])Application and Config ([#42])abscissa new ([#38], [#39], [#40], [#41])macro_rules! ([#34])Nothing published for this version
Nothing published for this version
Nothing published for this version
Use the failure_derive crate ([#11])
failure_derive crate ([#11])isatty crate ([#10]chrono crate under util::time ([#8])[0.9.0]: https://github.com/iqlusioninc/abscissa/pull/1018 [#860]: https://github.com/iqlusioninc/abscissa/pull/860 [#944]: https://github.com/iqlusio
Your coding agent can read these notes before it upgrades. Set up the MCP server →