protoflow 0.4.3

Protoflow implements flow-based programming (FBP) for Rust using Protocol Buffers messages.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// This is free and unencumbered software released into the public domain.

use crate::exit::ExitCode;
use protoflow_syntax::{Code, SystemParser};
use std::path::PathBuf;

pub fn generate(path: PathBuf) -> Result<(), ExitCode> {
    let mut parser = SystemParser::from_file(path)?;
    let model = parser.check()?;
    let code = Code::try_from(model)?;
    std::print!("{}", code.unparse());
    Ok(())
}

#[derive(Clone, Debug)]
pub enum GenerateError {}