pub fn new() -> Result<Self> {
        let mut handlebars = Handlebars::new();
        macro_rules! template {
            ($path:expr) => {
                handlebars.register_template_string($path, include_str!(concat!($path, ".hbs")))
            };
        }

        template!("layout.ld")?;
        template!("new/src-cortexm/bin.rs")?;
        template!("new/src-cortexm/lib.rs")?;
        template!("new/src-cortexm/thr.rs")?;
        template!("new/src-cortexm/tasks/mod.rs")?;
        template!("new/src-cortexm/tasks/root.rs")?;
        template!("new/Cargo.toml")?;
        template!("new/Drone.toml")?;
        template!("new/Justfile")?;
        template!("new/rust-toolchain")?;
        template!("new/_cargo/config")?;
        template!("new/_gitignore")?;
        template!("bmp/flash.gdb")?;
        template!("bmp/gdb.gdb")?;
        template!("bmp/reset.gdb")?;
        template!("bmp/swo.gdb")?;
        template!("bmp/target.gdb")?;
        template!("bmp/target/cortexm.gdb")?;
        template!("bmp/target/stm32.gdb")?;
        template!("jlink/reset.jlink")?;
        template!("jlink/flash.jlink")?;
        template!("jlink/gdb.gdb")?;
        template!("jlink/dso.gdb")?;
        template!("openocd/flash.openocd")?;
        template!("openocd/gdb.gdb")?;
        template!("openocd/gdb.openocd")?;
        template!("openocd/reset.openocd")?;
        template!("openocd/swo.gdb")?;

        helpers::register(&mut handlebars);
        Ok(Self(handlebars))
    }
/// Creates a new templates registry.
Creates a new templates registry.
Creates a new templates registry .
pub fn new() -> Result<Self> {
        let mut handlebars = Handlebars::new();
        macro_rules! template {
            ($path:expr) => {
                handlebars.register_template_string($path, include_str!(concat!($path, ".hbs")))
            };
        }
        template!("layout.ld")?;
        template!("new/src-cortexm/bin.rs")?;
        template!("new/src-cortexm/lib.rs")?;
        template!("new/src-cortexm/thr.rs")?;
        template!("new/src-cortexm/tasks/mod.rs")?;
        template!("new/src-cortexm/tasks/root.rs")?;
        template!("new/Cargo.toml")?;
        template!("new/Drone.toml")?;
        template!("new/Justfile")?;
        template!("new/rust-toolchain")?;
        template!("new/_cargo/config")?;
        template!("new/_gitignore")?;
        template!("bmp/flash.gdb")?;
        template!("bmp/gdb.gdb")?;
        template!("bmp/reset.gdb")?;
        template!("bmp/swo.gdb")?;
        template!("bmp/target.gdb")?;
        template!("bmp/target/cortexm.gdb")?;
        template!("bmp/target/stm32.gdb")?;
        template!("jlink/reset.jlink")?;
        template!("jlink/flash.jlink")?;
        template!("jlink/gdb.gdb")?;
        template!("jlink/dso.gdb")?;
        template!("openocd/flash.openocd")?;
        template!("openocd/gdb.gdb")?;
        template!("openocd/gdb.openocd")?;
        template!("openocd/reset.openocd")?;
        template!("openocd/swo.gdb")?;
        helpers::register(&mut handlebars);
        Ok(Self(handlebars))
    }
pub fn new ( ) -> Result < Self > { let mut handlebars = Handlebars :: new ( ) ; macro_rules! template { ( $path : expr ) => { handlebars register_template_string ( $path include_str ( concat ( $path " " ) ) ) } ; } template ! ( " " ) ? ; template ! ( " " ) ? ; template ! ( " " ) ? ; template ! ( " " ) ? ; template ! ( " " ) ? ; template ! ( " " ) ? ; template ! ( " " ) ? ; template ! ( " " ) ? ; template ! ( " " ) ? ; template ! ( " " ) ? ; template ! ( " " ) ? ; template ! ( " " ) ? ; template ! ( " " ) ? ; template ! ( " " ) ? ; template ! ( " " ) ? ; template ! ( " " ) ? ; template ! ( " " ) ? ; template ! ( " " ) ? ; template ! ( " " ) ? ; template ! ( " " ) ? ; template ! ( " " ) ? ; template ! ( " " ) ? ; template ! ( " " ) ? ; template ! ( " " ) ? ; template ! ( " " ) ? ; template ! ( " " ) ? ; template ! ( " " ) ? ; template ! ( " " ) ? ; helpers :: register ( & mut handlebars ) ; Ok ( Self ( handlebars ) ) }
Creates a new templates registry.
Creates a new templates registry .