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:
2026-01-21 10:55:47 +00:00
co-authored by Nilton Constantino
parent 73353d864d
commit 0e6da1433b
76 changed files with 2820 additions and 756 deletions
+9 -16
View File
@@ -11,29 +11,22 @@ path = "src/main.rs"
[[bin]]
name = "prometeu-runtime"
path = "../prometeu-runtime-desktop/src/main.rs"
path = "src/bin/prometeu-runtime.rs"
# Future binaries (commented)
# [[bin]]
# name = "prometeuc"
# path = "../prometeuc/src/main.rs"
#
# [[bin]]
# name = "prometeup"
# path = "../prometeup/src/main.rs"
[[bin]]
name = "prometeuc"
path = "src/bin/prometeuc.rs"
[package.metadata.dist]
dist = true
include = [
"../../VERSION.txt",
"../../dist-staging/devtools-protocol"
"../../dist-staging/devtools/debugger-protocol",
"../../dist-staging/devtools/typescript-sdk"
]
[dependencies]
clap = { version = "4.5", features = ["derive"] }
prometeu-core = { path = "../prometeu-core" }
winit = "0.30.12"
pixels = "0.15.0"
cpal = "0.15.3"
ringbuf = "0.4.7"
serde_json = "1.0"
prometeu-runtime-desktop = { path = "../prometeu-runtime-desktop" }
prometeu-compiler = { path = "../prometeu-compiler" }
anyhow = "1.0.100"
+3 -1
View File
@@ -6,8 +6,10 @@ The `prometeu` binary acts as the unified front-end for the ecosystem. It does n
- `prometeu run <cart>`: Runs a cartridge using the available runtime.
- `prometeu debug <cart> [--port <p>]`: Starts execution in debug mode.
- `prometeu build <projectDir>`: (Planned) Calls the `prometeuc` compiler.
- `prometeu build <projectDir>`: Calls the `prometeuc` compiler.
- `prometeu verify c <projectDir>`: Calls the `prometeuc` compiler.
- `prometeu pack <cartDir>`: (Planned) Calls the `prometeup` packager.
- `prometeu verify p <cartDir>`: (Planned) Calls the `prometeup` packager.
## How it works
@@ -0,0 +1 @@
fn main() -> Result<(), Box<dyn std::error::Error>> { prometeu_runtime_desktop::run() }
+1
View File
@@ -0,0 +1 @@
fn main() -> anyhow::Result<()> { prometeu_compiler::run() }
+7 -5
View File
@@ -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,