soda_sol 0.1.1

Generates Solana Projects from an IDL
Documentation
1
2
3
4
5
6
7
8
9
use crate::{Error, Template};
use bincode::serialize;
use std::io::Write;

/// Save a template to a .soda file
pub fn save_template(template: Template, path: &str) -> Result<(), Error> {
    let mut file = std::fs::File::create(path)?;
    Ok(file.write_all(&serialize(&template)?)?)
}