polkadot-parachain: compile separate lib and bin
Fixes https://github.com/paritytech/polkadot-sdk/issues/5210
The CI pipeline was cancelled due to failure one of the required jobs. Job name: check-tracing Logs: https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/6968216
I am trying this at https://github.com/AcalaNetwork/acala-node
The exposed API is easy enough.
The main issue I have is about deps. I shouldn't fine any runtime in Cargo.lock file. Ideally, it shouldn't contain any pallets and frame crates.
And maybe related to I am using a fork, many polkadot-sdk creates are pulled twice such as sp-std due to deps to creates at paritytech/arkworks-substrate
you will need the build.rs file in the bin, not in the lib
Done
The main issue I have is about deps. I shouldn't fine any runtime in Cargo.lock file. Ideally, it shouldn't contain any pallets and frame crates.
Removed the rococo-native and westend-native. From what I see the pallets and frame crates are needed just for accessing some runtime APIs. We can move those runtime APIs definitions to primitives, but I would prefer to do it in a separate PR since this one is pretty verbose already.
And maybe related to I am using a fork, many polkadot-sdk creates are pulled twice such as
sp-stddue to deps to creates at paritytech/arkworks-substrate
I guess this is normal since probably both versions are needed.