Skip to content

Commit de4180e

Browse files
1.3.1
1 parent e5dba58 commit de4180e

File tree

259 files changed

+7074
-12849
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

259 files changed

+7074
-12849
lines changed

README.md

Lines changed: 36 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ How it works
4040
Neutral TS supports two integration approaches:
4141

4242
### **Available Modes:**
43-
- **Rust**: Native library (crate)
43+
- **Rust**: Native library ([crate](https://crates.io/crates/neutralts)) **or** IPC client ([crate](https://crates.io/crates/neutralipcrs)) + IPC server
4444
- **Python**: Native package **or** IPC client + IPC server
4545
- **Other languages** (PHP, etc.): IPC client + IPC server required
4646

@@ -61,17 +61,29 @@ Uses the exact same client-server mechanism as a database:
6161
- **Same principle**: Lightweight client + Powerful server
6262
- **Universal protocol**: TCP + text/JSON (supported by all languages)
6363
- **Consistent results**: Same engine processes everything, guaranteeing identical output
64+
- **Minimal dependencies**: IPC clients are extremely lightweight with minimal external dependencies
65+
- **Easy updates**: No application recompilation needed - simply update the IPC server for engine improvements
6466

6567
### **Security Advantage:**
6668
The IPC architecture provides important security benefits:
6769
- **Sandboxed execution**: Templates run in isolated processes
6870
- **Reduced attack surface**: Main application protected from template engine vulnerabilities
6971
- **Resource control**: Memory and CPU limits can be enforced at server level
7072
- **Crash containment**: Template engine failures don't affect the main application
73+
- **Zero-downtime updates**: IPC server can be updated independently without restarting client applications
7174

7275
### **Key Advantage:**
7376
Just like an SQL query returns the same data from any language, a Neutral TS template returns the same HTML from Python, PHP, Rust... with added security isolation.
7477

78+
### **Performance Consideration:**
79+
The IPC approach introduces performance overhead due to inter-process communication. The impact varies depending on:
80+
81+
- Application type
82+
- Programming language
83+
- Network latency
84+
85+
For most web applications, the security and interoperability benefits compensate for the performance overhead.
86+
7587
### **IPC Components:**
7688
- **IPC Server**: Universal standalone application (written in Rust) for all languages - download from: [IPC Server](https://github.com/FranBarInstance/neutral-ipc/releases)
7789
- **IPC Clients**: Language-specific libraries to include in your project - available at: [IPC Clients](https://github.com/FranBarInstance/neutral-ipc/tree/master/clients)
@@ -450,6 +462,8 @@ Or for array:
450462
Native use (Rust)
451463
-----------------
452464

465+
Alternatively, you can use: [Neutral TS Rust IPC Client](https://crates.io/crates/neutralipcrs)
466+
453467
```text
454468
use neutralts::Template;
455469
use serde_json::json;
@@ -468,6 +482,8 @@ let status_param = template.get_status_param();
468482
469483
// act accordingly at this point according to your framework
470484
```
485+
[Rust examples](https://github.com/FranBarInstance/neutralts-docs/tree/master/examples/rust)
486+
471487

472488
Python - Package
473489
----------------
@@ -493,12 +509,14 @@ status_param = template.get_status_param()
493509
494510
# act accordingly at this point according to your framework
495511
```
512+
[Python examples](https://github.com/FranBarInstance/neutralts-docs/tree/master/examples/python)
513+
496514

497515
Python - IPC
498516
------------
499517

500518
- Requires the IPC server: [Neutral TS IPC Server](https://github.com/FranBarInstance/neutral-ipc/releases)
501-
- Requires the Python IPC client: [Neutral TS IPC Clients](https://github.com/FranBarInstance/neutral-ipc/clients)
519+
- Requires the Python IPC client: [Neutral TS IPC Clients](https://github.com/FranBarInstance/neutral-ipc)
502520

503521
```text
504522
from NeutralIpcTemplate import NeutralIpcTemplate
@@ -517,33 +535,35 @@ status_param = template.get_status_param()
517535
518536
# act accordingly at this point according to your framework
519537
```
538+
[Python examples](https://github.com/FranBarInstance/neutralts-docs/tree/master/examples/python)
539+
520540

521541
PHP
522542
---
523543

524544
- Requires the IPC server: [Neutral TS IPC Server](https://github.com/FranBarInstance/neutral-ipc/releases)
525-
- Requires the Python IPC client: [Neutral TS IPC Clients](https://github.com/FranBarInstance/neutral-ipc/clients)
545+
- Requires the PHP IPC client: [Neutral TS IPC Clients](https://github.com/FranBarInstance/neutral-ipc)
526546

547+
[PHP examples](https://github.com/FranBarInstance/neutralts-docs/tree/master/examples/php)
527548

528-
```text
529-
include 'NeutralIpcTemplate.php';
549+
Node.js
550+
-------
530551

531-
$template = new NeutralIpcTemplate("file.ntpl", $schema);
532-
$contents = $template->render();
552+
- Requires the IPC server: [Neutral TS IPC Server](https://github.com/FranBarInstance/neutral-ipc/releases)
553+
- Requires the Node IPC client: [Neutral TS IPC Clients](https://github.com/FranBarInstance/neutral-ipc)
533554

534-
// e.g.: 200
535-
$status_code = $template->get_status_code();
555+
[Node.js examples](https://github.com/FranBarInstance/neutralts-docs/tree/master/examples/node)
536556

537-
// e.g.: OK
538-
$status_text = $template->get_status_text();
557+
Go
558+
--
539559

540-
// empty if no error
541-
$status_param = $template->get_status_param();
560+
- Requires the IPC server: [Neutral TS IPC Server](https://github.com/FranBarInstance/neutral-ipc/releases)
561+
- Requires the Go IPC client: [Neutral TS IPC Clients](https://github.com/FranBarInstance/neutral-ipc)
542562

543-
// act accordingly at this point according to your framework
544-
```
563+
[Go examples](https://github.com/FranBarInstance/neutralts-docs/tree/master/examples/go)
545564

546-
Neutral TS template engine.
565+
Neutral TS template engine
566+
--------------------------
547567

548568
- [Rust docs](https://docs.rs/neutralts/latest/neutralts/)
549569
- [Template docs](https://franbarinstance.github.io/neutralts-docs/docs/neutralts/doc/)

docs/README.md

Lines changed: 36 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ How it works
4040
Neutral TS supports two integration approaches:
4141

4242
### **Available Modes:**
43-
- **Rust**: Native library (crate)
43+
- **Rust**: Native library ([crate](https://crates.io/crates/neutralts)) **or** IPC client ([crate](https://crates.io/crates/neutralipcrs)) + IPC server
4444
- **Python**: Native package **or** IPC client + IPC server
4545
- **Other languages** (PHP, etc.): IPC client + IPC server required
4646

@@ -61,17 +61,29 @@ Uses the exact same client-server mechanism as a database:
6161
- **Same principle**: Lightweight client + Powerful server
6262
- **Universal protocol**: TCP + text/JSON (supported by all languages)
6363
- **Consistent results**: Same engine processes everything, guaranteeing identical output
64+
- **Minimal dependencies**: IPC clients are extremely lightweight with minimal external dependencies
65+
- **Easy updates**: No application recompilation needed - simply update the IPC server for engine improvements
6466

6567
### **Security Advantage:**
6668
The IPC architecture provides important security benefits:
6769
- **Sandboxed execution**: Templates run in isolated processes
6870
- **Reduced attack surface**: Main application protected from template engine vulnerabilities
6971
- **Resource control**: Memory and CPU limits can be enforced at server level
7072
- **Crash containment**: Template engine failures don't affect the main application
73+
- **Zero-downtime updates**: IPC server can be updated independently without restarting client applications
7174

7275
### **Key Advantage:**
7376
Just like an SQL query returns the same data from any language, a Neutral TS template returns the same HTML from Python, PHP, Rust... with added security isolation.
7477

78+
### **Performance Consideration:**
79+
The IPC approach introduces performance overhead due to inter-process communication. The impact varies depending on:
80+
81+
- Application type
82+
- Programming language
83+
- Network latency
84+
85+
For most web applications, the security and interoperability benefits compensate for the performance overhead.
86+
7587
### **IPC Components:**
7688
- **IPC Server**: Universal standalone application (written in Rust) for all languages - download from: [IPC Server](https://github.com/FranBarInstance/neutral-ipc/releases)
7789
- **IPC Clients**: Language-specific libraries to include in your project - available at: [IPC Clients](https://github.com/FranBarInstance/neutral-ipc/tree/master/clients)
@@ -450,6 +462,8 @@ Or for array:
450462
Native use (Rust)
451463
-----------------
452464

465+
Alternatively, you can use: [Neutral TS Rust IPC Client](https://crates.io/crates/neutralipcrs)
466+
453467
```text
454468
use neutralts::Template;
455469
use serde_json::json;
@@ -468,6 +482,8 @@ let status_param = template.get_status_param();
468482
469483
// act accordingly at this point according to your framework
470484
```
485+
[Rust examples](https://github.com/FranBarInstance/neutralts-docs/tree/master/examples/rust)
486+
471487

472488
Python - Package
473489
----------------
@@ -493,12 +509,14 @@ status_param = template.get_status_param()
493509
494510
# act accordingly at this point according to your framework
495511
```
512+
[Python examples](https://github.com/FranBarInstance/neutralts-docs/tree/master/examples/python)
513+
496514

497515
Python - IPC
498516
------------
499517

500518
- Requires the IPC server: [Neutral TS IPC Server](https://github.com/FranBarInstance/neutral-ipc/releases)
501-
- Requires the Python IPC client: [Neutral TS IPC Clients](https://github.com/FranBarInstance/neutral-ipc/clients)
519+
- Requires the Python IPC client: [Neutral TS IPC Clients](https://github.com/FranBarInstance/neutral-ipc)
502520

503521
```text
504522
from NeutralIpcTemplate import NeutralIpcTemplate
@@ -517,33 +535,35 @@ status_param = template.get_status_param()
517535
518536
# act accordingly at this point according to your framework
519537
```
538+
[Python examples](https://github.com/FranBarInstance/neutralts-docs/tree/master/examples/python)
539+
520540

521541
PHP
522542
---
523543

524544
- Requires the IPC server: [Neutral TS IPC Server](https://github.com/FranBarInstance/neutral-ipc/releases)
525-
- Requires the Python IPC client: [Neutral TS IPC Clients](https://github.com/FranBarInstance/neutral-ipc/clients)
545+
- Requires the PHP IPC client: [Neutral TS IPC Clients](https://github.com/FranBarInstance/neutral-ipc)
526546

547+
[PHP examples](https://github.com/FranBarInstance/neutralts-docs/tree/master/examples/php)
527548

528-
```text
529-
include 'NeutralIpcTemplate.php';
549+
Node.js
550+
-------
530551

531-
$template = new NeutralIpcTemplate("file.ntpl", $schema);
532-
$contents = $template->render();
552+
- Requires the IPC server: [Neutral TS IPC Server](https://github.com/FranBarInstance/neutral-ipc/releases)
553+
- Requires the Node IPC client: [Neutral TS IPC Clients](https://github.com/FranBarInstance/neutral-ipc)
533554

534-
// e.g.: 200
535-
$status_code = $template->get_status_code();
555+
[Node.js examples](https://github.com/FranBarInstance/neutralts-docs/tree/master/examples/node)
536556

537-
// e.g.: OK
538-
$status_text = $template->get_status_text();
557+
Go
558+
--
539559

540-
// empty if no error
541-
$status_param = $template->get_status_param();
560+
- Requires the IPC server: [Neutral TS IPC Server](https://github.com/FranBarInstance/neutral-ipc/releases)
561+
- Requires the Go IPC client: [Neutral TS IPC Clients](https://github.com/FranBarInstance/neutral-ipc)
542562

543-
// act accordingly at this point according to your framework
544-
```
563+
[Go examples](https://github.com/FranBarInstance/neutralts-docs/tree/master/examples/go)
545564

546-
Neutral TS template engine.
565+
Neutral TS template engine
566+
--------------------------
547567

548568
- [Rust docs](https://docs.rs/neutralts/latest/neutralts/)
549569
- [Template docs](https://franbarinstance.github.io/neutralts-docs/docs/neutralts/doc/)

docs/help.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Documentation for Rustdoc"><title>Help</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="./static.files/${f}">`).join(""))</script><link rel="stylesheet" href="./static.files/normalize-9960930a.css"><link rel="stylesheet" href="./static.files/rustdoc-42caa33d.css"><meta name="rustdoc-vars" data-root-path="./" data-static-root-path="./static.files/" data-current-crate="neutralts" data-themes="" data-resource-suffix="" data-rustdoc-version="1.84.1 (e71f9a9a9 2025-01-27)" data-channel="1.84.1" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="./static.files/storage-59e33391.js"></script><script defer src="./static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="./static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="./static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="./static.files/favicon-044be391.svg"></head><body class="rustdoc mod sys"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button><a class="logo-container" href="./index.html"><img class="rust-logo" src="./static.files/rust-logo-9a9549ea.svg" alt=""></a></nav><nav class="sidebar"><div class="sidebar-crate"><a class="logo-container" href="./index.html"><img class="rust-logo" src="./static.files/rust-logo-9a9549ea.svg" alt="logo"></a><h2><a href="./index.html">Rustdoc</a><span class="version">1.84.1</span></h2></div><div class="version">(e71f9a9a9 2025-01-27)</div><h2 class="location">Help</h2><div class="sidebar-elems"></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><h1>Rustdoc help</h1><span class="out-of-band"><a id="back" href="javascript:void(0)" onclick="history.back();">Back</a></span></div><noscript><section><p>You need to enable JavaScript to use keyboard commands or search.</p><p>For more information, browse the <a href="https://doc.rust-lang.org/rustdoc/">rustdoc handbook</a>.</p></section></noscript></section></div></main></body></html>
1+
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Documentation for Rustdoc"><title>Help</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="./static.files/${f}">`).join(""))</script><link rel="stylesheet" href="./static.files/normalize-9960930a.css"><link rel="stylesheet" href="./static.files/rustdoc-84e720fa.css"><meta name="rustdoc-vars" data-root-path="./" data-static-root-path="./static.files/" data-current-crate="neutralts" data-themes="" data-resource-suffix="" data-rustdoc-version="1.89.0 (29483883e 2025-08-04)" data-channel="1.89.0" data-search-js="search-92309212.js" data-settings-js="settings-5514c975.js" ><script src="./static.files/storage-4e99c027.js"></script><script defer src="./static.files/main-fd3af306.js"></script><noscript><link rel="stylesheet" href="./static.files/noscript-32bb7600.css"></noscript><link rel="alternate icon" type="image/png" href="./static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="./static.files/favicon-044be391.svg"></head><body class="rustdoc mod sys"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button><a class="logo-container" href="./index.html"><img class="rust-logo" src="./static.files/rust-logo-9a9549ea.svg" alt=""></a></nav><nav class="sidebar"><div class="sidebar-crate"><a class="logo-container" href="./index.html"><img class="rust-logo" src="./static.files/rust-logo-9a9549ea.svg" alt="logo"></a><h2><a href="./index.html">Rustdoc</a><span class="version">1.89.0</span></h2></div><div class="version">(29483883e 2025-08-04)</div><h2 class="location">Help</h2><div class="sidebar-elems"></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><h1>Rustdoc help</h1><span class="out-of-band"><a id="back" href="javascript:void(0)" onclick="history.back();">Back</a></span></div><noscript><section><p>You need to enable JavaScript to use keyboard commands or search.</p><p>For more information, browse the <a href="https://doc.rust-lang.org/1.89.0/rustdoc/">rustdoc handbook</a>.</p></section></noscript></section></div></main></body></html>

0 commit comments

Comments
 (0)