feat: get full evaluation back online

Very hacky, but this is enough to be finished with the graph IR for now.
This commit is contained in:
multisn8 2024-01-21 04:21:33 +01:00
parent 3c529c3a1a
commit 3e208335c3
Signed by: multisamplednight
GPG key ID: 6D525AA147CBDAE2
9 changed files with 105 additions and 26 deletions

View file

@ -27,6 +27,8 @@ pub fn from_ron(source: &str) -> ron::error::SpannedResult<GraphIr> {
/// The toplevel representation of a whole pipeline.
///
/// # DAGs
///
/// Pipelines may not be fully linear. They may branch out and recombine later on.
/// As such, the representation for them which is currently used is a
/// [**D**irected **A**cyclic **G**raph](https://en.wikipedia.org/wiki/Directed_acyclic_graph).
@ -56,6 +58,27 @@ pub fn from_ron(source: &str) -> ron::error::SpannedResult<GraphIr> {
/// So the vertices of the DAG are the **sockets**
/// (which are either [`id::Input`] or [`id::Output`] depending on the direction),
/// and each **socket** in turn belongs to an **instruction**.
///
/// # Usage
///
/// - If you want to build one from scratch,
/// add a few helper methods like
/// constructing an empty one,
/// adding instructions and
/// adding edges
/// - If you want to construct one from an existing repr,
/// maybe you want to use [`semi_human::GraphIr`].
///
/// # Storing additional data
///
/// Chances are the graph IR seems somewhat fit to put metadata in it.
/// However, most likely you're interacting in context of some other system,
/// and also want to manage and index that data on your own.
///
/// As such, consider using _secondary_ maps instead.
/// That is, store in a data structure _you_ own a mapping
/// from [`id`]s
/// to whatever data you need.
#[derive(Clone, Debug, Default, PartialEq, Eq, Deserialize, Serialize)]
pub struct GraphIr {
/// "Backbone" storage of all **instruction** IDs to