Debian Codegraph @

third_party/rust/search/README.md

raw
1 # Search
2
3 The **Search Rust component** provides various [search service](https://firefox-source-docs.mozilla.org/toolkit/search/index.html) functions for Firefox Desktop, Android and iOS.
4
5 It is currently under construction and not yet used.
6
7 ## Architecture
8
9 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.
10
11 This component follows the architecture of the other [Application Services Rust components](https://mozilla.github.io/application-services/book/index.html): a cross-platform Rust core, and platform-specific bindings for Firefox Desktop, Android, and iOS. These bindings are generated automatically using the [UniFFI](https://mozilla.github.io/uniffi-rs/) tool.
12
13 ### For contributors
14
15 This section is a primer for engineers contributing code to the Search Rust component.
16
17 `search.udl` describes the component's interface for foreign language consumers. UniFFI uses this file to generate the language bindings for each platform.
18
19 `selector.rs` contains the implementation of `SearchEngineSelector`.
20
21 ## Documentation
22
23 Each Rust file contains [inline documentation](https://doc.rust-lang.org/rustdoc/what-is-rustdoc.html) for types, traits, functions, and methods.
24
25 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.
26
27 You can see the documentation for all public symbols by running from the command line:
28
29 ```shell
30 cargo doc --open
31 ```
32
33 Please help us keep our documentation useful for everyone, and feel free to file bugs for anything that looks unclear or out-of-date!
34
35 ## Tests
36
37 Tests are run with
38
39 ```shell
40 cargo test -p search
41 ```
42
43 ## Bugs
44
45 We use Bugzilla to track bugs and feature work. You can use [this link](https://bugzilla.mozilla.org/enter_bug.cgi?product=Firefox&component=Search) to file bugs in the `Firefox :: Search` bug component.