rename rust.cc -> runtime.cc
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user