This repository has been archived by the owner on Jun 3, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
I'm preparing another release of Abscissa, which provides the application boilerplate / framework used by Tendermint KMS: https://github.com/iqlusioninc/abscissa This commit contains what is hopefully the minimum set of changes required to upgrade to the new version. Notably it removes all TODOs about boilerplate code that could potentially be replaced by custom derive, as `abscissa_derive` now provides that functionality. It also incorporates global application state, and the application as the owner of the configuration.
- Loading branch information
1 parent
ba31356
commit 4c48980
Showing
46 changed files
with
646 additions
and
468 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,8 @@ | ||
//! Main entry point for the `tmkms` executable | ||
|
||
extern crate tmkms; | ||
use tmkms::KmsApplication; | ||
use tmkms::application::APPLICATION; | ||
|
||
/// Boot the `tmkms` application | ||
fn main() { | ||
KmsApplication::boot(); | ||
abscissa::boot(&APPLICATION); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,27 @@ | ||
//! The `help` subcommand | ||
|
||
use abscissa::{Callable, Command}; | ||
use abscissa::{Command, Runnable}; | ||
|
||
use super::KmsCommand; | ||
|
||
/// The `help` subcommand | ||
#[derive(Debug, Default, Options)] | ||
pub struct HelpCommand { | ||
/// Arguments to the `help` command | ||
#[options(free)] | ||
pub args: Vec<String>, | ||
} | ||
|
||
impl Callable for HelpCommand { | ||
impl Runnable for HelpCommand { | ||
/// Print help message | ||
fn call(&self) { | ||
KmsCommand::print_usage(self.args.as_slice()); | ||
fn run(&self) { | ||
KmsCommand::print_usage( | ||
&self | ||
.args | ||
.as_slice() | ||
.iter() | ||
.map(|arg| arg.as_ref()) | ||
.collect::<Vec<_>>(), | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.