This commit is contained in:
nora 2023-09-30 10:25:23 +02:00
parent de90913d46
commit 54e0e7604e
23 changed files with 77 additions and 33 deletions

View file

@ -2,6 +2,13 @@
# It is not intended for manual editing.
version = 3
[[package]]
name = "c"
version = "0.1.0"
dependencies = [
"libuwuc",
]
[[package]]
name = "cfg-if"
version = "1.0.0"
@ -12,6 +19,7 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
name = "example-user"
version = "0.1.0"
dependencies = [
"c",
"libuwuc",
]

View file

@ -14,4 +14,5 @@ panic = "abort"
panic = "abort"
[dependencies]
libuwuc = { path = "..", features = ["export_symbols"] }
c = { path = "../c" }
libuwuc = { path = "../libuwuc" }

View file

@ -6,7 +6,7 @@ use core::ffi::c_char;
use libuwuc::{println, utils::SharedThinCstr};
extern crate libuwuc;
extern crate c;
#[panic_handler]
#[cfg(not(test))]
@ -27,11 +27,3 @@ extern "C" fn main(_argc: i32, _argv: *const *const c_char) -> i32 {
println!("PWD={pwd:?}");
0
}
// libcore seems to require this symbol, even though it's unused.
#[no_mangle]
fn rust_eh_personality() {
unsafe {
libuwuc::trap!();
}
}