Compare commits
No commits in common. "16bc99203f9d870b84423a6530782f4421528838" and "655148b2c4f10ab18d2523b5387509ecee732d1d" have entirely different histories.
16bc99203f
...
655148b2c4
6 changed files with 17 additions and 17 deletions
|
@ -7,7 +7,7 @@ members = [
|
||||||
|
|
||||||
[package]
|
[package]
|
||||||
name = "sing_rs"
|
name = "sing_rs"
|
||||||
version = "0.1.2"
|
version = "0.1.0"
|
||||||
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" }
|
sing_macros = { path = "./sing_macros", version = "0.1.0" }
|
||||||
sing_parse = { path = "./sing_parse", version = "0.1" }
|
sing_parse = { path = "./sing_parse", version = "0.1.0" }
|
||||||
sing_util = { path = "./sing_util", version = " 0.1" }
|
sing_util = { path = "./sing_util", version = " 0.1.0" }
|
||||||
|
|
|
@ -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?
|
## What is sing meant to be?
|
||||||
|
|
||||||
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_rs::{sing_add_trait, sing_loop};
|
use sing::{sing_add_trait, sing_loop};
|
||||||
|
|
||||||
trait FruitTree {
|
trait FruitTree {
|
||||||
fn shake(&self, shakes: u32) -> Vec<Fruit>;
|
fn shake(&self, shakes: u32) -> Vec<Fruit>;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "sing_macros"
|
name = "sing_macros"
|
||||||
version = "0.1.2"
|
version = "0.1.0"
|
||||||
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 = "0.1"
|
sing_util = { version = "0.1", path = "../sing_util" }
|
||||||
sing_parse = "0.1"
|
sing_parse = { version = "0.1", path = "../sing_parse" }
|
||||||
proc-macro2 = "1.0"
|
proc-macro2 = "1.0"
|
||||||
ron = "0.7"
|
ron = "0.7"
|
||||||
rand = "0.7"
|
rand = "0.7"
|
||||||
|
|
|
@ -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_rs::callobj_to_string
|
sing::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_rs::callobj_from_string
|
sing::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_rs::CallObj
|
sing::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_rs::TraitCallMessage;
|
use sing::TraitCallMessage;
|
||||||
|
|
||||||
#( #initializations )*
|
#( #initializations )*
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "sing_parse"
|
name = "sing_parse"
|
||||||
version = "0.1.2"
|
version = "0.1.0"
|
||||||
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 = "0.1"
|
sing_util = { version = "0.1", path = "../sing_util" }
|
||||||
serde = { version = "1.0", features = ["derive"] }
|
serde = { version = "1.0", features = ["derive"] }
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "sing_util"
|
name = "sing_util"
|
||||||
version = "0.1.2"
|
version = "0.1.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
license = "AGPL-3.0-or-later"
|
license = "AGPL-3.0-or-later"
|
||||||
license_file = "../LICENSE.md"
|
license_file = "../LICENSE.md"
|
||||||
|
|
Loading…
Reference in a new issue