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

Remove and simplify #29

Merged
merged 7 commits into from
Jan 3, 2025
Merged

Remove and simplify #29

merged 7 commits into from
Jan 3, 2025

Conversation

Zheoni
Copy link
Contributor

@Zheoni Zheoni commented Jan 3, 2025

This PR removes a bunch of dependencies and improves some things. Includes:

  • Remove toml dep, now the bundled units, if enabled, are included from a compile time parse of the units.toml file. So a user of
    the library only has to include a toml parser if they want to customize the units. This also give faster start times.
  • Remove url. This crate had a huge amount of dependencies and complexity. I'm sure there is a reason, but it's not
    needed here. I implemented a simpler way to check URLs.
  • Remove pest. Now the aisle config format uses a manual parser. The format simple and the new parser pass all existing tests.
  • Remove regex. Contributed a ton to file size and it was used in very few sites.
  • Simplify quantity unit. Now the Unit is not stored, only the text. Maybe it's a bit slower to convert, but it's easier to use.

Breaking changes

  • The INLINE_QUANTITIES extension now finds all quantities, not only temperatures. (new feature, but breaking)
  • The Quantity and Unit api had some changes.

It includes some breaking changes specially for the unit thing.

After all of this, the examples/cook.rs in windows went down from 4 MB to 1.2M.

@Zheoni
Copy link
Contributor Author

Zheoni commented Jan 3, 2025

@dubadub just want to confirm you are ok with these breaking changes.

@dubadub
Copy link
Member

dubadub commented Jan 3, 2025

Oh wow! that's impressive! I think wasm bin will be much smaller too. Thank you!

@Zheoni Zheoni merged commit 18f2db7 into main Jan 3, 2025
3 checks passed
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