Skip to content

Commit 4369ac6

Browse files
committed
v2.3.1: hotfix setup_server regression
1 parent 56145ff commit 4369ac6

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

Cargo.lock

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

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "hyperware_process_lib"
33
authors = ["Sybil Technologies AG"]
4-
version = "2.3.0"
4+
version = "2.3.1"
55
edition = "2021"
66
description = "A library for writing Hyperware processes in Rust."
77
homepage = "https://hyperware.ai"

src/hyperapp.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -522,12 +522,17 @@ where
522522

523523
pub fn setup_server(
524524
ui_config: Option<&HttpBindingConfig>,
525+
ui_path: Option<String>,
525526
endpoints: &[Binding],
526527
) -> http::server::HttpServer {
527528
let mut server = http::server::HttpServer::new(5);
528529

529530
if let Some(ui) = ui_config {
530-
if let Err(e) = server.serve_ui("ui", vec!["/"], ui.clone()) {
531+
if let Err(e) = server.serve_ui(
532+
&ui_path.unwrap_or_else(|| "ui".to_string()),
533+
vec!["/"],
534+
ui.clone(),
535+
) {
531536
panic!("failed to serve UI: {e}. Make sure that a ui folder is in /pkg");
532537
}
533538
}

0 commit comments

Comments
 (0)