Skip to content

Replace uses of std with core and alloc - #50

Merged
adamreichold merged 2 commits into
rust-scraper:masterfrom
reed-smout:no_std
Jul 16, 2026
Merged

adamreichold merged 2 commits into
rust-scraper:masterfrom
reed-smout:no_std

Conversation

@reed-smout

Copy link
Copy Markdown
Contributor

Kia ora!

Just a small PR to allow using this crate in no_std contexts!

There aren't any uses of std beyond structures already exposed in alloc, so it's a pretty trivial patch.

I've mainly changed import uses, but also a couple of fully qualified paths where they exist. I also added no-std as a keyword/category in Cargo.toml and the README to advertise this feature a bit more as it can be hard to tell at a glance if a crate uses std or not. Let me know if you'd prefer any changes to my approach, happy to tweak things :)

Thanks for the great crate!

Comment thread src/lib.rs Resolved
Comment thread README.md Resolved
Comment thread Cargo.toml Resolved
@reed-smout

Copy link
Copy Markdown
Contributor Author

I've updated this with some modifications as requested and an additional CI job building on thumbv7m. I also fixed the serde integration too that I'd initially overlooked (the CI should catch this in future as it builds with --all-features).

Comment thread Cargo.toml Resolved
Comment thread .github/workflows/test.yml Resolved
@adamreichold

Copy link
Copy Markdown
Member

Triggered the CI to test it. One more nit, one more change. Almost there!

@reed-smout

Copy link
Copy Markdown
Contributor Author

Awesome, another couple changes to address your comments. Let me know if there's anything else you'd like me to tweak!

@adamreichold adamreichold left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thank you for your contribution!

@adamreichold
adamreichold merged commit 8f9f786 into rust-scraper:master Jul 16, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants