Closed Nutomic closed 1 year ago
Remove rocksdb dependency feature which seems unused and is extremely slow to compile
RocksDB is needed, as it is our storage backend for the blockchain.
Switch to stable Rust
We will still need the nightly Rust too, as it is needed while compiling the WASM runtime, otherwise it will fail to compile and ask you to install the nightly Rust version with the right wasm target too.
Agree with @shekohex comment, the nightly should not be avoided, even though it might compile here it will create problems downstream. Imo we should benchmark the build time against a standard substrate node (https://github.com/substrate-developer-hub/substrate-node-template) i dont think we can get any faster than the template node.
Moving a lot of dependencies to dev-dependencies makes sense, and we should actually add this as a CI check too.
Okay im adding Rocksdb back in. Though this could be put behind a feature flag if there are use cases where it isnt needed.
About nightly, do you know why it should be used? Wasm build seems to work fine on stable. My guess is that a nightly feature was previously used, and then either stabilized or removed from the code.
About nightly, do you know why it should be used? Wasm build seems to work fine on stable. My guess is that a nightly feature was previously used, and then either stabilized or removed from the code.
It uses your currently nightly Rust version, for building the WASM runtime, See: https://docs.rs/substrate-wasm-builder/6.0.0/substrate_wasm_builder/#prerequisites
You are right, the build fails if nightly isnt installed. Reverted those changes.
Summary of changes Changes introduced in this pull request:
I didnt measure how much this speeds up compile time as that would take too long, but the difference should be very significant.
Reference issue to close (if applicable)
Closes