Abscissa

Crate Docs Apache 2.0 Licensed Rust 1.35+ forbid(unsafe_code) Build Status Appveyor Status Gitter Chat

Abscissa is a microframework for building Rust applications (either CLI tools or network/web services), aiming to provide a large number of features with a minimal number of dependencies, and with a strong focus on security.

Documentation

Features

Requirements

Usage

If you already have Rust installed, the following commands will generate an Abscissa application skeleton:

abscissa new my<em>cool</em>app

This will generate a new Abscissa application in the my_cool_app directory. For more information, please see the Documentation.

Depencencies

or: "Know Your Dependencies"

One of Abscissa's primary goals is to maximize functionality while minimizing the number of dependencies. Abscissa is used in a number of high-security contexts, and as such we view each additional dependency as additional attack surface and therefore a potential liability. We have therefore been very conscientious about the dependencies we use and will not add additional dependencies without due consideration.

Here are all of Abscissa's transitive dependencies when configured with the default set of features in the application:

| # | Crate Name | Origin | License | Description | |----|------------------------|-----------------|----------------|-------------------------| | 1 | [abscissa] | [iqlusion] | Apache-2.0 | App microframework | | 2 | [arc-swap] | [@vorner] | Apache-2.0/MIT | Atomic swap for Arc | | 3 | [autocfg] | [@cuviper] | Apache-2.0/MIT | Rust compiler configs | | 4 | [backtrace] | [@alexcrichton] | Apache-2.0/MIT | Capture stack traces | | 5 | [backtrace-sys] | [@alexcrichton] | Apache-2.0/MIT | Capture stack traces | | 6 | [byteorder] | [@BurntSushi] | MIT/Unlicense | Convert endianness | | 7 | [canonical-path] | [iqlusion] | Apache-2.0 | Get canonical fs paths | | 8 | [chrono] | [chronotope] | Apache-2.0/MIT | Time/date library | | 9 | [failure] | [@withoutboats] | Apache-2.0/MIT | Error handling | | 10 | [gumdrop] | [@Murarth] | Apache-2.0/MIT | Command-line options | | 11 | [lazystatic] | [rust-lang] | Apache-2.0/MIT | Heap-allocated statics | | 12 | [libc] | [rust-lang] | Apache-2.0/MIT | C library wrapper | | 13 | [log] | [rust-lang] | Apache-2.0/MIT | Logging facade library | | 14 | [num-integer] | [rust-num] | Apache-2.0/MIT | Integer trait | | 15 | [num-traits] | [rust-num] | Apache-2.0/MIT | Numeric traits | | 16 | [redoxsyscall] | [redox-os] | MIT | Redox OS syscall API | | 17 | [rustc-demangle] | [@alexcrichton] | Apache-2.0/MIT | Symbol demangling | | 18 | [secrecy] | [iqlusion] | Apache-2.0 | Secret-keeping types | | 19 | [semver] | [@steveklabnik] | Apache-2.0/MIT | Semantic versioning | | 20 | [semver-parser] | [@steveklabnik] | Apache-2.0/MIT | Parser for semver spec | | 21 | [serde] | [serde-rs] | Apache-2.0/MIT | Serialization framework | | 22 | [signal-hook] | [@vorner] | Apache-2.0/MIT | Unix signal handling | | 23 | [signal-hook-registry] | [@vorner] | Apache-2.0/MIT | Unix signal registry | | 24 | [termcolor] | [@BurntSushi] | MIT/Unlicense | Terminal color support | | 25 | [time] | [rust-lang] | Apache-2.0/MIT | Time/date library | | 26 | [toml] | [@alexcrichton] | Apache-2.0/MIT | TOML parser library | | 27 | [winapi]§ | [@retep998] | Apache-2.0/MIT | Windows FFI bindings | | 28 | [winapi-util] | [@BurntSushi] | MIT/Unlicense | Safe winapi wrappers | | 29 | [wincolor] | [@BurntSushi] | MIT/Unlicense | Windows console color | | 30 | [zeroize] | [iqlusion] | Apache-2.0/MIT | Zero out sensitive data |

Build / Development / Testing Dependencies

| # | Crate Name | Origin | License | Description | |----|-------------------|------------------|----------------|-------------------------| | 1 | [abscissaderive] | [iqlusion] | Apache-2.0 | Abscissa custom derive | | 2 | [aho-corasick] | [@BurntSushi] | MIT/Unlicense | Pattern-matching alg | | 3 | [cc] | [@alexcrichton] | Apache-2.0/MIT | C/C++ compiler wrapper | | 4 | [cfg-if] | [@alexcrichton] | Apache-2.0/MIT | If-like #[cfg] macros | | 5 | [failurederive] | [@withoutboats] | Apache-2.0/MIT | failure custom derive | | 6 | [gumdropderive] | [@Murarth] | Apache-2.0/MIT | Command-line options | | 7 | [heck] | [@withoutboats] | Apache-2.0/MIT | Case conversion utils | | 8 | [memchr] | [@BurntSushi] | MIT/Unlicense | Optimize byte search | | 9 | [proc-macro2] | [@alexcrichton] | Apache-2.0/MIT | Shim for Macros 2.0 API | | 10 | [quote] | [@dtolnay] | Apache-2.0/MIT | Rust AST to token macro | | 11 | [regex] | [rust-lang] | Apache-2.0/MIT | Regular expressions | | 12 | [regex-syntax] | [rust-lang] | Apache-2.0/MIT | Regex syntax impl | | 13 | [serdederive] | [serde-rs] | Apache-2.0/MIT | serde custom derive | | 14 | [syn] | [@dtolnay] | Apache-2.0/MIT | Rust source code parser | | 15 | [synstructure] | [@mystor] | Apache-2.0/MIT | syn structure macros | | 16 | [thread_local] | [@Amanieu] | Apache-2.0/MIT | Per-object thread local | | 17 | [ucd-util] | [@BurntSushi] | Apache-2.0/MIT | Unicode utilities | | 18 | [unicode-xid] | [unicode-rs] | Apache-2.0/MIT | Identify valid Unicode | | 19 | [utf8-ranges] | [@BurntSushi] | MIT/Unlicense | UTF-8 codepoint ranges | | 20 | [wait-timeout] | [@alexcrichton] | Apache-2.0/MIT | Timeouts for waitpid |

Dependency Relationships

The table below should help answer questions as to why a particular crate is an Abscissa dependency and whether or not it is optional. Abscissa uses [cargo features] to allow parts of it you aren't using to be easily disabled, so you only compile the parts you need.

| Crate Name | [Cargo Features] | Required By | |------------------------|------------------|-----------------| | [abscissa] | - | ⊤ | | [abscissaderive] | - | [abscissa] | | [aho-corasick] | testing | [regex] | | [arc-swap] | signals | [signal-hook-registry] | | [autocfg] | time | [num-integer] | | [backtrace] | - | [failure] | | [backtrace-sys] | - | [backtrace] | | [canonical-path] | - | [abscissa] | | [cc] | - | [backtrace-sys] | | [cfg-if] | - | [backtrace], [log] | | [chrono] | time | [abscissa] | | [failure] | - | [abscissa] | | [failurederive] | - | [failure] | | [gumdrop] | options | [abscissa] | | [gumdropderive] | options | [gumdrop] | | [heck] | inflector | [abscissa] | | [lazystatic] | - | [abscissa] | | [libc] | signals | [abscissa] | | [log] | logging | [abscissa] | | [memchr] | testing | [aho-corasick] | | [num-integer] | time | [chrono] | | [num-traits] | time | [chrono], [num-integer] | | [proc-macro2] | - | [abscissaderive], [failurederive], [quote], [serdederive] | | [redoxsyscall] | time | [time] | | [regex] | testing | [abscissa] | | [rustc-demangle] | - | [backtrace] | | [secrecy] | secrets | [abscissa] | | [semver] | application | [abscissa] | | [semver-parser] | application | [abscissa] | | [serde] | config | [abscissa] | | [serdederive] | config | [serde] | | [signal-hook] | signals | [abscissa] | | [signal-hook-registry] | signals | [signal-hook] | | [termcolor] | terminal | [abscissa] | | [threadlocal] | testing | [regex] | | [time] | logging | [chrono] | | [ucd-util] | testing | [regex-syntax] | | [unicode-xid] | - | [proc-macro2] | | [utf8-ranges] | testing | [regex] | | [wait-timeout] | testing | [abscissa] | | [winapi]§ | - | [termcolor], [time], [winapi-util] | | [winapi-util] | - | [termcolor] | | [zeroize] | - | [abscissa] |

Frequently Asked Questions (FAQ)

Q1: Why is it called "abscissa"?

A1: An abscissa represents the elevation of a point above the y-axis. In that regard, "Abscissa" can be thought of as a pun about getting off the ground, or elevating your project.

The word "abscissa" is also the key to the [Kryptos K2] panel.

Q2: "Abscissa" is a hard name to remember! Got any tips?

A2: Imagine you're A-B testing a couple of scissors... with attitude.

Testing Framework Changes

The main way to test framework changes is by generating an application with Abscissa's built-in application generator and running tests against the generated application (also rustfmt, clippy).

To generate a test application and test it automatically, you can simply do:

$ cargo test

However, when debugging test failures against a generated app, it's helpful to know how to drive the app generation and testing process manually. Below are instructions on how to do so.

If you've already run:

$ git clone https://github.com/iqlusioninc/abscissa/

...and are inside the abscissa directory and want to test your changes, you can generate an application by running the following command:

$ cargo run -- new /tmp/example_app --patch-crates-io='abscissa = { path = "$PWD" }'

This will generate a new Abscissa application in /tmp/example_app which references your local copy of Abscissa.

After that, change directory to the newly generated app and run the tests to ensure things are still working (the tests, along with rustfmt and clippy are run as part of the CI process):

$ cd /tmp/example_app # or 'pushd /tmp/example_app' and 'popd' to return $ cargo test $ cargo fmt -- --check # generated app is expected to pass rustfmt $ cargo clippy

Code of Conduct

We abide by the Contributor Covenant and ask that you do as well.

For more information, please see [CODEOFCONDUCT.md].

License

The abscissa crate is distributed under the terms of the Apache License (Version 2.0).

Copyright © 2018-2019 iqlusion

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you shall be dual licensed as above, without any additional terms or conditions.