-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Fix various compilation errors for no-std in crates #9478
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
Comments
May I? |
assigned, usually the todos are using |
I went through all the crates running the command below:
and the following crates had compilation errors:
|
It seems that jsonrpsee-types doesn't support no_std. paritytech/jsonrpsee#1. so reth-rpc-types is tough |
I ran into that issue and was wondering how this would be approached. Would the approach be to make the use jsonrpsee_types::ErrorObject;
/// A trait to convert an error to an RPC error.
pub trait ToRpcError: std::error::Error + Send + Sync + 'static {
/// Converts the error to a JSON-RPC error object.
fn to_rpc_error(&self) -> ErrorObject<'static>;
} I guess it depends on why we are returning an ErrorObject<'static>? Or could we implement our own version of ErrorObject that satisfies |
I think we can fix other crates. In my opinion, maybe need to let jsonrpsee-types support no_std. |
Maybe we need add crate reth-db reth/.github/assets/check_no_std.sh Lines 5 to 9 in c3347f3
|
Yeah that one is erroring for me, I must have missed it or something was updated that caused it to offend. In any case, I've added As more code is added to main there will likely be others until #9479 is closed. Let me know if you notice any others. I'm currently working on |
Thanks @martinezjorge . Right now I am working on reth-db. After finishing reth-db, I want to try other issues. |
Hello! I just want to point out, that it looks like that Documentation page does not point to the actual repo, which is https://github.com/Stupremee/thiserror and it hasn't been updated in 2 years, which is a little bit concerning. But most importantly, it does not work:
Considering that original author of thiserror is not keen on support of the no_std: dtolnay/thiserror#64 It might be a good time to reconsider how this is handled in reth. |
All of the crates pass |
@mattsse is there something I'm missing here? I'd be happy to keep working on it, just let me know |
marking this as complete tysm @martinezjorge |
Describe the feature
crates that are offending cargo c --no-default-features
TODO
extern crate alloc
etc
Additional context
No response
The text was updated successfully, but these errors were encountered: