---
# System prepended metadata

title: New `contruct_rutnime` idea

---

# New `contruct_rutnime` idea

```
#[frame::contruct_rutnime]
mod runtime {
    // The rest, like `AllPalletsReserved` and such have to be 
    // unfortunately aut-generated, or better, deprecated. 
    #[frame::pallets] 
    type AllPallets = (
        frame_system::pallet, 
        pallet_balances::pallet, 
        pallet_staking::pallet,
        pallet_sessin::pallet,
    );
        
        
    // don't think there is much to this. 
    #[frame::runtime]
    pub struct Runtime; 
        
    // Auto-generate call from `AllPallets`
    #[frame::call]
    pub enum RuntimeCall = ..AllPallets;
        
    // Alternative to the speard syntax above: Explicitely build an enum with the given 
    // pallet paths. 
    //
    // This is very dangerous, only for experts. Probably no real use case for it either..
    #[frame::event]
    pub enum RuntimeEvent = (frame_system, pallet_staking);
    
    #[frame::origin]
    pub enum Origin = ..AllPallets
}
pub use runtime::{Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin};
```
        