ncryptf-rs
Rust bindings for ncryptf
[![docs.rs](https://img.shields.io/docsrs/ncryptf-rs?style=for-the-badge)](https://docs.rs/ncryptf-rs/0.2.3)
[![Crates.io (recent)](https://img.shields.io/crates/dr/ncryptf-rs?style=for-the-badge)](https://crates.io/crates/ncryptf-rs)
The rust ncryptf bindings are intended to be API similar to other language bindings for ease of readability.
## Installing
You can add ncryptf to your project via cargo to your Cargo.toml
```
ncryptf-rs = { git = "github.com/ncryptf/ncryptf-rs" }
```
Ncryptf supports 2 optional features:
- `rocket` for rocket.rs bindings
- `client` which provides a `reqwest` client you can use to interact with ncryptf.
### Exports
ncryptf re-exports a few extra libraries for convenience and necessity.
#### Rocket
Ncryptf uses a modified variant of rocket.rs (0.5.0-rc: see https://github.com/charlesportwoodii/rocket.rs/tree/peek_buffer) to grab the request body to perform authentication with Rocket.rs. It is strongly recommended to have this version of rocket (and other re-exports) stored in a `common` workspace to eliminate the need to add the same cargo dependency in each workspace member.
If you are using rocket.rs `proc_macro` in your `main.rs`, you will still need to import the macro.
```rust
rocket = { features = ["tls", "secrets", "json"] }
```
### Library Mapping
When using the ncryptf re-exports by default the imported struct names will be namespaced under `ncryptf::