Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

no_std support is broken with serde feature enabled #112

Copy link
Copy link
@aleasims

Description

@aleasims
Issue body actions

First, thanks for the crate, it was pretty useful for me.

ascii depends on serde with enabled default features (including serde/std). Which means that when building with --no-default-features -F serde, the std is actually required.

Looks like it can be fixed by disabling serde default features. Here is the Cargo.toml patch:

diff --git a/Cargo.toml b/Cargo.toml
index 8ec25de..4aaeea3 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -9,12 +9,12 @@ repository = "https://github.com/tomprogrammer/rust-ascii"
 version = "1.1.0"

 [dependencies]
-serde = { version = "1.0.25", optional = true }
+serde = { version = "1.0.25", optional = true, default-features = false }
 serde_test = { version = "1.0", optional = true }

 [features]
 default = ["std"]
-std = ["alloc"]
+std = ["alloc", "serde?/std"]
 alloc = []

 [[test]]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.