Update http server recipes

This commit is contained in:
Wildan Mubarok 2025-07-13 12:42:32 +00:00 committed by Jeremy Soller
parent c9f1240cf8
commit d17e520284
2 changed files with 33 additions and 10 deletions

View File

@ -1,8 +1,11 @@
#TODO promote
[source]
git = "https://github.com/TheWaWaR/simple-http-server"
[build]
template = "cargo"
dependencies = [
"openssl1",
]
[source]
git = "https://github.com/TheWaWaR/simple-http-server"
[build]
template = "custom"
dependencies = [
"openssl1",
]
script = """
DYNAMIC_INIT
cookbook_cargo
"""

View File

@ -1,5 +1,25 @@
#TODO not compiled or tested
#TODO camino crate error
[source]
git = "https://github.com/http-server-rs/http-server"
# Broken since https://github.com/http-server-rs/http-server/pull/461
# because it needs https://trunkrs.dev to work
rev = "9ffa604de326e013330bced8e36dd7a6945ecb9f"
shallow_clone = true
[build]
template = "cargo"
template = "custom"
dependencies = [
"openssl1",
]
script = """
DYNAMIC_INIT
export OPENSSL_DIR="${COOKBOOK_SYSROOT}"
export OPENSSL_STATIC="true"
"${COOKBOOK_CARGO}" build \
--manifest-path "${COOKBOOK_SOURCE}/crates/file-explorer-plugin/Cargo.toml" \
--locked ${build_flags} --lib
cp -v \
"target/${TARGET}/${build_type}/libfile_explorer_plugin.dylib" \
"${COOKBOOK_SOURCE}"/lib/http-server/inline/file_explorer.plugin.httprs
PACKAGE_PATH=crates/http-server cookbook_cargo --bin http-server
"""