Crate ssr_rs[−][src]
This crate aims to enable server side rendering on rust servers in the simplest and lightest way possible.
The whole logic is stored inside the render_to_string() function.
Gettin started
[dependencies]
ssr_rs = "0.2.1"
Example
use ssr_rs::Ssr; use std::fs::read_to_string; fn main() { let source = read_to_string("./path/to/build.js").unwrap(); let html = Ssr::render_to_string(&source, "entryPoint", None); assert_eq!(html, "<!doctype html><html>...</html>".to_string()); }
Check how to use it with actix, rocket, warp and other frameworks here.
Structs
Ssr |