3 releases
0.1.4 | Jan 16, 2023 |
---|---|
0.1.3 | Jan 15, 2023 |
0.1.1 | Jan 15, 2023 |
#560 in WebAssembly
48 downloads per month
Used in 3 crates
31KB
744 lines
Stellation
A framework experience for Yew.
Stellation provides a development stack with:
- Tooling around Server-side Rendering Support.
- An easy-to-use, SSR-transparent RPC Implementation.
- A development server that automatically rebuild upon changes.
- A single binary distribution with embedded frontend.
Quickstart Guide
-
Install required tools
Stellation uses the following tools:
- Trunk
- cargo-generate
- cargo-make
They can be installed with cargo install trunk cargo-generate cargo-make
-
Create project
Run
cargo generate futursolo/stellation-templates
and follow the prompt. -
Start development server
Run
cargo make --quiet start
in the project directory.(This may take a couple minutes when the project is building for the first time.)
lib.rs
:
Bridge between the frontend and backend.
This module is a RPC implementation that facilitates communications between frontend and backend.
It supports the following types:
Bridge has 2 connection methods local
and remote
. When the resolvable
feature is
enabled, bridges will be conntected with the local method and can process requests with
resolvers. This can be used for server-side rendering and processing requests from a bridge
connected with the remote method. If the resolvable
feature is disabled, it will send the
request to the bridge endpoint which will process the bridge at the server-side. This is usually
used for client-side rendering.
When the resolvable
feature is enabled, it will require query and mutations to implement their
resolver type which is responsible for resolving the request.
You can check out the example for how to implement resolvers.
Dependencies
~11–18MB
~314K SLoC