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

tendermint-proto uses std features in dependencies #981

Closed
Tracked by #1158
soareschen opened this issue Sep 17, 2021 · 1 comment
Closed
Tracked by #1158

tendermint-proto uses std features in dependencies #981

soareschen opened this issue Sep 17, 2021 · 1 comment
Labels
no_std no_std compatibility

Comments

@soareschen
Copy link
Contributor

soareschen commented Sep 17, 2021

This is part of no_std support at informalsystems/hermes#1158. Currently the tendermint-proto crate uses the features subtle-encoding/std and chrono/clock, which depend on std.

When the relevant features are disabled in #980, we would get compile errors like follows:

error[E0599]: no method named `format_with_items` found for reference `&DateTime<Utc>` in the current scope
  --> proto/src/serializers/timestamp.rs:82:20
   |
82 |     let prefix = t.format_with_items(PREFIX.iter());
   |                    ^^^^^^^^^^^^^^^^^ method not found in `&DateTime<Utc>`

error[E0425]: cannot find function `decode_upper` in module `hex`                                                                                                            
  --> proto/src/serializers/bytes.rs:15:14                                                                                                                                   
   |                                                                                                                                                                         
15 |         hex::decode_upper(&string)                                                                                                                                      
   |              ^^^^^^^^^^^^ not found in `hex`                                                                                                                            
                                                                                                                                                                             
error[E0425]: cannot find function `decode` in module `hex`                                                                                                                  
  --> proto/src/serializers/bytes.rs:16:31                                                                                                                                   
   |                                                                                                                                                                         
16 |             .or_else(|_| hex::decode(&string))                                                                                                                          
   |                               ^^^^^^ not found in `hex`         
@soareschen soareschen added bug Something isn't working no_std no_std compatibility and removed bug Something isn't working labels Sep 17, 2021
@soareschen
Copy link
Contributor Author

This has now been fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no_std no_std compatibility
Projects
None yet
Development

No branches or pull requests

1 participant