MCPcopy Create free account
hub / github.com/f0rr0/oliphaunt / check_source_controlled_wasix_export_list

Function check_source_controlled_wasix_export_list

xtask/src/main.rs:7729–7773  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

7727}
7728
7729fn check_source_controlled_wasix_export_list() -> Result<()> {
7730 let path = Path::new("assets/generated/wasix-dl.exports");
7731 ensure_file(path)?;
7732 let text = fs::read_to_string(path).with_context(|| format!("read {}", path.display()))?;
7733 ensure!(
7734 !text.trim().is_empty(),
7735 "{} must not be empty",
7736 path.display()
7737 );
7738 for symbol in [
7739 "ProcessStartupPacket",
7740 "PostgresMainLoopOnce",
7741 "PostgresMainLongJmp",
7742 "PostgresSendReadyForQueryIfNecessary",
7743 "pgl_getMyProcPort",
7744 "pgl_pq_flush",
7745 "pgl_sendConnData",
7746 "pgl_setPGliteActive",
7747 "pgl_set_force_host_error_recovery",
7748 "pgl_startPGlite",
7749 "pgl_wasix_input_write",
7750 "pgl_wasix_output_read",
7751 "malloc",
7752 "free",
7753 ] {
7754 ensure!(
7755 text.lines().any(|line| line == symbol),
7756 "{} is missing required runtime/protocol export symbol {symbol}",
7757 path.display()
7758 );
7759 }
7760 let mut previous: Option<&str> = None;
7761 for line in text.lines().filter(|line| !line.trim().is_empty()) {
7762 if let Some(previous) = previous {
7763 ensure!(
7764 previous <= line,
7765 "{} must stay sorted for deterministic reviews; {previous} appears before {line}",
7766 path.display()
7767 );
7768 }
7769 previous = Some(line);
7770 }
7771 println!("source-controlled WASIX export-list guard passed");
7772 Ok(())
7773}
7774
7775fn wasix_export_list_text() -> Result<String> {
7776 if Path::new(WASIX_BUILD_MANIFEST_PATH).exists() {

Callers 1

verify_committed_assetsFunction · 0.85

Calls 1

ensure_fileFunction · 0.85

Tested by

no test coverage detected