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

Implemented no_std support (with/without alloc) #27

Merged
merged 22 commits into from
Dec 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
5cb24b6
Added new "std" and "alloc" crate features to Cargo.toml
JRRudy1 Dec 9, 2024
c26528d
Split the stdlib `Transient` impls into submodules by their dependenc…
JRRudy1 Dec 9, 2024
36bb1ed
Changed `PhantomData` import source from `std` to `core`.
JRRudy1 Dec 9, 2024
bd96388
Changed `std` imports to `core` where possible, and added `std`/`allo…
JRRudy1 Dec 9, 2024
b77c3d7
Updated tests for `no_std` support.
JRRudy1 Dec 9, 2024
ba4656e
Added `no_std` crate attribute gated by the "std" feature, and `exter…
JRRudy1 Dec 9, 2024
ee7ecec
Added CI matrix dimension for the set of crate features to enable dur…
JRRudy1 Dec 9, 2024
375feab
Removed the "--all" arg from the CI build step to avoid building the …
JRRudy1 Dec 10, 2024
586f6b3
Added the "std" feature as a dependency of the "derive" feature.
JRRudy1 Dec 10, 2024
b282ee2
Added feature-gates to several doctests to avoid errors when running …
JRRudy1 Dec 10, 2024
8eb3109
rustfmt
JRRudy1 Dec 10, 2024
16b26d5
Updated the `Transient` impl for `AddrParseError` to require the "std…
JRRudy1 Dec 10, 2024
04d8b41
Reordered test args in CI workflow for better display on Github.
JRRudy1 Dec 10, 2024
afe37c9
Formatting fix
JRRudy1 Dec 10, 2024
270f8a3
Simplified conditional imports by resolving them once in a facade mod…
JRRudy1 Dec 10, 2024
b0449ff
Fixed missing feature gate and added no_std support to the crate docu…
JRRudy1 Dec 10, 2024
2c30e93
Fixed ambiguous import by adding an explicit `::` prefix.
JRRudy1 Dec 10, 2024
5115d06
Remove wrangling since `std` types are just re-exports of `core` and …
the10thWiz Dec 10, 2024
f6d783e
Fix remaining uses in tests
the10thWiz Dec 10, 2024
4f90c2a
Fix formatting
the10thWiz Dec 10, 2024
3e1c348
Cleanup
JRRudy1 Dec 10, 2024
874c921
Removed the "std" feature as a dependency of the "derive" feature.
JRRudy1 Dec 13, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ jobs:
- stable
- beta
- nightly
features:
- --no-default-features
- --features alloc --no-default-features
- --features default
- --all-features
steps:
- name: Checkout sources
uses: actions/checkout@v2
Expand All @@ -30,13 +35,13 @@ jobs:
uses: actions-rs/cargo@v1
with:
command: build
args: --all --all-features
args: ${{ matrix.features }}

- name: Test
uses: actions-rs/cargo@v1
with:
command: test
args: --all-features
args: ${{ matrix.features }}

- name: Lint
uses: actions-rs/cargo@v1
Expand Down
11 changes: 10 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,16 @@ rmp-serde = { version = ">=1", default-features = false, optional = true }
trybuild = { version = "1.0", features = ["diff"] }

[features]
default = ["derive"]
default = ["std", "derive"]

# Provide impls for common standard library types like Vec<T> and HashMap<K, V>.
# Requires a dependency on the Rust standard library.
std = ["alloc"]

# Provide impls for types in the Rust core allocation and collections library
# including String, Box<T>, Vec<T>, and Cow<T>. This is a subset of std but may
# be enabled without depending on all of std.
alloc = []

# Provides a `derive` macro for implementing the `Transient` trait
derive = ["transient-derive"]
Expand Down
Loading
Loading