compiler with dist

This commit is contained in:
Nilton Constantino
2026-01-21 06:50:57 +00:00
parent 1410a8ff19
commit b7425e5a20
25 changed files with 370 additions and 316 deletions
+7 -15
View File
@@ -11,16 +11,11 @@ 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 = "prometeu-compiler"
# path = "../prometeu-compiler/src/main.rs"
#
# [[bin]]
# name = "prometeup"
# path = "../prometeup/src/main.rs"
[[bin]]
name = "prometeuc"
path = "src/bin/prometeuc.rs"
[package.metadata.dist]
dist = true
@@ -31,9 +26,6 @@ include = [
[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
@@ -86,14 +86,16 @@ fn main() {
&["--debug", &cart, "--port", &port.to_string()],
);
}
Some(Commands::Build { .. }) => {
not_implemented("build", "prometeu-compiler");
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", "prometeu-compiler"),
VerifyCommands::C { project_dir } => {
dispatch(&exe_dir, "prometeuc", &["verify", &project_dir]);
}
VerifyCommands::P { .. } => not_implemented("verify p", "prometeup"),
},
None => {
@@ -119,8 +121,8 @@ 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-compiler" => "build/verify c",
"prometeu-runtime" => "run/debug",
"prometeuc" => "build/verify c",
"prometeup" => "pack/verify p",
_ => bin_name,
}, exe_dir.display()