Use ICU4X collator to compare engines for sorting
Categories
(Firefox :: Search, task, P3)
Tracking
()
People
(Reporter: mcheang, Assigned: mcheang)
References
(Depends on 1 open bug)
Details
(Whiteboard: [sng])
If the engines do not have order_hints we should sort them by alphabetical order. We need to use ICU4X collator to sort engines that are non-ascii characters.
Updated•1 year ago
|
Comment 1•8 months ago
|
||
In Firefox, there is now an app_collator crate that exposes collation according to the Firefox app locale to C++. It would now be trivial to add a Rust entry point.
Does you caller code need to work outside the desktop Firefox context?
Comment 2•8 months ago
|
||
In bug 2022559, I'm adding app_collator::compare() for Firefox desktop internal Rust callers.
| Assignee | ||
Comment 3•8 months ago
|
||
We need the app_collator::compare() for application-services.
Our code is here.
Since it would be called within application-services, I think it will be okay to use, right?
Comment 4•8 months ago
|
||
(In reply to Mandy Cheang [:mcheang][she/her] from comment #3)
We need the
app_collator::compare()for application-services.
Sorry about forgetting how I named the crate: It's app_collator_glue. app_collator_glue::compare() is now on autoland in bug 2022559.
Our code is here.
Since it would be called within application-services, I think it will be okay to use, right?
It's OK to use right away when bug 2022559 merges from autoland if this part of application-services is only compiled in the desktop Firefox context. If this code is also compiled in the megazord/Android/iOS context, then app_collator_glue is not available there at this time.
The megazord config should build a pruned (the sqlite / C++ bits removed) version of app_collator_glue and initialize it in some Android/iOS-specific way: If language-specific data can be included in terms of megazord size, then the initialization needs to know what language to pick. OTOH, if the decision is to minimize size to the point of not having language-specific data, then obviously there's no need to find out the app language.
See bug 1986876 comment 1 for ideas for reducing the data size in the megazord case.
Description
•