substrate
substrate copied to clipboard
feat: `FRAME` umbrella crate.
This brings in a new crate that is a mere re-export of common FRAME APIs into a new crate, and re-exports them, with better documentation.
This is WIP experiment. My initial goal is to build https://github.com/paritytech/polkadot-sdk-docs/issues/3 using only this crate.
Whether it would be feasible to actually build things with it, I am not sure. Consider this an experiment for now. As a next step, I can re-build node-template/pallets
using this crate.
An end-goal is something along the lines of:
-
frame = { version = "X" }
is the umbrella crate with which you should be a frame pallet -
frame = { version = "X", feature = "runtime" }
is the umbrella crate to build a frame-based runtime. - Of course, for certain deep functionality, you can tap into things like
sp_io
andsp_core
directly. - With that, your runtime's dependency would be:
- a list of frame pallets, each built with a specific version of
frame
. -
frame
itself, with a matching version.
- a list of frame pallets, each built with a specific version of
-
substrate-node
should be the umbrella crate for all thingssc-*
related. -
parachain-sdk
orcumulus
(name tbd) should be the umbrella crate for turning both of the above into a parachain PVF and Collator, as opposed to a normal runtime and node respectively.
You can see an example pallet built with this method here, and an example runtime here.
- [ ] blocker: https://github.com/paritytech/polkadot-sdk/issues/173
- [x] blocker: https://github.com/paritytech/substrate/issues/14145
- [ ] I am open to a different name, perhaps
frame-api
?