Rust has many useful abstractions and utils that require heap allocations.
Box are some of them. To be able to use them, we need to allocate memory at runtime, which requires a custom allocator.
Add the following to your code to define new global allocator:
use kernel_alloc::KernelAlloc; #[global_allocator] static GLOBAL: KernelAlloc = KernelAlloc;