ITADN

Is it possible to println from the kernel?

#346Closedmilewski 创建于 2025-12-23
M
milewskicommented
How to println from a kernel? the following code throws an error: ```rust cuda_std::println!("hello world"); ``` ``` error[E0433]: failed to resolve: could not find `alloc` in the list of imported crates --> src/lib.rs:12:9 | 12 | cuda_std::println!("hello world"); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ could not find `alloc` in the list of imported crates | = note: this error originates in the macro `$crate::print` which comes from the expansion of the macro `cuda_std::println` (in Nightly builds, run with -Z macro-backtrace for more info) ```
关闭于 2026-01-11 3 条评论