Skip to content

Commit

Permalink
Update documentation (#30)
Browse files Browse the repository at this point in the history
* feat: update version to v0.4.1

* doc: add mention to rspack

* feat: update webpack example name to webpack-react

* feat: add example README
  • Loading branch information
Valerioageno authored Apr 6, 2024
1 parent d3c0e44 commit 50c7de9
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ssr_rs"
version = "0.4.0"
version = "0.4.1"
authors = ["Valerio <valerioageno@yahoo.it>"]
edition = "2021"
description = "Server side rendering with the v8 engine for parse and evaluate the javascript code"
Expand Down Expand Up @@ -84,7 +84,7 @@ name = "vite-react"
path = "examples/vite-react/server.rs"

[[example]]
name = "webpack"
name = "webpack-react"
path = "examples/webpack-react/server.rs"

[[example]]
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ The crate aims to enable server side rendering on rust servers in the simplest a

It uses an embedded version of the [V8](https://v8.dev/) javascript engine (<a href="https://github.com/denoland/rusty_v8" target="_blank">rusty_v8</a>) to parse and evaluate a built bundle file and return a string with the rendered html.

Currently it works with latest [Vite](https://vitejs.dev/), latest [Webpack](https://webpack.js.org/) and [React 18](https://react.dev/) - Check the examples folder.
Currently it works with [Vite](https://vitejs.dev/), [Webpack](https://webpack.js.org/), [Rspack](https://www.rspack.dev/) and [React 18](https://react.dev/) - Check the examples folder.

> Check <a href="https://github.com/Valerioageno/ssr-rs/blob/main/benches">here</a> the benchmark results.
Expand All @@ -17,7 +17,7 @@ Add this to your `Cargo.toml`:

```toml
[dependencies]
ssr_rs = "0.4.0"
ssr_rs = "0.4.1"
```

## Example
Expand Down
14 changes: 14 additions & 0 deletions examples/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# SSR-RS examples

This folder includes examples to ease the usage of the library.

The most complete react example is `webpack-react` since it includes the
server side props handling, the react hydration and the assets generation.

`vite-react` and `rspack-react` just showcase a base bundler configuration. For the above
features the porting is pretty straightforward.

The other example at the folder root show a simple configuration with the most common rust backend frameworks.

> Any example improvement or suggestion will be appreciated.
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
//!
//! It uses an embedded version of the [V8](https://v8.dev/) javascript engine (<a href="https://github.com/denoland/rusty_v8" target="_blank">rusty_v8</a>) to parse and evaluate a built bundle file and return a string with the rendered html.
//!
//! Currently it works with latest [Vite](https://vitejs.dev/), latest [Webpack](https://webpack.js.org/) and [React 18](https://react.dev/) - Check the examples folder.
//! Currently it works with [Vite](https://vitejs.dev/), [Webpack](https://webpack.js.org/), [Rspack](https://www.rspack.dev/) and [React 18](https://react.dev/) - Check the examples folder.
//!
//! > Check <a href="https://github.com/Valerioageno/ssr-rs/blob/main/benches">here</a> the
//! benchmarks results.
//!
//! # Getting started
//! ```toml
//! [dependencies]
//! ssr_rs = "0.4.0"
//! ssr_rs = "0.4.1"
//! ```
//!
//! # Example
Expand Down

0 comments on commit 50c7de9

Please sign in to comment.