Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add support for #![no_std] environments #36

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

matteopolak
Copy link

Let me know if this interests you, feel free to close if not :)

Description

I was looking to use this crate with #![no_std] but it was not supported. I took a quick look at what it's doing and it doesn't look like it needs std at all - just core and alloc.

However this would bump the MSRV to 1.81.0 for core::error::Error so I created a new default feature std so this change is only opt-in (unless someone is using default-features = false already).

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • successful cargo check --target x86_64-unknown-none (also added to CI)

Environment (please complete the following information):

  • Platform: Linux mat 6.9.3-76060903-generic #202405300957~1732141768~22.04~f2697e1 SMP PREEMPT_DYNAMIC Wed N x86_64 x86_64 x86_64 GNU/Linux
  • Rust
rustc 1.85.0-nightly (4363f9b6f 2025-01-02)
binary: rustc
commit-hash: 4363f9b6f6d3656d94adbcabba6348a485ef9a56
commit-date: 2025-01-02
host: x86_64-unknown-linux-gnu
release: 1.85.0-nightly
LLVM version: 19.1.6
  • Cargo
cargo 1.85.0-nightly (d73d2caf9 2024-12-31)
release: 1.85.0-nightly
commit-hash: d73d2caf9e41a39daf2a8d6ce60ec80bf354d2a7
commit-date: 2024-12-31
host: x86_64-unknown-linux-gnu
libgit2: 1.8.1 (sys:0.19.0 vendored)
libcurl: 8.9.0-DEV (sys:0.4.74+curl-8.9.0 vendored ssl:OpenSSL/1.1.1w)
ssl: OpenSSL 1.1.1w  11 Sep 2023
os: Pop!_OS 22.4.0 (jammy) [64-bit]

Checklist:

  • My code follows the style guidelines of this project (e.g. run cargo fmt)
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • My changes DO NOT require unstable features without prior agreement
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

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.

1 participant