@openexam/code
v0.1.0
Published
Programming-task widget for OpenExam (spec 0.2). Student code is run in a WASM-sandboxed runtime; expected stdout is compared.
Readme
@openexam/code
Programming-task widget. The student writes code; the host runs
it in a WASM-sandboxed runtime (currently QuickJS-WASM via
@openexam/runtime-wasi);
graded by string-comparing stdout to the author's expected
output.
Read an integer `n` from stdin and print `n * 2`.
::: response code { language=javascript, stdin="10" }20
:::The directive body is a single fenced code block whose content is
the expected stdout (trimmed before comparison; solution
material). The student writes their own code in the editor and
the host executes it with the supplied stdin, captures stdout,
and compares.
v1 supports language=javascript only. Python via Pyodide is a
v2 follow-on against the same @openexam/runtime-wasi interface.
License
Apache-2.0. See LICENSE and the canonical ../../LICENSE at the repository root.
