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

Std in derive #284

Open
iupii opened this issue Aug 6, 2021 · 4 comments
Open

Std in derive #284

iupii opened this issue Aug 6, 2021 · 4 comments

Comments

@iupii
Copy link

iupii commented Aug 6, 2021

I can't build parity-scale-codec with derive because it uses std there.
As I can see there are only

use std::str::FromStr;
use std::str::from_utf8;

Both available in core.

@iupii
Copy link
Author

iupii commented Aug 6, 2021

I have to use it with no_std, but now it's impossible.

@bkchr
Copy link
Member

bkchr commented Aug 6, 2021

The derive macro is allowed to use std, it is always compiled for the host. Not sure what your problem is.

@garrettmaring
Copy link

I was also expecting this to be non-std (#285). Is there a way to compile parity-scale-codec with ink rc4. This was not a problem with rc3 and was possibly introduced by rc4s allocator (from reading that error message)

@bkchr
Copy link
Member

bkchr commented Aug 7, 2021

I repeat myself, parity-scale-derive is a proc-macro and they are always compiled for the host platform. They don't support no_std.

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

No branches or pull requests

3 participants