idl 0.1.1

Library used for the idl language.
Documentation
mod module {
    static IDL_FIRST: &str = r#"
library IdlTest;

enum Enumeration {
    First,
    Second,
    Third,
}

enum TypeEnumeration {
    First: string,
    Second: int[],
    Third: RecordType,
}

record RecordType {
    name: string,
    fields: StructType[],
    data: byte[],
}

struct StructType {
    x: float,
    y: float,
}

interface InterfaceService {
    hello: (name: string) -> string,
    sum: (first: int, second: int) -> int,
    sendMessage: (message: string) -> stream string,
}
"#;

    static IDS_FIRST: &str = r#"
package IdlTest {
    idl: 1,
    version: 1,
}

server Maine {
    layers: [ws],
    language: "rust",
    
}

client Main {
    language: "rust",
    servers: [Maine]
}
"#;

    use anyhow::Result;
    use idl::module::Module;

    #[test]
    fn try_this() -> Result<()> {
        let mut module = Module::new();

        module.replace_ids_document("idl_nodes.ids", IDS_FIRST);
        module.replace_idl_document("idl_nodes.idl", IDL_FIRST);

        module.update()?;

        module.idl_documents_are_all_valid().expect("Invalid document");

        Ok(())
    }
}