Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move BlockKind enum from feather to libcraft #7

Closed
kallekankaanpaa opened this issue Feb 21, 2021 · 3 comments · Fixed by #8
Closed

Move BlockKind enum from feather to libcraft #7

kallekankaanpaa opened this issue Feb 21, 2021 · 3 comments · Fixed by #8

Comments

@kallekankaanpaa
Copy link
Contributor

We need the BlockKind enum to continue with #2. Since the enum is generated we need to also move the generator for it.

Should we move all other generators at the same time and should we stick with the python generators or rewrite those in rust?

@caelunshun
Copy link
Member

Should we move all other generators at the same time and should we stick with the python generators or rewrite those in rust?

I've found Python to be more ergonomic for writing this sort of generator, though I'm fine with either keeping the existing generators or switching to Rust.

Moving all the generators is not a bad idea, but we need to reorganize the code. Right now, all the generated structs are globbed together in the feather-generated crate. For libcraft, we should have a separate crate for each piece of generated info—so BlockKind goes into libcraft-blocks, and Item goes into libcraft-items.

Some generated enums (EntityKind and Particle) probably belong in libcraft-core, since they're too small to have their own crates.

@kallekankaanpaa
Copy link
Contributor Author

kallekankaanpaa commented Feb 21, 2021

Easiest way forward is keeping the existing generators.

Should we create new libcraft-generators crate that would contain all the generators and common code shared by them. and just save the generated info on all of the different crates? Then we should also move the current block state generator from libcraft-blocks-generator to the new libcraft-generators crate.

@PauMAVA
Copy link
Member

PauMAVA commented Feb 21, 2021

This would be a good idea in order to keep the different generators separated. I will need this to continue with #6.

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 a pull request may close this issue.

3 participants