Skip to content

Does not work in no-std environment #262

@koxu1996

Description

@koxu1996

I am unable to compile my project due to found duplicate lang item panic_impl, which appears to be caused by std library being indirectly included by rasn 😨. Even though this library is claimed as no_std its dependencies are not!

Where std gets included?

Latest rasn v0.8.2 depends on custom nom parser with bitvec:

nom-bitvec = { package = "bitvec-nom2", version = "0.2.0" }

This need to be discussed. Why is it custom? Probably because upstream is not supporting bitvec v1 - see rust-bakery/nom-bitvec#1, and relevant PR got stuck. It seems that @XAMPPRocky released fork as renamed package with tag 0.2.0. The different between fork source code and files published in crates.io made my investigation more difficult.

Okay, so let's use crates.io as the source of truth. You can see that bitvec-nom2 depends on bitvec v1:

image

Default features are not disabled, so std gets included:

image

NOTE: I was able to track it down with cargo tree -e features.

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is neededkind/bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions