Neutral TS Rust IPC Client
Neutral TS is a safe, modular, language-agnostic template engine built in Rust. It works as a native Rust library or via IPC for other languages like Python and PHP. With Neutral TS you can reuse the same template across multiple languages with consistent results.
Examples for Rust, Python, PHP, Node.js and Go here: download. All PWA examples use the same template: Neutral templates.
The documentation of the web template engine is here: template engine doc and Rust documentation here: Rust doc.
Rust IPC use
use NeutralIpcTemplate;
use json;
let schema = json!;
let mut template = from_file_value.unwrap;
let contents = template.render.unwrap;
// e.g.: 200
let status_code: &str = template.get_status_code;
// e.g.: OK
let status_text: &str = template.get_status_text;
// empty if no error
let status_param: &str = template.get_status_param;
// act accordingly at this point according to your framework
Rust IPC with MsgPack schema
use NeutralIpcTemplate;
use json;
let schema = json!;
let schema_msgpack = to_vec.unwrap;
let mut template = from_src_msgpack.unwrap;
let contents = template.render.unwrap;
assert_eq!;
- Requires the IPC server: Neutral TS IPC Server
- Requires the Rust IPC client: Neutral TS Rust IPC Client