polkadot-sdk icon indicating copy to clipboard operation
polkadot-sdk copied to clipboard

polkadot-parachain: compile separate lib and bin

Open serban300 opened this issue 1 year ago • 4 comments

Fixes https://github.com/paritytech/polkadot-sdk/issues/5210

serban300 avatar Aug 08 '24 14:08 serban300

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

paritytech-cicd-pr avatar Aug 12 '24 11:08 paritytech-cicd-pr

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

xlc avatar Aug 13 '24 23:08 xlc

you will need the build.rs file in the bin, not in the lib

Done

serban300 avatar Aug 14 '24 11:08 serban300

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-std due to deps to creates at paritytech/arkworks-substrate

I guess this is normal since probably both versions are needed.

serban300 avatar Aug 14 '24 11:08 serban300