https://github.com/iac-factory/rust-parser
Rust CLI Parser
https://github.com/iac-factory/rust-parser
Last synced: 2 months ago
JSON representation
Rust CLI Parser
- Host: GitHub
- URL: https://github.com/iac-factory/rust-parser
- Owner: iac-factory
- License: bsd-3-clause
- Created: 2022-05-08T18:41:16.000Z (about 3 years ago)
- Default Branch: Development
- Last Pushed: 2023-06-21T22:36:57.000Z (almost 2 years ago)
- Last Synced: 2025-02-08T17:44:56.042Z (4 months ago)
- Language: Rust
- Size: 57.6 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Overview ##
`parser` is used to create, store, and update environment variable(s) used in both development and deployment
context. Additionally, through the simplicity of `key = value` variable assignments, `parser` can construct
a variety of file-types:- `*.env`
- `toml`
- `Yaml`
- `JSON`
- `ini`### Design Philosophy ###
All environment variables are capable of being abstracted into a simple key-value structure generalizable to compiled,
runtime, & serialization languages:```json
{
"Key": "Value"
}
``````yaml
---
Variable:
Key: ...
Value: ...
``````c
struct Variable {
char * key;
char * value;
} Variable;
``````rust
struct Variable {
key: &str,
value: &str
}
``````javascript
class Variable {
static Key;
static Value;
}
``````python
class Variable:
Key: str
Value: str
```Because of key-value serialization capabilities, `parser` transforms command-line input into streamable HTTP requests; these requests can then interface distributed key-value systems such as
- AWS: **Secure Systems Manager**
- GitLab: **CI-CD**
- **etcd** (Open-Source)
- Hasicorp: **Vault**
- GitHub: **Actions**## Usage ##
In order to generate a new package, open a shell and issue the following:
```bash
cargo run --bin parser -- --help
```### Cargo ###
**Cargo**: *The Rust build tool and package manager.*
`rustup` ships with the latest, stable version of the Rust build tool and package manager,
also known as *Cargo*. Usage:- **Install**: `cargo install --path "."`
- **Build Package**: `cargo build`
- **Run Program**: `cargo run`
- **Test Runtime**: `cargo test`
- **Documentation**: `cargo doc`
- **Publish Crate**: `cargo publish`#### Nightly ####
- **Install**: `cargo install --path "."`
- **Build Package**: `cargo +nightly build`
- **Run Program**: `cargo +nightly run`
- **Test Runtime**: `cargo +nightly test`
- **Documentation**: `cargo +nightly doc`
- **Publish Crate**: `cargo +nightly publish`To check the current version of `cargo`, run `cargo --version`
---
## Examples ##
```bash
cargo +nightly run --bin example-cli -- --help
```---
## References ##
- [*The Rust Programming Language*](https://doc.rust-lang.org/book/title-page.html)
- [*Getting Started Guide*](https://www.rust-lang.org/learn/get-started)
- [*Installation*](https://www.rust-lang.org/tools/install)- [*Server-API*](https://gitlab.cloud-technology.io/Infrastructure/Server-API.git)
---
[^1]: [Rust](https://doc.rust-lang.org/book/foreword.html)
```
cargo +nightly run --package Schema-Serialization --bin Schema-Serialization
```## Git Module(s) ##
### YAML ###
```bash
git submodule add --force "https://github.com/dtolnay/serde-yaml.git" ./Modules/YAML
```To remove the submodule,
```bash
git submodule deinit --force ./Modules/YAML
```### JSON-Serialization ###
```bash
git submodule add --force "https://github.com/serde-rs/json.git" ./Modules/JSON
```To remove the submodule,
```bash
git submodule deinit --force ./Modules/JSON
```### JSON-Serialization Benchmarks ###
```bash
git submodule add --force "https://github.com/serde-rs/json-benchmark.git" ./Modules/JSON-Benchmarks
```To remove the submodule,
```bash
git submodule deinit --force ./Modules/JSON-Benchmarks
```### Git-C ###
```bash
git submodule add --force "https://github.com/rust-lang/git2-rs.git" ./Modules/Git-C-Bindings
```To remove the submodule,
```bash
git submodule deinit --force ./Modules/Git-C-Bindings
```