Skip to content
This repository has been archived by the owner on Mar 20, 2023. It is now read-only.

async-coap-uri: no_std implementation is broken #26

Open
Luro02 opened this issue Apr 3, 2020 · 1 comment
Open

async-coap-uri: no_std implementation is broken #26

Luro02 opened this issue Apr 3, 2020 · 1 comment
Labels
cleanup enhancement New feature or request P2 Priority 2 task

Comments

@Luro02
Copy link
Contributor

Luro02 commented Apr 3, 2020

The crate provides the following features:

[features]
default = ["std"]
std = ["alloc"]
alloc = []

by default std is enabled, which works as expected.

To test the features I simply ran the tests of async-coap-uri with the below commands.

To disable all default features one could try the following command (this would be true no_std without any allocator):

cargo test --no-default-features

which fails (with lots of errors).

Enabling only the alloc-feature also fails

cargo test --no-default-features --features alloc
@darconeous
Copy link
Contributor

Yep, this is a bug. Architecturally, rust-async-coap is designed to eventually allow for use in no_std mode without even alloc. However, getting things to work without alloc is going to require generic associated types to land, so I didn't bother too much with it other than to make sure that architecturally it wasn't precluded from being introduced later.

However, there is no good reason for not supporting no_std with alloc right now. Getting that implemented would be a good step toward reaching that eventual goal once GAT lands.

@darconeous darconeous added cleanup enhancement New feature or request P2 Priority 2 task labels Apr 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cleanup enhancement New feature or request P2 Priority 2 task
Projects
None yet
Development

No branches or pull requests

2 participants