Skip to content

This is a demo in how to slap a FastConfig on top of the struct and gives you load and save#5

Merged
FlooferLand merged 14 commits intoFlooferLand:mainfrom
vaytea:main
Dec 10, 2025
Merged

This is a demo in how to slap a FastConfig on top of the struct and gives you load and save#5
FlooferLand merged 14 commits intoFlooferLand:mainfrom
vaytea:main

Conversation

@vaytea
Copy link
Contributor

@vaytea vaytea commented Sep 27, 2025

sorry about the delay
I have test and use this in my app, it works just fine.
tests are implemented
Docs are not ready

I was thinking about an attribute like #[fast_config(crate = "...")] to export the crate like serde in lower deps.

@vaytea vaytea marked this pull request as draft September 27, 2025 13:03
@FlooferLand FlooferLand self-assigned this Sep 29, 2025
@FlooferLand
Copy link
Owner

FlooferLand commented Sep 29, 2025

Over-all a very welcome PR when you're done with it!
The derive macro makes working with fast_config way nicer, and you're using a lot of more modern Rust practices like default features (while I personally prefer not including every feature by default, I understand this seems to be preferred by most Rust users?)

This is still a draft, so as I understand it you'll continue to add to it until its ready for a proper review / merge, and from there on I'll be publishing the fast_config_derive crate as well.

I was thinking about an attribute like #[fast_config(crate = "...")] to export the crate like serde in lower deps.

I'm not sure what you mean specifically

@vaytea vaytea marked this pull request as ready for review December 9, 2025 11:14
@vaytea
Copy link
Contributor Author

vaytea commented Dec 9, 2025

I have also added a new method to create the config directly from file

@FlooferLand
Copy link
Owner

FlooferLand commented Dec 10, 2025

Hi, thank you for the PR!

Looks great so far, however something seems quite odd to me. Was a part of this written by AI?

I'm mainly asking due to the broken GitHub README formatting in your fork, and some of the strange language in the comments, and the tests having very oddly named functions/variables.


image

(Usually mistakes like these would be spotted since they're front and center in your README)

It's somewhat messily formatted featuring inconsistent spacing between lines, includes the # marks usually used in Rust tests that would usually be spotted and removed, and tend to over-explain what's happening in the code via comments even in simple statements.

Not trying to accuse you for any reason, just wondering as your GitHub account is quite new and that's raising suspicions a bit, also wondering about your stance on AI.

I will be merging this regardless, as the code itself is well written outside some small mistakes I can easily correct, but I'm curious.

@FlooferLand FlooferLand merged commit 76ed734 into FlooferLand:main Dec 10, 2025
@FlooferLand
Copy link
Owner

FlooferLand commented Dec 10, 2025

Both crates are now published on crates.io!
Let me know if you encounter any bugs. All the tests passed, but I can't test how it'd actually work in real world scenarios compared to the old version right now.

I'd also appreciate a follow-up PR to add a load_or_default method that defaults and writes the default to the file instead of failing, as I believe calling load right now on a file that doesn't exist would return an error? I'm very busy at the moment so I can't check.

Again, thank you for the PR!

@vaytea
Copy link
Contributor Author

vaytea commented Dec 13, 2025 via email

@FlooferLand
Copy link
Owner

That's fair, thank you for your work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants