Compare commits

...

3 commits

Author SHA1 Message Date
16bc99203f Bump version and update README 2022-03-27 18:28:30 +02:00
cd0bd88d6e Updated example after name change. 2022-03-27 17:58:24 +02:00
52c85c61b9 Fixed imports after name change 2022-03-27 17:57:29 +02:00
6 changed files with 17 additions and 17 deletions

View file

@ -7,7 +7,7 @@ members = [
[package] [package]
name = "sing_rs" name = "sing_rs"
version = "0.1.0" version = "0.1.2"
edition = "2021" edition = "2021"
license = "AGPL-3.0-or-later" license = "AGPL-3.0-or-later"
license_file = "LICENSE.md" license_file = "LICENSE.md"
@ -20,6 +20,6 @@ description = "Macros for generating STDIN/STDOUT interfaces to trait objects."
bench = false bench = false
[dependencies] [dependencies]
sing_macros = { path = "./sing_macros", version = "0.1.0" } sing_macros = { path = "./sing_macros", version = "0.1" }
sing_parse = { path = "./sing_parse", version = "0.1.0" } sing_parse = { path = "./sing_parse", version = "0.1" }
sing_util = { path = "./sing_util", version = " 0.1.0" } sing_util = { path = "./sing_util", version = " 0.1" }

View file

@ -11,7 +11,7 @@
[![Crates.io](https://img.shields.io/crates/v/sing_rs)](https://crates.io/crates/sing_rs) [![Crates.io](https://img.shields.io/crates/v/sing_rs)](https://crates.io/crates/sing_rs)
[![License](https://img.shields.io/crates/l/sing_rs)](https://www.gnu.org/licenses/agpl-3.0.html) [![License](https://img.shields.io/crates/l/sing_rs)](https://www.gnu.org/licenses/agpl-3.0.html)
## What is sing meant to be? ## What is sing?
This crate is meant to create interfaces between traits in Rust libraries and the command line. This crate is meant to create interfaces between traits in Rust libraries and the command line.
It does this by providing two macros: It does this by providing two macros:
@ -23,7 +23,7 @@ It does this by providing two macros:
```rust ```rust
use serde::{Serialize, Deserialize}; use serde::{Serialize, Deserialize};
use sing::{sing_add_trait, sing_loop}; use sing_rs::{sing_add_trait, sing_loop};
trait FruitTree { trait FruitTree {
fn shake(&self, shakes: u32) -> Vec<Fruit>; fn shake(&self, shakes: u32) -> Vec<Fruit>;
@ -62,4 +62,4 @@ Yes, it's somewhat far-fetched, but I really wanted to be able to sing and [clap
## Why the name? ## Why the name?
See above. See above.

View file

@ -1,6 +1,6 @@
[package] [package]
name = "sing_macros" name = "sing_macros"
version = "0.1.0" version = "0.1.2"
edition = "2021" edition = "2021"
license = "AGPL-3.0-or-later" license = "AGPL-3.0-or-later"
license_file = "../LICENSE.md" license_file = "../LICENSE.md"
@ -13,8 +13,8 @@ description = "Macros for sing_rs"
proc-macro = true proc-macro = true
[dependencies] [dependencies]
sing_util = { version = "0.1", path = "../sing_util" } sing_util = "0.1"
sing_parse = { version = "0.1", path = "../sing_parse" } sing_parse = "0.1"
proc-macro2 = "1.0" proc-macro2 = "1.0"
ron = "0.7" ron = "0.7"
rand = "0.7" rand = "0.7"

View file

@ -214,7 +214,7 @@ fn loop_inner(input: LoopParams, span: Span) -> Result<TokenStream2, Box<dyn Err
Some(f) => f, Some(f) => f,
None => { None => {
parse2::<Path>(quote! { parse2::<Path>(quote! {
sing::callobj_to_string sing_rs::callobj_to_string
})? })?
} }
}; };
@ -224,7 +224,7 @@ fn loop_inner(input: LoopParams, span: Span) -> Result<TokenStream2, Box<dyn Err
Some(f) => f, Some(f) => f,
None => { None => {
parse2::<Path>(quote! { parse2::<Path>(quote! {
sing::callobj_from_string sing_rs::callobj_from_string
})? })?
} }
}; };
@ -282,7 +282,7 @@ fn loop_inner(input: LoopParams, span: Span) -> Result<TokenStream2, Box<dyn Err
let message_type = match message_type { let message_type = match message_type {
Some(m) => m, Some(m) => m,
None => parse2::<Path>(quote! { None => parse2::<Path>(quote! {
sing::CallObj sing_rs::CallObj
})?, })?,
}; };
@ -442,7 +442,7 @@ fn loop_inner(input: LoopParams, span: Span) -> Result<TokenStream2, Box<dyn Err
// processing it by the match statements constructed above and write to output. // processing it by the match statements constructed above and write to output.
Ok(quote! { Ok(quote! {
use std::io::{BufRead, Write}; use std::io::{BufRead, Write};
use sing::TraitCallMessage; use sing_rs::TraitCallMessage;
#( #initializations )* #( #initializations )*

View file

@ -1,6 +1,6 @@
[package] [package]
name = "sing_parse" name = "sing_parse"
version = "0.1.0" version = "0.1.2"
edition = "2021" edition = "2021"
license = "AGPL-3.0-or-later" license = "AGPL-3.0-or-later"
license_file = "../LICENSE.md" license_file = "../LICENSE.md"
@ -21,5 +21,5 @@ syn = "1"
regex = "1" regex = "1"
lalrpop-util = "0.19" lalrpop-util = "0.19"
lalrpop = "0.19" lalrpop = "0.19"
sing_util = { version = "0.1", path = "../sing_util" } sing_util = "0.1"
serde = { version = "1.0", features = ["derive"] } serde = { version = "1.0", features = ["derive"] }

View file

@ -1,6 +1,6 @@
[package] [package]
name = "sing_util" name = "sing_util"
version = "0.1.0" version = "0.1.2"
edition = "2021" edition = "2021"
license = "AGPL-3.0-or-later" license = "AGPL-3.0-or-later"
license_file = "../LICENSE.md" license_file = "../LICENSE.md"