iotaledger / common-rs

Apache License 2.0
4 stars 4 forks source link

Packable doesn't support #[no_std] #62

Open Angelo13C opened 1 year ago

Angelo13C commented 1 year ago

Bug description

The packable crate does not support #[no_std] environments.

Rust version

Version

Hardware specification

Steps To reproduce the bug

Simply have a dependency on this crate in a binary with #[no_std] at the top of the main.rs file

Expected behaviour

Compile in #[no_std]

Actual behaviour

It doesn't compile

Errors

Compiling packable v0.7.0 error[E0463]: can't find crate for alloc --> C:\Users\Something.cargo\registry\src\github.com-1ecc6299db9ec823\packable-0.7.0\src\packable\mod.rs:6:1 | 6 | extern crate alloc; | ^^^^^^^^^^^^^^^^^^^ can't find crate

error[E0463]: can't find crate for alloc --> C:\Users\Something.cargo\registry\src\github.com-1ecc6299db9ec823\packable-0.7.0\src\packable\prefix\boxed.rs:4:1 | 4 | extern crate alloc; | ^^^^^^^^^^^^^^^^^^^ can't find crate

error[E0463]: can't find crate for alloc --> C:\Users\Something.cargo\registry\src\github.com-1ecc6299db9ec823\packable-0.7.0\src\packable\prefix\string.rs:4:1 | 4 | extern crate alloc; | ^^^^^^^^^^^^^^^^^^^ can't find crate

error[E0463]: can't find crate for alloc --> C:\Users\Something.cargo\registry\src\github.com-1ecc6299db9ec823\packable-0.7.0\src\packable\prefix\vec.rs:4:1 | 4 | extern crate alloc; | ^^^^^^^^^^^^^^^^^^^ can't find crate

// And a lot more of these errors

thibault-martinez commented 9 months ago

Hello, thanks for the report, this should be fixed by https://github.com/iotaledger/common-rs/pull/76