pub struct CodeRun {
pub args: Option<Vec<String>>,
pub code: String,
pub files: Option<Vec<CodeFile>>,
pub lang: String,
pub runtime_session_hint: Option<String>,
pub session_id: Option<String>,
pub user_id: Option<String>,
}Fields§
§args: Option<Vec<String>>Args become the PROGRAM’s argv, never the compiler’s. For the compiled languages the toolchain builds first and these are passed to the binary it produced.
code: StringCode is the WHOLE program, not a fragment: it is written to a single file and that file is what runs, so a compiled language needs its entry point and an interpreted one runs top to bottom.
files: Option<Vec<CodeFile>>Files are inputs the host already put in some session. Each names the session its bytes live in, which is usually — and ideally — the session this run wants.
lang: StringLang selects the toolchain, and with it the filename the code is written to and the line that runs it: py, js, ts, bash, r, php, go, rs, c, cpp, java, d, f90. Anything else is refused rather than guessed at — a run in the wrong language fails somewhere deep in a compiler, which reads as an outage.
runtime_session_hint: Option<String>RuntimeSessionHint is the stateful-session hint. It is carried so a client that sends it is not silently misread, and it selects nothing here: every session in this implementation is already a warm sandbox, so there is no second kind of runtime for a hint to choose between.
session_id: Option<String>SessionID continues an EXISTING sandbox, which is what makes runs stateful: the same filesystem, so one run’s output file is the next run’s input. Empty leases a fresh sandbox and the id it got comes back on the result.
user_id: Option<String>UserID attributes the run inside the caller’s org. It is a label, never a tenant: the org is resolved from the validated principal and a value here cannot widen what the run may reach.