mirror of
https://github.com/elicpeter/nyx.git
synced 2026-06-30 20:39:39 +02:00
[pitboss] phase 02: M2 — Python end-to-end excellence with all hardening baked in
This commit is contained in:
parent
894f587b60
commit
0bf39047b9
50 changed files with 4167 additions and 170 deletions
29
src/dynamic/lang/mod.rs
Normal file
29
src/dynamic/lang/mod.rs
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
//! Per-language harness emitters.
|
||||
//!
|
||||
//! Each submodule implements `emit(spec) -> HarnessSource` for one language.
|
||||
//! The top-level [`emit`] function dispatches on `spec.lang`.
|
||||
|
||||
pub mod python;
|
||||
|
||||
use crate::dynamic::spec::HarnessSpec;
|
||||
use crate::evidence::UnsupportedReason;
|
||||
use crate::symbol::Lang;
|
||||
|
||||
/// Generated harness source ready to write to disk.
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct HarnessSource {
|
||||
/// Harness source code as a UTF-8 string.
|
||||
pub source: String,
|
||||
/// Filename for the harness (e.g. `"harness.py"`).
|
||||
pub filename: String,
|
||||
/// Shell command to invoke the harness (relative to the workdir).
|
||||
pub command: Vec<String>,
|
||||
}
|
||||
|
||||
/// Dispatch to the appropriate language emitter.
|
||||
pub fn emit(spec: &HarnessSpec) -> Result<HarnessSource, UnsupportedReason> {
|
||||
match spec.lang {
|
||||
Lang::Python => python::emit(spec),
|
||||
_ => Err(UnsupportedReason::LangUnsupported),
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue