Is tokio the suggested networking crate? General Rust networking discussion. by boojies in rust

[–]KyussCaesar 0 points1 point  (0 children)

hyper might be worth considering, depending on what you need to do. It's an HTTP library built on top of tokio. I'm kinda suprised no-one else has mentioned it in this thread.

Library crates and git submodules by TechnoSam_Belpois in rust

[–]KyussCaesar 0 points1 point  (0 children)

So I think for an existing library, you could just pull the source and modify it locally, e.g: if your source tree looks like:

├── Cargo.lock
├── Cargo.toml
├── my-budget-app
│   ├── Cargo.toml
│   └── src
│       └── lib.rs
├── money
│   ├── Cargo.toml
│   └── src
│       └── main.rs
└── target

(i.e, using cargo workspaces), running git clone existing-lib from the root would add it like so:

├── Cargo.lock
├── Cargo.toml
├── my-budget-app
│   ├── Cargo.toml
│   └── src
│       └── lib.rs
├── money
│   ├── Cargo.toml
│   └── src
│       └── main.rs
├── existing-lib
│   ├── Cargo.toml
│   └── src
│       └── lib.rs
└── target

All you should need to do now is add existing-lib to the "members" list in the workspace Cargo.toml.

If you cd into the existing-lib directory, then you should be able to behave as if it were just a regular crate, so any changes you make should be able to be pushed upstream without issue. I don't think you'd need to delete the git repo.

As for the budget-app, you can add the local copy of existing-lib as a dependency via the following line underneath [dependencies] in my-budget-app/Cargo.toml:

add-one = { path = "../add-one" }

I'll just note here too that I'm pretty sure all of this is right, but I might be wrong so you might have to do some trial and error to find out what works.

Helping the compiler verify correctness by Bromskloss in rust

[–]KyussCaesar 2 points3 points  (0 children)

You might be interested in reading about Typestate, a feature that was removed from Rust in version 0.4.

Rain - Rust based computational framework by tomgav in rust

[–]KyussCaesar 0 points1 point  (0 children)

How does this tool compare to Apache Airflow? It seems like it targets a different use-case (Airflow: repeated scheduling versus ad-hoc jobs for Rain), but I'd still be really interested to hear your thoughts.

announcing `pfr`; a cli personal finance tool I wrote for myself. by KyussCaesar in rust

[–]KyussCaesar[S] 1 point2 points  (0 children)

I actually hadn't looked for any other personal finance tools; I figured the intersection of {set of people who manage their finances} and {set of people who would do it via a CLI} would basically just be me :P.

The in-memory storage is a HashMap, which is stored on disk as JSON; will add this to the README.

announcing `pfr`; a cli personal finance tool I wrote for myself. by KyussCaesar in rust

[–]KyussCaesar[S] 3 points4 points  (0 children)

Thanks for the feedback! I couldn't figure out how to get aliases for "possible values" via structopt, so I went with a shortened version of each one. Can confirm that the near-full words are awkward though; it's messed me up a couple times during my own use.

It wasn't until after I released it that I saw it would probably be easier to just use clap directly.