Private
Public Access
1
0

Adds cross-compiling support for arm/raspi

This commit is contained in:
2025-12-15 00:32:46 -08:00
parent be2e3ea9d9
commit 2f58283e26
11 changed files with 178 additions and 129 deletions

View File

@@ -14,7 +14,7 @@ ctor = "0.2.8"
env_logger = "0.11.5"
futures-util = "0.3.31"
hyper = { version = "0.14", features = ["full"] }
hyper-tls = "0.5.0"
hyper-rustls = { version = "0.24", default-features = false, features = ["http1", "webpki-tokio"] }
log = { version = "0.4.21", features = [] }
serde = { version = "1.0.152", features = ["derive"] }
serde_json = "1.0.91"

View File

@@ -7,7 +7,7 @@ use crate::api::event_socket::{EventSocket, SinkMessage, SocketEvent, SocketUpda
use crate::api::AuthenticationStore;
use bytes::Bytes;
use hyper::{Body, Client, Method, Request, Uri};
use hyper_tls::HttpsConnector;
use hyper_rustls::{HttpsConnector, HttpsConnectorBuilder};
use async_trait::async_trait;
use serde::{de::DeserializeOwned, Deserialize, Serialize};
@@ -466,7 +466,11 @@ impl<K: AuthenticationStore + Send + Sync> APIInterface for HTTPAPIClient<K> {
impl<K: AuthenticationStore + Send + Sync> HTTPAPIClient<K> {
pub fn new(base_url: Uri, auth_store: K) -> HTTPAPIClient<K> {
let https = HttpsConnector::new();
let https = HttpsConnectorBuilder::new()
.with_webpki_roots()
.https_or_http()
.enable_http1()
.build();
let client = Client::builder().build::<_, Body>(https);
HTTPAPIClient { base_url, auth_store, client }