aoc-toolkit 0.1.0-alpha.1

A toolkit for solving Advent of Code problems
Documentation
use serde::Deserialize;
use std::path::PathBuf;

pub const SCHEMA_VERSION: u32 = 1;

#[derive(Debug, Deserialize)]
pub struct ProjectConfig {
    pub schema_version: u32,
    pub project: ProjectSettings,
    pub runner: RunnerConfig,
}

#[derive(Debug, Deserialize)]
pub struct ProjectSettings {
    pub language: Language,
    pub solutions: PathBuf,

    #[serde(default = "default_year_prefix")]
    pub year_prefix: String,
}

fn default_year_prefix() -> String {
    String::new()
}

#[derive(Debug, Deserialize)]
pub struct RunnerConfig {
    pub manifest: PathBuf,
    pub binary: Option<String>,
    pub profile: String,
}

#[derive(Debug, Deserialize, Clone, Copy, PartialEq, Eq)]
#[serde(rename_all = "lowercase")]
pub enum Language {
    Rust,
}