write input files to disk before running exercise

This commit is contained in:
Remo Senekowitsch
2026-08-29 22:39:33 +03:00
committed by Mo Bitar
parent ca9b2b8582
commit 2cef23bb48
4 changed files with 44 additions and 7 deletions
+9 -1
View File
@@ -2,7 +2,10 @@ use anyhow::{Context, Error, Result, bail};
use serde::Deserialize;
use std::{fs, io::ErrorKind};
use crate::{embedded::EMBEDDED_FILES, exercise::RunnableExercise};
use crate::{
embedded::{EMBEDDED_FILES, InputFile},
exercise::RunnableExercise,
};
/// Deserialized from the `info.toml` file.
#[derive(Deserialize)]
@@ -72,6 +75,11 @@ impl RunnableExercise for ExerciseInfo<'_> {
fn test(&self) -> bool {
self.test
}
fn embedded_input_files(&self) -> &[InputFile] {
// We don't have the input files embedded for communtiy exercises.
&[]
}
}
/// The deserialized `info.toml` file.