From 50c7de943bccc26ab2d3b17a682c0469abc7bab2 Mon Sep 17 00:00:00 2001 From: Valerio Ageno <51341197+Valerioageno@users.noreply.github.com> Date: Sat, 6 Apr 2024 11:05:06 +0200 Subject: [PATCH] Update documentation (#30) * feat: update version to v0.4.1 * doc: add mention to rspack * feat: update webpack example name to webpack-react * feat: add example README --- Cargo.toml | 4 ++-- README.md | 4 ++-- examples/README.md | 14 ++++++++++++++ src/lib.rs | 4 ++-- 4 files changed, 20 insertions(+), 6 deletions(-) create mode 100644 examples/README.md diff --git a/Cargo.toml b/Cargo.toml index cd1cce6..a15f817 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ssr_rs" -version = "0.4.0" +version = "0.4.1" authors = ["Valerio "] edition = "2021" description = "Server side rendering with the v8 engine for parse and evaluate the javascript code" @@ -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]] diff --git a/README.md b/README.md index 7db772a..d5978b1 100644 --- a/README.md +++ b/README.md @@ -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 (rusty_v8) 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 here the benchmark results. @@ -17,7 +17,7 @@ Add this to your `Cargo.toml`: ```toml [dependencies] -ssr_rs = "0.4.0" +ssr_rs = "0.4.1" ``` ## Example diff --git a/examples/README.md b/examples/README.md new file mode 100644 index 0000000..507a858 --- /dev/null +++ b/examples/README.md @@ -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. + diff --git a/src/lib.rs b/src/lib.rs index 988a280..092163d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -5,7 +5,7 @@ //! //! It uses an embedded version of the [V8](https://v8.dev/) javascript engine (rusty_v8) 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 here the //! benchmarks results. @@ -13,7 +13,7 @@ //! # Getting started //! ```toml //! [dependencies] -//! ssr_rs = "0.4.0" +//! ssr_rs = "0.4.1" //! ``` //! //! # Example