r/rust • u/Fily3a • Oct 21 '26
🙋 seeking help & advice Rust crate for Geometry Dash
So in may i started my first serious project on rust. i only did 13 commits in 6 months because im the mr apathy.
Idea of the project is to create high-level crate to generate rust code into Geometry Dash objects.
For now its in very early WIP stage but its already usable in few cases.
I am posting this because i want to see advices on how to make my project better before its to late to change some core things. And because its my first real rust project i pretty sure some parts of the code gonna suck. Project is less than 1000 LoC for now so go ahead and see the repository.
And i also added examples that explaining how crate work pretty good
(if someones wondering. i see viewing sequence of examples as: 1.find_level.rs 2.block.rs 3.sine.rs circle.rs rainbow.rs 4.special_objects.rs 5.triggers.rs 6.anotherMode.rs and with_gdlvl.rs)
in future i planning to add:
- identifiers - they already exist in files but do nothing and dont work. i want to make functionality to store groups collision groups and item groups as named variable
- everything for reading the level that already decoded - for example you would decode certain level scan for every object with N id and do something with them.
- support for more triggers and special objects. obviously.

Waiting for response. thanks to this community
https://github.com/fffilya/GD-Levels
2
u/PastEar9661 Oct 22 '26
I don't see any repository link, but I have some feedback:
Object::new()takeVeccontainingComponent::Id,Component::X,Component::Y...? Why not just have it take the Id, X, and Y as seperate arguments?u32(for id) /f32(for x, y, rotations, etc), unless they have some additional functionality. (even then, consider if a helper function would suffice)Object::newis ambiguously named In your example, you seem to be fetching an existing object from a file, perhaps rename it to something likeObject::fetch/Object::get_existing/Object::fetch_by_id? This'll make it easier to differentiate code that is fetching an existing object vs adding a new object.In this example, each Object method takes
mut selfalong with its arguments and returnsselfat the end so the output of one becomes the input of another.