refactor: create library with simple entrypoint in main
Create a library entrypoint 'src/lib.rs' and refactor binary entrypoint 'src/main.rs' accordingly.
This commit is contained in:
parent
423badfe07
commit
a9a5e401dc
|
@ -0,0 +1,10 @@
|
||||||
|
#![allow(unused)]
|
||||||
|
|
||||||
|
pub mod cli;
|
||||||
|
pub mod scripts;
|
||||||
|
|
||||||
|
// NOTE: stolen from https://docs.rs/debug_print/latest/debug_print/
|
||||||
|
#[macro_export]
|
||||||
|
macro_rules! debug_println {
|
||||||
|
($($arg:tt)*) => (if ::std::cfg!(debug_assertions) { ::std::println!($($arg)*); })
|
||||||
|
}
|
|
@ -1,11 +1,7 @@
|
||||||
#![allow(unused)]
|
use ahab::{cli, scripts};
|
||||||
|
|
||||||
mod cli;
|
|
||||||
mod scripts;
|
|
||||||
|
|
||||||
use anyhow::Result;
|
use anyhow::Result;
|
||||||
use clap::Parser;
|
use clap::Parser;
|
||||||
use std::env;
|
|
||||||
|
|
||||||
fn main() -> Result<()> {
|
fn main() -> Result<()> {
|
||||||
// always load dotenv on start
|
// always load dotenv on start
|
||||||
|
|
Loading…
Reference in New Issue