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

Enumerate Languages And Dialect Regions #79

Open
AldaronLau opened this issue Nov 15, 2023 · 3 comments
Open

Enumerate Languages And Dialect Regions #79

AldaronLau opened this issue Nov 15, 2023 · 3 comments
Labels
enhancement New feature or request
Milestone

Comments

@AldaronLau
Copy link
Member

Enumerate in Language and Region enums according to the standards.

@AldaronLau AldaronLau added the enhancement New feature or request label Nov 15, 2023
@AldaronLau AldaronLau added this to the 1.6.0 milestone Nov 15, 2023
@AldaronLau AldaronLau modified the milestones: 1.6.0, v2.0.0 Mar 3, 2024
@AldaronLau AldaronLau modified the milestones: 1.6.0, v2.0.0 Jan 11, 2025
@cjohnson19
Copy link
Contributor

I've been thinking about what an ideal implementation of this would look like, but my Rust knowledge is seriously lacking in most areas. The canonical approach where one creates the enums upfront seems rough to me from a maintenance / verification perspective.

I've only done some cursory investigation, but would something like a build script which generates the enums be desirable? This would likely use a data directory as mentioned in #90 and generate rust files with the enums.

@AldaronLau
Copy link
Member Author

@cjohnson19 I have a plan here but it depends on #142, and #143

By changing the repo structure to a workspace, we can add an xtask crate. You can read about xtask here: https://github.com/matklad/cargo-xtask (and see an example). I also have an xtask example in another crate I maintain: https://github.com/ardaku/stick

There's a couple reasons to not use build-scripts for this. Mostly, that I want to keep build time down, and the enum generation could potentially take a while to complete.

@cjohnson19
Copy link
Contributor

@AldaronLau Thank you so much for the explanation and links to resources! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants