Compare commits
No commits in common. "668a91941b01bbc13908311a5f6919970ae93819" and "b10fc3098480d23f585fc21e77bda8e59caa21c4" have entirely different histories.
668a91941b
...
b10fc30984
@ -9,9 +9,7 @@ async fn main() {
|
||||
let router = get_router(assets_path.as_path());
|
||||
|
||||
// TODO: select port based on available port (or ask in CLI)
|
||||
let listener = tokio::net::TcpListener::bind("localhost:3000")
|
||||
.await
|
||||
.unwrap();
|
||||
let listener = tokio::net::TcpListener::bind("localhost:3000").await.unwrap();
|
||||
println!("Listening on: http://{}", listener.local_addr().unwrap());
|
||||
axum::serve(listener, router).await.unwrap();
|
||||
}
|
||||
|
@ -11,10 +11,10 @@ struct HelloResponse {
|
||||
async fn hello() -> impl IntoResponse {
|
||||
HelloResponse {
|
||||
name: "Theo".to_string(),
|
||||
}
|
||||
.into_response()
|
||||
}.into_response()
|
||||
}
|
||||
|
||||
pub fn get_routes() -> Router {
|
||||
Router::new().route("/", routing::get(hello))
|
||||
Router::new()
|
||||
.route("/", routing::get(hello))
|
||||
}
|
||||
|
@ -25,9 +25,7 @@ impl MenuResponse {
|
||||
fn get_classes(&self, is_current_item: &bool) -> String {
|
||||
let common_classes = match self.mobile {
|
||||
true => "block border-l-4 py-2 pl-3 pr-4 text-base font-medium".to_string(),
|
||||
false => {
|
||||
"inline-flex items-center border-b-2 px-1 pt-1 text-sm font-medium".to_string()
|
||||
}
|
||||
false => "inline-flex items-center border-b-2 px-1 pt-1 text-sm font-medium".to_string(),
|
||||
};
|
||||
match (self.mobile, is_current_item) {
|
||||
(true, true) => common_classes + " border-indigo-500 bg-indigo-50 text-indigo-700",
|
||||
@ -53,10 +51,10 @@ async fn menu(Query(params): Query<MenuParameters>) -> impl IntoResponse {
|
||||
current: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
.into_response()
|
||||
}.into_response()
|
||||
}
|
||||
|
||||
pub fn get_routes() -> Router {
|
||||
Router::new().route("/menu", routing::get(menu))
|
||||
Router::new()
|
||||
.route("/menu", routing::get(menu))
|
||||
}
|
||||
|
@ -56,10 +56,10 @@ async fn menu(Query(params): Query<MenuParameters>) -> impl IntoResponse {
|
||||
current: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
.into_response()
|
||||
}.into_response()
|
||||
}
|
||||
|
||||
pub fn get_routes() -> Router {
|
||||
Router::new().route("/menu", routing::get(menu))
|
||||
Router::new()
|
||||
.route("/menu", routing::get(menu))
|
||||
}
|
@ -16,10 +16,7 @@ fn main() {
|
||||
|
||||
// Add local lib directory to the linker search path (for def files and static libs)
|
||||
let static_lib_path = manifest_path.join("lib");
|
||||
println!(
|
||||
"cargo::rustc-link-search=native={}",
|
||||
static_lib_path.display()
|
||||
);
|
||||
println!("cargo::rustc-link-search=native={}", static_lib_path.display());
|
||||
|
||||
// Add the SESAM_FSV_LIB_PATH to the linker search path
|
||||
let fsv_lib_path = PathBuf::from(env::var("SESAM_FSV_LIB_PATH").unwrap());
|
||||
@ -34,9 +31,6 @@ fn main() {
|
||||
}
|
||||
|
||||
// Link the SESAM_FSV_SSVLIB dynamic library
|
||||
println!(
|
||||
"cargo::rustc-link-lib=dylib={}",
|
||||
env::var("SESAM_FSV_SSVLIB").unwrap()
|
||||
);
|
||||
println!("cargo::rustc-link-lib=dylib={}", env::var("SESAM_FSV_SSVLIB").unwrap());
|
||||
// TODO : try `raw-dylib` instead of `dylib` on Windows to avoid the need of the `lib` headers compiled from the `def`
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user