Skip to content

Recommendation around panic-handler and use of default-members #214

@thomaseizinger

Description

@thomaseizinger

Instead of using default-members, I opted for the following in my eBPF code:

#[cfg(target_arch = "bpf")]
extern crate panic_halt; // Defines a no-op panic handler (we always compile with `immediate_abort` anyway).

This allows me to just run cargo check in my workspace without the compiler barking at me that I am defining two panic handlers (as the std one is part of the dependency tree via the shared crate and its optional std dependency).

This also means rust-analyzer runs cargo check for this crate as well and provides its lint output.

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