simploxide_bindgen/
lib.rs

1//! The `simploxide-bindgen` library crate contains everythinig that's needed to parse SimpleX bot
2//! API docs and generate Rust code from them.
3//!
4//! The functions that generate full Rust modules or a full crate are not included here though.
5//! There are some decisions to be made about the resulting file hierarchy and the type shapes of
6//! certain types, so full code generation is left to the client.
7//!
8//! The `simploxide-bindgen` binary crate generates only one specific crate layout for the
9//! `simploxide` project needs.
10//!
11//! The library is generic enough to allow implementing bindings for other languages. The
12//! implementor just needs to override `std::fmt::Display` for [`crate::types`] using a new type
13//! pattern and implement a [`syntax::binding::SyntaxInterpreter`] to generate a command syntax
14//! interpreter in the target language.
15
16/// A COMMANDS.MD parser and utilities.
17pub mod commands;
18/// An EVENTS.MD parser and utilities.
19pub mod events;
20/// A TYPES.MD parser and utilities.
21pub mod types;
22
23/// A syntax parser and a generator of syntax interpreters.
24pub mod syntax;
25
26/// Common parsing utilities.
27mod parse_utils;