Skip to content

nom-language enables std feature in nom #1862

Description

@0b10011

nom-language includes nom as a dependency using default features:

nom = { path = "..", version = "8.0.0" }

That ends up enabling std:

nom/Cargo.toml

Lines 31 to 34 in 51c3c4e

[features]
alloc = []
std = ["alloc", "memchr/std"]
default = ["std"]

Reproduction

Cargo.toml:

[package]
name = "nom-std-bug"
version = "0.1.0"
edition = "2024"

[dependencies]
nom = { version = "8.0.0", default-features = false }
nom-language = "0.1.0"

src/main.rs:

#![no_std]
#![no_main]

use core::panic::PanicInfo;

#[panic_handler]
fn panic(_panic_info: &PanicInfo) -> ! {
    loop {}
}
cargo build --target x86_64-unknown-none

The build should succeed, but does not. (It does without nom-language added.)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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