Skip to content

Commit 2834644

Browse files
committed
refactor: hax-phase-debug-webapp is no longer a separate crate
1 parent 297c837 commit 2834644

9 files changed

Lines changed: 7 additions & 29 deletions

File tree

Cargo.lock

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

Cargo.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ members = [
55
"cli/subcommands",
66
"cli/driver",
77
"test-harness",
8-
"engine/utils/phase-debug-webapp",
98
"hax-lib",
109
"hax-lib-macros",
1110
"hax-lib-macros/types",
@@ -23,7 +22,6 @@ default-members = [
2322
"cli/subcommands",
2423
"cli/driver",
2524
"test-harness",
26-
"engine/utils/phase-debug-webapp",
2725
"hax-lib",
2826
"hax-lib-macros",
2927
"hax-lib-macros/types",
@@ -77,7 +75,6 @@ annotate-snippets = "0.11"
7775
hax-frontend-exporter = { path = "frontend/exporter", version = "=0.1.0-pre.1", default-features = false }
7876
hax-adt-into = { path = "frontend/exporter/adt-into", version = "=0.1.0-pre.1" }
7977
hax-frontend-exporter-options = { path = "frontend/exporter/options", version = "=0.1.0-pre.1" }
80-
hax-phase-debug-webapp = { path = "engine/utils/phase-debug-webapp", version = "=0.1.0-pre.1" }
8178
hax-lib-macros-types = { path = "hax-lib-macros/types", version = "=0.1.0-pre.1" }
8279
hax-lib-macros = { path = "hax-lib-macros", version = "=0.1.0-pre.1" }
8380
hax-lib = { path = "hax-lib", version = "=0.1.0-pre.1" }

cli/subcommands/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ version_check = "0.9"
3535
rustup-toolchain = "0.1"
3636
colored.workspace = true
3737
is-terminal = "0.4.9"
38-
hax-phase-debug-webapp.workspace = true
38+
tiny_http = "0.12"
3939
inquire = "0.6"
4040
annotate-snippets.workspace = true
4141
serde-jsonlines = "0.5.0"

cli/subcommands/src/cargo_hax.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ use std::io::Write;
1212
use std::path::PathBuf;
1313
use std::process;
1414

15+
mod engine_debug_webapp;
16+
1517
/// Return a toolchain argument to pass to `cargo`: when the correct nightly is
1618
/// already present, this is None, otherwise we (1) ensure `rustup` is available
1719
/// (2) install the nightly (3) return the toolchain
@@ -340,7 +342,7 @@ fn run_engine(
340342
eprintln!("----------------------------------------------");
341343
eprintln!("----------------------------------------------");
342344
eprintln!("----------------------------------------------");
343-
hax_phase_debug_webapp::run(|| debug_json.clone())
345+
engine_debug_webapp::run(|| debug_json.clone())
344346
}
345347
Some(DebugEngineMode::File(_file)) if !backend.dry_run => {
346348
println!("{}", debug_json)
File renamed without changes.

engine/utils/phase-debug-webapp/src/lib.rs renamed to cli/subcommands/src/engine_debug_webapp/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ pub fn run(get_json: impl Fn() -> String) {
2323
let ct_utf8 = Header::from_bytes(&b"charset"[..], &b"utf-8"[..]).unwrap();
2424
for request in server.incoming_requests() {
2525
let response = match request.url() {
26-
"/" => Response::from_string(include_str!("../static/index.html"))
26+
"/" => Response::from_string(include_str!("static/index.html"))
2727
.with_header(ct_html.clone())
2828
.with_header(ct_utf8.clone()),
29-
"/script.js" => Response::from_string(include_str!("../static/script.js"))
29+
"/script.js" => Response::from_string(include_str!("static/script.js"))
3030
.with_header(ct_js.clone())
3131
.with_header(ct_utf8.clone()),
3232
path if path.starts_with("/debug-hax-engine.json") => {
File renamed without changes.
File renamed without changes.

engine/utils/phase-debug-webapp/Cargo.toml

Lines changed: 0 additions & 14 deletions
This file was deleted.

0 commit comments

Comments
 (0)