dev/prometeuc-improvements (#5)
Co-authored-by: Nilton Constantino <nilton.constantino@visma.com> Reviewed-on: #5
This commit was merged in pull request #5.
This commit is contained in:
@@ -0,0 +1 @@
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> { prometeu_runtime_desktop::run() }
|
||||
@@ -0,0 +1 @@
|
||||
fn main() -> anyhow::Result<()> { prometeu_compiler::run() }
|
||||
@@ -8,7 +8,7 @@ use std::process::Command;
|
||||
/// The main entry point for the user. This binary does not implement
|
||||
/// compilation or execution logic itself; instead, it acts as a smart
|
||||
/// front-end that locates and dispatches commands to specialized
|
||||
/// components like `prometeu-runtime-desktop` or `prometeuc`.
|
||||
/// components like `prometeu-runtime-desktop` or `prometeu-compiler`.
|
||||
#[derive(Parser)]
|
||||
#[command(name = "prometeu")]
|
||||
#[command(about = "Dispatcher for the Prometeu ecosystem", long_about = None)]
|
||||
@@ -86,14 +86,16 @@ fn main() {
|
||||
&["--debug", &cart, "--port", &port.to_string()],
|
||||
);
|
||||
}
|
||||
Some(Commands::Build { .. }) => {
|
||||
not_implemented("build", "prometeuc");
|
||||
Some(Commands::Build { project_dir }) => {
|
||||
dispatch(&exe_dir, "prometeuc", &["build", &project_dir]);
|
||||
}
|
||||
Some(Commands::Pack { .. }) => {
|
||||
not_implemented("pack", "prometeup");
|
||||
}
|
||||
Some(Commands::Verify { target }) => match target {
|
||||
VerifyCommands::C { .. } => not_implemented("verify c", "prometeuc"),
|
||||
VerifyCommands::C { project_dir } => {
|
||||
dispatch(&exe_dir, "prometeuc", &["verify", &project_dir]);
|
||||
}
|
||||
VerifyCommands::P { .. } => not_implemented("verify p", "prometeup"),
|
||||
},
|
||||
None => {
|
||||
@@ -119,7 +121,7 @@ fn dispatch(exe_dir: &Path, bin_name: &str, args: &[&str]) {
|
||||
eprintln!(
|
||||
"prometeu: command '{}' is not yet available in this distribution on {}",
|
||||
match bin_name {
|
||||
"prometeu-runtime-desktop" => "run/debug",
|
||||
"prometeu-runtime" => "run/debug",
|
||||
"prometeuc" => "build/verify c",
|
||||
"prometeup" => "pack/verify p",
|
||||
_ => bin_name,
|
||||
|
||||
Reference in New Issue
Block a user