Skip to content

feat: add Rust API to create requests#6

Merged
jjhafer merged 1 commit intosilvermine:masterfrom
jjhafer:jhafer/improve_rust_api_support
Mar 18, 2026
Merged

feat: add Rust API to create requests#6
jjhafer merged 1 commit intosilvermine:masterfrom
jjhafer:jhafer/improve_rust_api_support

Conversation

@jjhafer
Copy link
Contributor

@jjhafer jjhafer commented Mar 18, 2026

Consumers would like to create requests from the Rust side of Tauri apps.

@jjhafer jjhafer requested a review from velocitysystems March 18, 2026 01:28
@jjhafer jjhafer force-pushed the jhafer/improve_rust_api_support branch from a85810c to cda30cf Compare March 18, 2026 01:49
&self,
request_headers: &Option<HashMap<String, String>>,
) -> Result<HeaderMap> {
let empty = HashMap::new();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Creates an empty HashMap on every call.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HashMap::new() is effectively free to construct right? Since we're creating it with 0 capacity, no heap allocation occurs until the first insertion. Similar to Vec::new().

Consumers would like to create requests from
the Rust side of Tauri apps.
@jjhafer jjhafer force-pushed the jhafer/improve_rust_api_support branch from cda30cf to 894b07e Compare March 18, 2026 13:40
@jjhafer jjhafer merged commit 0ce8ee2 into silvermine:master Mar 18, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants