projectfluent / fluent-rs

Rust implementation of Project Fluent
https://projectfluent.org
Apache License 2.0
1.04k stars 95 forks source link

Allow customizing argument resolver #304

Open JasperDeSutter opened 1 year ago

JasperDeSutter commented 1 year ago

The main value add for a custom argument resolver is not needing to put arguments into a FluentArgs, which has no type safety. See the typesafe_messages example that demonstrates this use case. The first commit optimizes FluentArg by not storing keys as Cows, but as regular &str instead. This reduces a small overhead in data size and arg lookup performance.

gregtatum commented 1 year ago

Oh and also thanks for the PR :)

JasperDeSutter commented 2 months ago

Great to see this project more alive again! I'll pick up my PRs that are still open, though it has been a while so it might take some time to get them all updated.