chore: switch to a mono repo
This commit is contained in:
11
crates/cli/Cargo.toml
Normal file
11
crates/cli/Cargo.toml
Normal file
@@ -0,0 +1,11 @@
|
||||
[package]
|
||||
name = "neptune"
|
||||
version = "0.0.0"
|
||||
edition = "2021"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
anyhow = "1.0.57"
|
||||
clap = { version = "3.1.14", features = ["derive"] }
|
||||
uplc = { path = '../uplc' }
|
||||
14
crates/cli/src/lib.rs
Normal file
14
crates/cli/src/lib.rs
Normal file
@@ -0,0 +1,14 @@
|
||||
use std::path::PathBuf;
|
||||
|
||||
use clap::Parser;
|
||||
|
||||
#[derive(Parser)]
|
||||
pub struct Cli {
|
||||
pub input: PathBuf,
|
||||
}
|
||||
|
||||
impl Default for Cli {
|
||||
fn default() -> Self {
|
||||
Self::parse()
|
||||
}
|
||||
}
|
||||
15
crates/cli/src/main.rs
Normal file
15
crates/cli/src/main.rs
Normal file
@@ -0,0 +1,15 @@
|
||||
use uplc::parser;
|
||||
|
||||
use neptune::Cli;
|
||||
|
||||
fn main() -> anyhow::Result<()> {
|
||||
let args = Cli::default();
|
||||
|
||||
let code = std::fs::read_to_string(&args.input)?;
|
||||
|
||||
let program = parser::program(&code)?;
|
||||
|
||||
println!("{:#?}", program);
|
||||
|
||||
Ok(())
|
||||
}
|
||||
Reference in New Issue
Block a user