-
Notifications
You must be signed in to change notification settings - Fork 82
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
Enable std #530
base: develop
Are you sure you want to change the base?
Enable std #530
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Theres a bit more to be done. I wouldn't add it as a feature.Just make it only std.
These need to be removed under features in each Cargo.toml:
std = ["borsh/std", "evm/std", "primitive-types/std", "rlp/std", "sha3/std", "ethabi/std", "logos/std", "bn/std", "aurora-engine-types/std", "rjson/std", "aurora-engine-precompiles/std", "aurora-engine-transactions/std"]
Also, any dependency that has default-features = false
needs to be removed as we won't be going back to no_std
.
Task linked: CU-2e6u98n |
Please resolve conflicts and squash. |
d3a1ac6
to
f1c4810
Compare
Enable
std
By introducing this compilation option (feature), we are able to include the standard rust library.
Measured binary size (release):
std
: 1018479std
: 1016468 (-2%)Exclusions
Not all dependencies turn off as
no-defaults
. For some reason, it is several crates that compilation success but unit tests failed.Reason
There are some dependencies we use which we had to fork and make non-std. The problem is that we need to be active and update these libraries with upstream. Critical issues on these upstream libraries may not easily notify us of any issues, and we may be left with a critical bug for some time.
The second issue is that we can be limited in the dependencies that we want to use. At times, a task which should take a day could take a week at times, for example.
Reverting to std will increase gas usage slightly, but will make the engine more maintainable.