06a5d158b6
This implements processing the main parts of the search configuration JSON into the Rust structure using serde_json. Currently the processing applies to: * The identifier and base properties of the engine records. * The default engine records. As variant and environment handling is not yet implemented, the filter function will return all engines defined in the configuration. |
||
---|---|---|
.. | ||
src | ||
Cargo.toml | ||
README.md |
README.md
Search
The Search Rust component provides various search service functions for Firefox Desktop, Android and iOS.
It is currently under construction and not yet used.
Architecture
This module currently has one function, filter_engine_configuration
, which receives configurations from remote settings and details of the user's environment. It returns a list of search engines to be presented to the user.
This component follows the architecture of the other Application Services Rust components: a cross-platform Rust core, and platform-specific bindings for Firefox Desktop, Android, and iOS. These bindings are generated automatically using the UniFFI tool.
For contributors
This section is a primer for engineers contributing code to the Search Rust component.
search.udl
describes the component's interface for foreign language consumers. UniFFI uses this file to generate the language bindings for each platform.
selector.rs
contains the implementation of SearchEngineSelector
.
Documentation
Each Rust file contains inline documentation for types, traits, functions, and methods.
Documentation for pub
symbols is written with application developers in mind: even if you're a Desktop, Android or iOS developer, the Rust documentation is meant to give you an understanding of how the Gecko, Kotlin and Swift bindings work.
You can see the documentation for all public symbols by running from the command line:
cargo doc --open
Please help us keep our documentation useful for everyone, and feel free to file bugs for anything that looks unclear or out-of-date!
Tests
Tests are run with
cargo test -p search
Bugs
We use Bugzilla to track bugs and feature work. You can use this link to file bugs in the Firefox :: Search
bug component.