zamm 0.0.1

A literate programming tool for Yin and Yang
/// Output config for main function code generation.
#[derive(Eq, PartialEq, Debug)]
pub struct MainConfig {
    /// Imports that the main function uses.
    pub imports: Vec<String>,
    /// Lines of code to include in the main function. Should really be additional fragments to
    /// include.
    pub lines: Vec<String>,
}

/// Runtime options for code generation.
#[derive(Copy, Clone)]
pub struct CodegenConfig {
    /// Whether or not to mark each generated line of code with the autogeneration comment
    /// specified by `zamm_yang::codegen::mark_autogen::AUTOGENERATION_MARKER`.
    pub comment_autogen: bool,
    /// Whether or not to add rustfmt attributes to prevent rustfmt from acting on certain lines.
    pub add_rustfmt_attributes: bool,
    /// Whether or not we want Cargo to track autogenerated files and rebuild when they change.
    pub track_autogen: bool,
    /// Whether or not we're outputting code for Yin itself.
    pub yin: bool,
    /// Whether or not we're outputting code for release.
    ///
    /// If we are, the implications are:
    ///
    ///  * No autogeneration comments, so that documentation looks good on docs.rs
    ///  * No `build.rs`, because there's no network access for builds on docs.rs anyways
    ///  * Autogenerated files will be committed instead of ignored, because they can't be built
    ///    without `build.rs` to do it
    ///  * A release branch will be created, ready for cargo publishing
    pub release: bool,
}