Coder Social home page Coder Social logo

playground's Introduction

leptos-fullstack

A Nix template for full-stack web apps in Rust using Leptos. Tech used:

Running locally

Enter the Nix shell, and run:

# To spin up the dev server
just watch

# To run tests
just test

Building

nix build

# To build the rust doccs
nix build .#leptos-fullstack-docs

You can also nix run the app directly.

Using as flake-parts module

Import ./nix/flake-module.nix from this repos as a flake-parts module. For an example project, see nix-browser.

In the future, we might create a standalone flake-parts module for Leptos.

Notes

Single-crate model

This repo uses the single-crate model primarily because the backend-common-frontend split (prior to PR #5; similar to start-axum-workspace template) is not suitable when using server functions in leptos. Consequently, expect a bunch of cfg attributes or macros that make backend-only code conditional upon the ssr flag (which is set when compiling the crate for the backend, as opposed to the wasm frontend, which uses csr)

Credits

The Rust code is largely based on start-axum. Also, credit goes to @benwis for pointers to how crane can be made to work with cargo-leptos.

playground's People

Contributors

cowboyai avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.