Is it possible to println from the kernel?
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 条评论