Skip to content

Commit

Permalink
Improvements for release v0.7.0
Browse files Browse the repository at this point in the history
- Renamed `hampi-rs-asn1c` to `rs-asn1c` command.
- Improved the usage of the `rs-asn1c` command.
- Updates to `Cargo.toml` of all workspace crates
  - Added `tests/**/*.rs` to "include"
  - Updated `author` and `homepage`

Signed-off-by: Abhijit Gadgil <gabhijit@iitbombay.org>
  • Loading branch information
gabhijit committed Jun 27, 2024
1 parent 06ba2a5 commit 49e5f2f
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 14 deletions.
7 changes: 4 additions & 3 deletions asn-compiler/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
[package]
name = "asn1-compiler"
version = "0.7.0"
authors = ["Abhijit Gadgil <gabhijit@iitbombay.org>"]
authors = ["Ystero Project Developers <hello@ystero.dev>"]
edition = "2018"
description = "ASN.1 Toolkit in Rust. Compiler for ASN.1 specification, ASN.1 codecs and derive macros for ASN.1 Codecs."
description = "Compiler for compiling ASN.1 specs to Rust, with PER Codec support and derive macros for PER Codecs."
keywords = ["asn1", "per"]
repository = "https://github.com/gabhijit/hampi.git"
homepage = "https://ystero.dev"
license = "Apache-2.0 OR MIT"
readme = "README.md"
include = [
Expand Down Expand Up @@ -40,7 +41,7 @@ anyhow = "1.0.86"
rs-specs-gen = [ "docx-rs"]

[[bin]]
name = "hampi-rs-asn1c"
name = "rs-asn1c"
path = "src/bin/hampi-rs-asn1c.rs"

[[bin]]
Expand Down
29 changes: 21 additions & 8 deletions asn-compiler/src/bin/hampi-rs-asn1c.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,30 +9,43 @@ use asn1_compiler::{
};

#[derive(Parser, Debug)]
#[command(author, version, about, long_about = None)]
#[command(
name = "rs-asn1c",
author,
version,
about,
help_template = "\
{name}: v{version} by {author-with-newline}
{about-with-newline}
{usage-heading} {usage}
{all-args}\n"
)]
struct Cli {
#[arg(last = true)]
/// ASN.1 files to compile
#[arg(last = true, required = true)]
files: Vec<String>,

/// Name of the Rust Module to write generated code to.
/// Name of the Rust Module to write generated code to
#[arg(short, long)]
module: String,

#[arg(short, action=clap::ArgAction::Count)]
debug: u8,

/// Visibility of Generated Structures and members:
#[arg(long, value_enum, default_value_t=Visibility::Public)]
visibility: Visibility,

/// ASN.1 Codecs to be Supported during code generation.
/// ASN.1 Codecs to be Supported during code generation
/// Specify multiple times for multiple codecs. (eg. --codec aper --codec uper)
#[arg(long, required = true)]
codec: Vec<Codec>,

/// Generate code for these derive macros during code generation.
/// Generate code for these derive macros during code generation
#[arg(long)]
derive: Vec<Derive>,

/// Log verbosity (default: info, -d: debug, -dd...: trace)
#[arg(short, action=clap::ArgAction::Count)]
debug: u8,
}

fn main() -> Result<()> {
Expand Down
3 changes: 2 additions & 1 deletion codecs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@
name = "asn1-codecs"
version = "0.7.0"
description = "ASN.1 Codecs for Rust Types representing ASN.1 Types."
authors = ["Abhijit Gadgil <gabhijit@iitbombay.org>"]
authors = ["Ystero Project Developers <hello@ystero.dev>"]
keywords = ["asn1", "per", "decoder", "encoder"]
edition = "2018"
license = "Apache-2.0 OR MIT"
repository = "https://github.com/gabhijit/hampi.git"
homepage = "https://ystero.dev"
readme = "README.md"
include = ["src/**/*.rs", "Cargo.toml", "LICENSE", "LICENSE-MIT", "LICENSE-Apache2", "README.md"]

Expand Down
5 changes: 3 additions & 2 deletions codecs_derive/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
[package]
name = "asn1_codecs_derive"
authors = ["Abhijit Gadgil <gabhijit@iitbombay.org>"]
description = "ASN.1 Codecs derive Macros"
authors = ["Ystero Project Developers <hello@ystero.dev>"]
keywords = ["asn1", "per"]
version = "0.7.0"
edition = "2018"
license = "Apache-2.0 OR MIT"
repository = "https://github.com/gabhijit/hampi.git"
homepage = "https://ystero.dev"
readme = "README.md"
include = ["src/**/*.rs", "Cargo.toml", "LICENSE", "LICENSE-MIT", "LICENSE-Apache2", "README.md"]
include = ["tests/**/*.rs", "src/**/*.rs", "Cargo.toml", "LICENSE", "LICENSE-MIT", "LICENSE-Apache2", "README.md"]

[badges]
maintenance = { status = "actively-developed" }
Expand Down

0 comments on commit 49e5f2f

Please sign in to comment.