added listening output
All checks were successful
CI / build-test-release (push) Successful in 9m58s

This commit is contained in:
Jorijn van der Graaf 2026-05-31 17:23:34 +02:00
commit 0dd1738e33

View file

@ -1569,16 +1569,21 @@ int Crafter::Run(int argc, char** argv) {
"caddy, python3, python, php, ruby, busybox, npx (Node.js).");
return 1;
}
if (isolated) {
std::println("serving {} via {} at http://localhost:{}/ (cross-origin isolated)",
absDir.string(), picked, port);
} else {
std::println("serving {} via {} at http://localhost:{}/", absDir.string(), picked, port);
std::println("listening on port :{}", port);
if (!isolated) {
std::println(std::cerr,
"warning: {} does not emit COOP/COEP — performance.now() will be coarse "
"(~0.1ms). Install caddy, python3, or php for cross-origin isolation.",
picked);
}
// Silence the backend's own banner/request logs so the
// experience is identical regardless of which server is
// picked — the line above is the only output.
#ifdef _WIN32
cmd += " > NUL 2>&1";
#else
cmd += " > /dev/null 2>&1";
#endif
return std::system(cmd.c_str()) == 0 ? 0 : 1;
}
// wasi-cli wasm — needs a standalone runtime.