use super::raw::raw_format;
pub mod slot;
pub use slot::Slot;
pub mod program;
pub use program::Program;
pub mod live {
use super::program::{self, Program};
use crate::cbin::{self, Cbin};
use crate::error::Error;
use std::io::{Read, Seek};
pub const FORMAT: &str = "ns2l";
pub fn read_from(reader: &mut (impl Read + Seek)) -> Result<Cbin<Program>, Error> {
let file: Cbin<Program> = cbin::read(reader, FORMAT)?;
crate::formats::known_version(FORMAT, file.header.version, program::KNOWN_VERSIONS)?;
Ok(file)
}
}
raw_format!(
synth,
"ns2s",
34
);
raw_format!(
settings,
"ns2y",
32
);