2022-02-19 11:37:31 +01:00
|
|
|
# Sing
|
|
|
|
|
|
|
|
Std
|
|
|
|
I/o
|
|
|
|
Negotiator
|
|
|
|
Generator
|
|
|
|
|
|
|
|
## What is sing meant to be?
|
|
|
|
|
|
|
|
- Provide stdio interface to traits
|
|
|
|
- not like serde because it's for traits instead of objects
|
|
|
|
- not like clap since it works at run time, not before
|
|
|
|
- similar ease of use as both of the above though
|
|
|
|
|
|
|
|
## How to get there
|
|
|
|
|
|
|
|
- Using lalrpop (in a feature flag)
|
|
|
|
- Maybe utilize serde
|
|
|
|
- Look at how clap handles states between macro calls
|
|
|
|
- They operate on a singleton lol
|
2022-02-19 17:30:38 +01:00
|
|
|
- We should, too
|
|
|
|
- Providing both a builder and derive interface makes sense
|
|
|
|
- Needs a list of traits and one for functions
|
|
|
|
- latter one should be created from the first with a macro
|
|
|
|
- should provide a method to match a call to these functions
|
|
|
|
- It should also own (locked) Stdin, Stdout and Stderr (or any one Read and two Write objects)
|
2022-02-19 11:37:31 +01:00
|
|
|
|
|
|
|
## Links oder so lül
|
|
|
|
|
|
|
|
https://serde.rs/impl-serializer.html
|
|
|
|
https://docs.serde.rs/serde/trait.Serializer.html
|
|
|
|
https://docs.rs/proc-macro2/1.0.36/proc_macro2/
|
|
|
|
https://docs.rs/syn/1.0.86/syn/
|
|
|
|
https://github.com/clap-rs/clap/blob/master/src/derive.rs
|
|
|
|
https://github.com/clap-rs/clap
|
|
|
|
https://github.com/clap-rs/clap/blob/v3.0.14/examples/tutorial_builder/README.md
|
|
|
|
https://www.morling.dev/blog/whats-in-a-good-error-message/
|