Comments (4)
Since the cross compilation doesn't work, to get the binary substrate in ARM, the workaround is to get WASM blobs in x86 platform. Then copy WASM blobs into ARM platform and complete compilation there.
I got substrate binary in AWS a1. The detail process as following:
-
to get WASM blobs, compile substrate in x86 environment at first.
1.1 clone source code
git clone https://github.com/paritytech/substrate
1.2 compile substrate, for reference:
https://github.com/paritytech/substrate#hacking-on-substrate
1.3 because of a bug for rust compiler, use nightly 2019-10-13
rustup install nightly-2019-10-13
cargo +nightly-2019-10-13 install --release -
switch to ARM platform then compile substrate
2.1 clone source code
git clone https://github.com/paritytech/substrate
2.2 skip WASM compilation via setting
export SKIP_WASM_BUILD='true'
2.3 compile substrate, for reference:
https://github.com/paritytech/substrate#hacking-on-substrate
2.4 because of a bug for rust compiler, use nightly 2019-10-13
rustup install nightly-2019-10-13
cargo +nightly-2019-10-13 install --release
2.5 until compilation stopped, there is a message about wasm_binary.rs file missing. copy the file path and edit it.
vi target/release/build/node-runtime-XXXXXXXXXX/wasm_binary.rs
2.6 adding two lines of code. the content should be changed according to your compilation path.
pub const WASM_BINARY: &[u8] = include_bytes!("/home/ubuntu/code/paritytech/substrate/target/release/wbuild/node-runtime/node_runtime.compact.wasm");
pub const WASM_BINARY_BLOATY: &[u8] = include_bytes!("/home/ubuntu/code/paritytech/substrate/target/release/wbuild/target/wasm32-unknown-unknown/release/node_runtime.wasm");
2.7 copy target/release/wbuild folder from x86 to target/release/wbuild
scp ...........
2.8 continue building
cargo +nightly-2019-10-13 install --release
2.9 end of building, get the binary successfully.
from hacktoberfest.
I'd like to work on the issue and it is from real business requirement.
from hacktoberfest.
great, @juniuszhou , it's all yours. Let us know (best via chat or as a comment here), if there is anything you need from us or anything we can help with.
from hacktoberfest.
Nice! I'm glad to see that it worked :)
Just a reminder from our conversation.
I would like to suggest to keep it in the issue but clean your comment. Create a nice markdown format and general instructions.
It will also help if you add more details about thewasm_binary.rs
file/paths.
from hacktoberfest.
Related Issues (20)
- [Runtime Extension] Redis-Style Data Storage & Commands
- [PoC] co-signing offchain-workers
- [Runtime Module] Name Registry HOT 2
- [Tooling] Cross-Compiler
- [Runtime Module] Quadratic Coinvoting Democracy HOT 12
- [Runtime Module] Decentralized Prediction Market
- [PoC] < 1 Sec Blocks Blockchain with Substrate
- [Runtime Module Extension] Object Permission Control HOT 4
- UI for rapidly starting Substrate project by composing SRML modules HOT 3
- [PoC] Decentralized Identity SideTree protocol implementation on Substrate HOT 1
- Translate the documents in Substrate developer hub HOT 9
- Detection of cargo-web during compilation. HOT 1
- [Tooling] Submitting custom runtime extrinsics with rust via JSON-RPC HOT 2
- [ecosystem] `no_std` libraries! HOT 2
- [Consensus] Implement Grin's Cuckoo Cycle proof of work on substrate
- [Runtime Module] Confidential Transactions / Private Balances Module
- [PoC] PoW Wasm Contracts Chain HOT 1
- [Runtime Module] Oracle for cryptocurrency real-time value HOT 1
- [Runtime Module] SRML-based Substrate node for ERC-721 Non-Fungible Token Standard implementation
- Should This Repository Be Archived? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hacktoberfest.