Basic allocations in rust user-space.
This commit is contained in:
parent
40a50e8d00
commit
32ccbedb7a
7 changed files with 127 additions and 35 deletions
|
|
@ -1,14 +1,19 @@
|
|||
#![no_std]
|
||||
#![no_main]
|
||||
|
||||
use mammoth::debug;
|
||||
extern crate alloc;
|
||||
|
||||
use alloc::boxed::Box;
|
||||
use mammoth::define_entry;
|
||||
use mammoth::z_err_t;
|
||||
use mammoth::syscall::debug;
|
||||
use mammoth::syscall::z_err_t;
|
||||
|
||||
define_entry!();
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn main() -> z_err_t {
|
||||
debug("Testing!");
|
||||
let x = Box::new("Heap str");
|
||||
debug(&x);
|
||||
0
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue