Skip to content

Commit 9ff6351

Browse files
committed
Expose Search component APIs to iOS
1 parent 9a406fb commit 9ff6351

File tree

7 files changed

+9
-1
lines changed

7 files changed

+9
-1
lines changed

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

components/search/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ edition = "2021"
55
description = "Library for search service related components."
66
readme = "README.md"
77
license = "MPL-2.0"
8+
exclude = ["/ios"]
89

910
[dependencies]
1011
env_logger = { version = "0.10.0", default-features = false, optional = true }

components/search/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ pub use crate::types::*;
1717
pub use selector::SearchEngineSelector;
1818
pub type SearchApiResult<T> = std::result::Result<T, error::SearchApiError>;
1919

20-
uniffi::setup_scaffolding!();
20+
uniffi::setup_scaffolding!("search");

components/search/uniffi.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[bindings.swift]
2+
ffi_module_name = "MozillaRustComponents"
3+
ffi_module_filename = "searchFFI"

megazords/ios-rust/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,4 @@ sync15 = {path = "../../components/sync15"}
2626
error-support = { path = "../../components/support/error" }
2727
sync_manager = { path = "../../components/sync_manager" }
2828
as-ohttp-client = { path = "../../components/as-ohttp-client" }
29+
search = { path = "../../components/search" }

megazords/ios-rust/MozillaRustComponents.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,4 @@
2121
#import "as_ohttp_clientFFI.h"
2222
#import "suggestFFI.h"
2323
#import "rustlogforwarderFFI.h"
24+
#import "searchFFI.h"

megazords/ios-rust/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ pub use places;
1616
pub use push;
1717
pub use remote_settings;
1818
pub use rust_log_forwarder;
19+
pub use search;
1920
pub use suggest;
2021
pub use sync15;
2122
pub use sync_manager;

0 commit comments

Comments
 (0)