zksync_node_framework/lib.rs
1//! # ZK Stack node initialization framework.
2//!
3//! This crate provides core abstractions that allow one to compose a ZK Stack node.
4//! Main concepts used in this crate are:
5//! - [`WiringLayer`](wiring_layer::WiringLayer) - builder interface for tasks.
6//! - [`Task`](task::Task) - a unit of work that can be executed by the node.
7//! - [`Resource`](resource::Resource) - a piece of logic that can be shared between tasks. Most resources are
8//! represented by generic interfaces and also serve as points of customization for tasks.
9//! - [`ZkStackService`](service::ZkStackService) - a container for tasks and resources that takes care of initialization, running
10//! and shutting down.
11//! - [`ZkStackServiceBuilder`](service::ZkStackServiceBuilder) - a builder for the service.
12
13pub mod implementations;
14pub mod resource;
15pub mod service;
16pub mod task;
17pub mod wiring_layer;
18
19/// Derive macro for the `FromContext` trait.
20pub use zksync_node_framework_derive::FromContext;
21/// Derive macro for the `IntoContext` trait.
22pub use zksync_node_framework_derive::IntoContext;
23
24pub use self::{
25 resource::Resource,
26 service::{FromContext, IntoContext, StopReceiver},
27 task::{Task, TaskId},
28 wiring_layer::{WiringError, WiringLayer},
29};