rename rust.cc -> runtime.cc

This commit is contained in:
2025-07-11 15:45:00 -04:00
parent 8ecf2fbd96
commit b6440e6f74
+27
View File
@@ -0,0 +1,27 @@
//! The RustPP runtime
#include "panic.hh"
#define I_AM_RUSTPP_RUNTIME
#include <print>
#include "rust.hh"
namespace {
slice::Slice<Cstr> program_args = {};
}
fn main (int argc, char **argv) -> int {
program_args = { (Cstr *) argv, (usize) argc };
try {
return rustpp__main ();
} catch (panic::Panic p) {
std::println ("Thread exited with explicit panic: {}", p.what ());
}
}
// Environment
namespace env {
fn args () -> slice::Slice<Cstr> {
return program_args;
}
} // namespace env