Skip to content

Is it possible to println from the kernel? #346

@milewski

Description

@milewski

How to println from a kernel? the following code throws an error:

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions