scs / substrate-api-client

Library for connecting to substrate API over WebSockets
Apache License 2.0
261 stars 124 forks source link

Remove `error_in_core` feature #799

Closed haerdib closed 1 month ago

haerdib commented 2 months ago

Error should now be implemented fully in core, so there should be no need for this feature anymore.

Related issue: https://github.com/rust-lang/rust/issues/103765

Niederb commented 2 months ago

If I remember correctly this is the last feature that prevents us from switching to a stable Rust version. So we could try switching to stable.

haerdib commented 2 months ago

Good idea, feature will be stabilized in 2 days (on the 5th September). So let's wait until then and see if we can use the stable toolchain.

haerdib commented 1 month ago

Switchin to stable is currently not possible (or requires quite some effort) because of our no_std check. There, we require the following features:

#![feature(start, libc, lang_items)]
#![feature(alloc_error_handler)]

At least for the alloc_error_handler there does not seem to be an easy alternative: https://github.com/rust-lang/rust/issues/51540

I did a quick research to see if there's a better alternative for no_stds check but I didn't really find one. cargo-nono did not install with cargo install cargo-nono and it was updated last 4 years ago, it doesn't really seem a good alternative.

So I think it's currenlty not worth it to switch to stable.

masapr commented 1 month ago

So we should move the feature to the icebox?

haerdib commented 1 month ago

No, the error_in_core feature can still be removed. Only the switch to stable toolchain is not easily possible. PR https://github.com/scs/substrate-api-client/pull/803 will close this issue.