A Rust RNG Library because I dislike how complex the regular one is.
A Rust RNG Library because I dislike how complex the regular one is.
Simple RNG is my first Rust crate. I made it because I did not understand how to use the rand crate that most people choose for RNG. So instead of spending time learning it, I decided to make it a project and make my own RNG crate!
It works with LCG, taking a time or entropy seed as input and generating new numbers with that as the base. This makes it so there is only one guessable seed rather than having a chance of being guessable.
I’m learning so much about Rust and crate development, and it’s been one of my favorite programming projects!
Hope this ship goes well, thanks to anyone who helped me test it!
Today I implemented a new method for seeding the RNG. Instead of using system time you can now use system entropy! Other than this I also updated system time to bitshift to harder to guess.
PS: The reason this project has not yet shipped is because crates.io pages are not working for the demo link.
Log in to leave a comment
Its done! (At least this version!) I just pushed the final changes to the crate, any minor issues from now on will not be devloged. If I have any majors changes I will log them though!
Thanks for anyone who helped with testing!
Log in to leave a comment
I think I am done I did some more work on the project and I think its pretty good and polished, I am looking for feedback before I ship though! I also added PCG as another RNG engine.
Log in to leave a comment
Made version 0.2.1 in which I updated the functions, added better documentation including examples, and made plans for an updated rng system. Additionally I added a no-std feature where you can use the library without the rust standard library!
Log in to leave a comment
I created the GitHub repository and used AI to generate the initial README. I’ve also updated the library, added more functions with comments, and published it to crates.io. It’s basically complete, though I might make a few minor updates soon.
Log in to leave a comment
I started making a random poem generator with the challenge of only the rust core libraries. This was quickly a challenge because I would soon need some random numbers to make my awful random poems!
So I learned how to take the SYSTEM_TIME and make the seed. And then what a linear congruential generator was and how to make some pseudo-random numbers.
I am going to spend some more time working on a library of my RNG system as a more simple aproch that the RAND crate I normally use and always get confused using.
Log in to leave a comment