### Run Example Script Source: https://github.com/leptos-rs/leptos/blob/main/projects/nginx-mpmc/README.md Execute this script to start the Nginx reverse proxy and the four Leptos servers. Ensure you have Docker installed and running. ```sh ./run.sh ``` ```sh ./run_linux.sh ``` -------------------------------- ### Cargo Make Start Example Source: https://github.com/leptos-rs/leptos/blob/main/examples/README.md Runs a Leptos example using Cargo Make, starting the development server. ```bash cargo make start ``` -------------------------------- ### Cargo Make Setup and Test Source: https://github.com/leptos-rs/leptos/blob/main/examples/README.md Sets up and tests a Leptos example using Cargo Make. ```bash cargo make ci ``` -------------------------------- ### Verify Example Flow Source: https://github.com/leptos-rs/leptos/blob/main/CONTRIBUTING.md Run the verification flow for a modified example to ensure its functionality. Navigate to the example's directory first. ```bash cd examples/your_example cargo +nightly make --profile=github-actions verify-flow ``` -------------------------------- ### Check Examples Locally Source: https://github.com/leptos-rs/leptos/blob/main/CONTRIBUTING.md Verify that all examples in the project are correctly set up and buildable. Run this from the repository root. ```bash cargo +nightly make check-examples ``` -------------------------------- ### Install todomvc-app-css Package Source: https://github.com/leptos-rs/leptos/blob/main/examples/todomvc/node_modules/todomvc-app-css/readme.md Install the package using npm. This command downloads and installs the todomvc-app-css package into your project. ```bash $ npm install todomvc-app-css ``` -------------------------------- ### Install Trunk Source: https://github.com/leptos-rs/leptos/blob/main/examples/README.md Installs the Trunk build system and dev server for client-side-rendered apps. ```bash cargo install trunk ``` -------------------------------- ### Install todomvc-common Source: https://github.com/leptos-rs/leptos/blob/main/examples/todomvc/node_modules/todomvc-common/readme.md Install the todomvc-common package using npm. ```bash $ npm install todomvc-common ``` -------------------------------- ### Build and Start Leptos App with Deno Source: https://github.com/leptos-rs/leptos/blob/main/examples/hackernews_js_fetch/README.md Use these Deno tasks to build and start the Leptos application for server-side rendering. ```bash deno task build deno task start ``` -------------------------------- ### Install Meilisearch Source: https://github.com/leptos-rs/leptos/blob/main/projects/meilisearch-searchbar/README.md Use this command to download and install the Meilisearch binary. ```sh curl -L https://install.meilisearch.com | sh ``` -------------------------------- ### Install Cargo Make Source: https://github.com/leptos-rs/leptos/blob/main/examples/README.md Installs the Cargo Make task automation tool. ```bash cargo install --force cargo-make ``` -------------------------------- ### Install Nightly Rust Source: https://github.com/leptos-rs/leptos/blob/main/examples/README.md Installs the nightly Rust toolchain, which may be required for certain Leptos features or examples. ```bash rustup toolchain install nightly ``` -------------------------------- ### Install cargo-generate Source: https://github.com/leptos-rs/leptos/blob/main/projects/nginx-mpmc/app-1/README.md Install the `cargo-generate` binary, which might be used by `cargo-leptos` for scaffolding new projects. Note that this may be installed automatically in future versions. ```bash cargo install cargo-generate ``` -------------------------------- ### Cargo Make Stop Example Source: https://github.com/leptos-rs/leptos/blob/main/examples/README.md Stops any processes started by `cargo make start` for a Leptos example. ```bash cargo make stop ``` -------------------------------- ### Tauri Application Setup Source: https://github.com/leptos-rs/leptos/blob/main/projects/tauri-from-scratch/README.md This Rust code sets up a Tauri application, initializing the http plugin and configuring a setup hook to open developer tools for the main webview window. It then runs the application context. ```rust use tauri::Manager; #[cfg_attr(mobile, tauri::mobile_entry_point)] pub fn run() { tauri::Builder::default() .plugin(tauri_plugin_http::init()) .setup(|app| { { let window = app.get_webview_window("main").unwrap(); window.open_devtools(); } Ok(()) }) .run(tauri::generate_context!()) .expect("error while running tauri application"); } ``` -------------------------------- ### Run Project with Cargo Make Source: https://github.com/leptos-rs/leptos/blob/main/projects/sitemap_axum/README.md Execute the project setup and development server using 'cargo make run'. This command handles database container setup and server initialization. ```sh cargo make run ``` -------------------------------- ### Install and Use cargo-leptos Source: https://github.com/leptos-rs/leptos/blob/main/README.md Install the `cargo-leptos` build tool and use it to create a new Leptos project with Axum. This tool simplifies building full-stack applications. ```bash cargo install cargo-leptos --locked cargo leptos new --git https://github.com/leptos-rs/start-axum cd [your project name] cargo leptos watch ``` -------------------------------- ### Install cargo-leptos Source: https://github.com/leptos-rs/leptos/blob/main/projects/nginx-mpmc/app-1/README.md Install the cargo-leptos tool to manage Leptos projects. This is a prerequisite for creating new projects. ```bash cargo install cargo-leptos ``` -------------------------------- ### Install cargo-leptos Source: https://github.com/leptos-rs/leptos/blob/main/examples/SSR_NOTES.md Install the `cargo-leptos` tool to facilitate building server-side rendered Leptos applications. This tool simplifies the development workflow. ```bash cargo install --locked cargo-leptos ``` -------------------------------- ### Install Rust Nightly Toolchain Source: https://github.com/leptos-rs/leptos/blob/main/projects/nginx-mpmc/app-1/README.md Ensure you have the Rust nightly toolchain installed, as Leptos often relies on features available in nightly Rust. This command installs or updates the nightly toolchain. ```bash rustup toolchain install nightly --allow-downgrade ``` -------------------------------- ### SSR Main Function Setup Source: https://github.com/leptos-rs/leptos/blob/main/projects/tauri-from-scratch/README.md Sets up the main function for Server-Side Rendering using Tokio and Axum, including Leptos routing and server function handling. ```rust #[cfg(feature = "ssr")] #[tokio::main] async fn main() { use axum::{ body::Body, extract::{Request, State}, response::IntoResponse, routing::get, Router, }; use leptos::logging::log; use leptos::prelude::*; use leptos_axum::{generate_route_list, LeptosRoutes}; use leptos_tauri_from_scratch::{ app::{shell, App}, fallback::file_and_error_handler, }; use tower_http::cors::CorsLayer; let conf = get_configuration(None).unwrap(); let addr = conf.leptos_options.site_addr; let leptos_options = conf.leptos_options; // Generate the list of routes in your Leptos App let routes = generate_route_list(App); #[derive(Clone, Debug, axum_macros::FromRef)] pub struct ServerState { pub options: LeptosOptions, pub routes: Vec, } let state = ServerState { options: leptos_options, routes: routes.clone(), }; pub async fn server_fn_handler( State(state): State, request: Request, ) -> impl IntoResponse { leptos_axum::handle_server_fns_with_context( move || { provide_context(state.clone()); }, ``` -------------------------------- ### Run Meilisearch Locally Source: https://github.com/leptos-rs/leptos/blob/main/projects/meilisearch-searchbar/README.md Execute this command to start a local Meilisearch instance. ```sh ./meilisearch ``` -------------------------------- ### Counter Without Macros Example Source: https://github.com/leptos-rs/leptos/blob/main/ARCHITECTURE.md Demonstrates how to implement reactive UI elements without using Leptos macros, showcasing the underlying builder pattern. ```Rust use leptos_reactive::*; use leptos_dom::*; #[component] fn CounterWithoutMacros() -> impl IntoView { let (count, set_count) = create_signal(0); view!
"Count: "{count}
``` -------------------------------- ### Start Docker Compose Services Source: https://github.com/leptos-rs/leptos/blob/main/projects/ory-kratos/README.md Command to start the Docker Compose services, including MailCrab, Ory Kratos, and Ory Ketos. ```sh docker compose up ``` -------------------------------- ### Install wasm-pack Source: https://github.com/leptos-rs/leptos/blob/main/examples/SSR_NOTES.md Install `wasm-pack`, a tool required for building WebAssembly modules that hydrate HTML generated by the server. Ensure this is installed before proceeding with WASM builds. ```bash cargo install wasm-pack ``` -------------------------------- ### Install Dioxus CLI for Hot Patching Source: https://github.com/leptos-rs/leptos/blob/main/examples/subsecond_hot_patch/README.md Install the Dioxus CLI from git to enable hot-patching. This command is necessary before running the `dx serve --hot-patch` command. ```sh cargo install dioxus-cli --git https://github.com/DioxusLabs/dioxus ``` -------------------------------- ### Format Modified Example Code Source: https://github.com/leptos-rs/leptos/blob/main/CONTRIBUTING.md Format code within a specific example directory, ensuring it adheres to project formatting standards. Use the provided config-path for correct formatting. ```bash cd examples/your_example cargo +nightly fmt -- --config-path ../.. ``` -------------------------------- ### Install Tailwind CSS Source: https://github.com/leptos-rs/leptos/blob/main/examples/tailwind_actix/README.md Use npm to install Tailwind CSS as a development dependency. Alternatively, download the binary directly. ```bash npm install -D tailwindcss ``` -------------------------------- ### Check Docker Version Source: https://github.com/leptos-rs/leptos/blob/main/projects/sitemap_axum/README.md Verify that Docker is installed and accessible by checking its version. ```sh docker -v ``` -------------------------------- ### Include TodoMVC CSS in HTML Source: https://github.com/leptos-rs/leptos/blob/main/examples/todomvc/node_modules/todomvc-app-css/readme.md Link the main CSS file in your HTML to apply the TodoMVC styling. Ensure the path correctly points to the installed package. ```html ``` -------------------------------- ### Leptos View Macro Example Source: https://github.com/leptos-rs/leptos/blob/main/ARCHITECTURE.md Example of a Leptos view macro used for defining UI structure. This is compiled internally to an optimized representation. ```rust view! { cx,

"Text."

} ``` -------------------------------- ### Rust Reactive Primitives Example Source: https://github.com/leptos-rs/leptos/blob/main/reactive_graph/README.md Demonstrates the usage of ArcRwSignal, ArcMemo, and Effect for managing reactive state and derived values. Updates to signals propagate to dependent computations and effects. ```rust use reactive_graph:: computed::ArcMemo, effect::Effect, prelude::{Read, Set}, signal::ArcRwSignal, }; let count = ArcRwSignal::new(1); let double_count = ArcMemo::new({ let count = count.clone(); move |_| *count.read() * 2 }); // the effect will run once initially Effect::new(move |_| { println!("double_count = {}", *double_count.read()); }); // updating `count` will propagate changes to the dependencies, // causing the effect to run again count.set(2); ``` -------------------------------- ### Serve Leptos Tauri Application Source: https://github.com/leptos-rs/leptos/blob/main/projects/tauri-from-scratch/README.md Command to serve the Leptos application with Tauri integration. This command compiles the WASM frontend and starts the development server. ```sh cargo leptos serve ``` -------------------------------- ### Axum Server Setup with Leptos Routes Source: https://github.com/leptos-rs/leptos/blob/main/projects/tauri-from-scratch/README.md Configures an Axum application with Leptos routes, API endpoints, and a fallback handler. Includes CORS middleware for cross-origin requests. ```rust let app = Router::new() .route( "/api/{*fn_name}", get(server_fn_handler).post(server_fn_handler), ) .layer(cors) .leptos_routes_with_handler(routes, get(leptos_routes_handler)) .fallback(file_and_error_handler) .with_state(state); // run our app with hyper // `axum::Server` is a re-export of `hyper::Server` log!("listening on http://{}", &addr); let listener = tokio::net::TcpListener::bind(&addr).await.unwrap(); axum::serve(listener, app.into_make_service()) .await .unwrap(); ``` -------------------------------- ### Stop Example Servers Script Source: https://github.com/leptos-rs/leptos/blob/main/projects/nginx-mpmc/README.md Run this script to gracefully shut down all running Leptos servers and the Nginx Docker container. Note that multiple Ctrl+C inputs might be necessary to fully terminate all processes. ```sh ./kill.sh ``` -------------------------------- ### Mount Leptos Application to the Body Source: https://github.com/leptos-rs/leptos/blob/main/README.md Provides the entry point for a Leptos application, mounting the root component to the `` element. This is typically used with build tools like Trunk or a wasm-bindgen setup. ```rust pub fn main() { mount_to_body(|| view! { }) } ``` -------------------------------- ### Leptos Router Setup with Server State in Rust Source: https://github.com/leptos-rs/leptos/blob/main/projects/hexagonal-architecture/README.md Sets up the Leptos router with a custom server state, including feature-flag-based handler configuration and context provision. This is the main application entry point. ```rust main () { let leptos_options = conf.leptos_options; let routes = generate_route_list(crate::app::App); // our feature flag based config function. let handler = config(); let handler_c = handler.clone(); // we implement FromRef for LeptosOptions let server_state = ServerState { handler, leptos_options: leptos_options.clone(), }; let app = Router::new() .leptos_routes_with_context( &server_state, routes, // We pass in the MainAppHandler struct as context so we can fetch it anywhere context is available on the server. // This includes in middleware we define on server functions (see middleware.rs) move || provide_context(handler_c.clone()), { let leptos_options = leptos_options.clone(); move || shell(leptos_options.clone()) }, ) .fallback(leptos_axum::file_and_error_handler::< ServerState, _, >(shell)) .with_state(server_state); } ``` -------------------------------- ### Navigate to Project Directory Source: https://github.com/leptos-rs/leptos/blob/main/projects/nginx-mpmc/shared-server-1/README.md Change the current directory to the newly created project. ```bash cd shared-server ``` -------------------------------- ### Create Tauri Configuration File Source: https://github.com/leptos-rs/leptos/blob/main/projects/tauri-from-scratch/README.md Initializes the Tauri configuration file. ```sh touch src-tauri/taur.conf.json ``` -------------------------------- ### Serve Leptos Project with Trunk Source: https://github.com/leptos-rs/leptos/blob/main/examples/tailwind_csr/README.md Run this command to serve your Leptos project locally and automatically open it in your default browser. ```bash trunk serve --open ``` -------------------------------- ### Configure Trunk.toml for Building Source: https://github.com/leptos-rs/leptos/blob/main/projects/tauri-from-scratch/README.md Specifies the entry point for Trunk's build process and configures watch settings to ignore the Tauri-specific directory. ```toml [build] target = "./src-orig/index.html" [watch] ignore = ["./src-tauri"] ``` -------------------------------- ### Create main.rs file Source: https://github.com/leptos-rs/leptos/blob/main/projects/tauri-from-scratch/README.md Creates the main.rs file referenced in src-orig/Cargo.toml. ```sh mkdir src-orig/src && touch src-orig/src/main.rs ``` -------------------------------- ### Create New Leptos Axum Project Source: https://github.com/leptos-rs/leptos/blob/main/projects/nginx-mpmc/app-2/README.md Generate a new Leptos project using the Axum starter template from a Git repository. Navigate into the created project directory afterwards. ```bash cargo leptos new --git leptos-rs/start-axum cd app-2 ``` -------------------------------- ### Create New Leptos Axum Project Source: https://github.com/leptos-rs/leptos/blob/main/projects/nginx-mpmc/shared-server-1/README.md Generate a new Leptos project using the Axum starter template from a Git repository. ```bash cargo leptos new --git leptos-rs/start-axum ``` -------------------------------- ### Install Dart Sass Source: https://github.com/leptos-rs/leptos/blob/main/projects/nginx-mpmc/app-1/README.md Install Dart Sass globally using npm. This is used for CSS preprocessing and might become optional in future versions. ```bash npm install -g sass ``` -------------------------------- ### Serve Leptos Application Locally Source: https://github.com/leptos-rs/leptos/blob/main/projects/hexagonal-architecture/README.md Build and serve your Leptos application, making it accessible at http://127.0.0.1:3000. ```bash cargo leptos serve ``` -------------------------------- ### Create Project Directories Source: https://github.com/leptos-rs/leptos/blob/main/projects/tauri-from-scratch/README.md Sets up the necessary directory structure for the Tauri project, separating original source files and Tauri-specific files. ```sh mkdir src-orig && mkdir src-tauri ``` -------------------------------- ### Tauri Build Configuration Details Source: https://github.com/leptos-rs/leptos/blob/main/projects/tauri-from-scratch/README.md Highlights the 'build' section of the Tauri configuration, specifically 'beforeBuildCommand' which triggers Trunk to build the CSR client, and 'frontendDist' which points to the output directory. ```json "build": { "beforeDevCommand": "", "beforeBuildCommand": "trunk build --no-default-features -v --features \"csr\"", "devUrl": "http://127.0.0.1:3000", "frontendDist": "../dist" }, ``` -------------------------------- ### Create New Leptos Axum Project Source: https://github.com/leptos-rs/leptos/blob/main/projects/nginx-mpmc/app-1/README.md Generate a new Leptos project using the Axum backend template from a Git repository. Navigate into the created project directory afterwards. ```bash cargo leptos new --git leptos-rs/start-axum cd app-1 ``` -------------------------------- ### Create New Leptos Axum Project Source: https://github.com/leptos-rs/leptos/blob/main/projects/nginx-mpmc/shared-server-2/README.md Generate a new Leptos project using the Axum backend template from a Git repository. Navigate into the created project directory afterwards. ```bash cargo leptos new --git leptos-rs/start-axum cd shared-server ``` -------------------------------- ### Serve Leptos App with Meilisearch Source: https://github.com/leptos-rs/leptos/blob/main/projects/meilisearch-searchbar/README.md Set the MEILISEARCH_URL environment variable to point to your local Meilisearch instance and then serve your Leptos application. ```sh MEILISEARCH_URL=http://localhost:7700 && cargo leptos serve ``` -------------------------------- ### Create New Cargo Project Source: https://github.com/leptos-rs/leptos/blob/main/projects/tauri-from-scratch/README.md Initializes a new Rust project for the Leptos Tauri application. ```sh cargo new leptos_tauri_from_scratch ``` -------------------------------- ### Trunk Build Command in Tauri Config Source: https://github.com/leptos-rs/leptos/blob/main/projects/tauri-from-scratch/README.md Specifies the command executed before the Tauri build process starts. This command uses Trunk to build the client-side rendering (CSR) version of the application. ```json "beforeBuildCommand": "trunk build --no-default-features -v --features \"csr\"" ``` -------------------------------- ### Conditional Server Handler Configuration in Rust Source: https://github.com/leptos-rs/leptos/blob/main/projects/hexagonal-architecture/README.md Configures the server handler based on feature flags, choosing between different implementations for database and AI wrappers. This pattern allows for flexible backend setups. ```rust pub fn config() -> MainAppHandlerAlias { cfg_if::cfg_if! { if #[cfg(feature="open_ai_wrapper")] { fn server_handler_config_1() -> MainAppHandler< AuthService, AiMessageGen, > { MainAppHandler::new_with_postgres_and_redis_open_ai() } server_handler_config_1() } else { fn server_handler_config_2() -> MainAppHandler< AuthService, OtherAiMessageGen, > { MainAppHandler::new_with_my_sql_memcache_hugging_face() } server_handler_config_2() } } } ``` -------------------------------- ### CORS Configuration for Tauri Integration Source: https://github.com/leptos-rs/leptos/blob/main/projects/tauri-from-scratch/README.md Configures CORS middleware to allow GET and POST requests from 'tauri://localhost' and specifies allowed headers. This is crucial for server function calls from a Tauri app. ```rust let cors = CorsLayer::new() .allow_methods([axum::http::Method::GET, axum::http::Method::POST]) .allow_origin( "tauri://localhost" .parse::() .unwrap(), ) .allow_headers(vec![axum::http::header::CONTENT_TYPE]); ``` -------------------------------- ### Generate Local HTTPS Certificate with mkcert Source: https://github.com/leptos-rs/leptos/blob/main/projects/ory-kratos/README.md Use mkcert to generate locally signed certificates for HTTPS. This is necessary for using cookies with the `Secure` flag, which are only valid over HTTPS connections. Ensure mkcert is installed before running the command. ```sh mkcert -install localhost 127.0.0.1 ::1 ``` -------------------------------- ### Tauri Configuration for Build Process Source: https://github.com/leptos-rs/leptos/blob/main/projects/tauri-from-scratch/README.md Configures the Tauri build process, specifying the command to run before building ('trunk build') and the URL for the development server. ```json { "identifier": "leptos.chat.app", "productName": "leptos_tauri_from_scratch", "version": "0.1.0", "build": { "beforeDevCommand": "", "beforeBuildCommand": "trunk build --no-default-features -v --features \"csr\"", "devUrl": "http://127.0.0.1:3000", "frontendDist": "../dist" }, "bundle": { "active": true, "category": "DeveloperTool", "copyright": "", "externalBin": [], "icon": ["icons/icon.png"], "longDescription": "", "macOS": { "entitlements": null, "exceptionDomain": "", "frameworks": [], "providerShortName": null, "signingIdentity": null }, "resources": [], "shortDescription": "", "targets": "all", "windows": { "certificateThumbprint": null, "digestAlgorithm": "sha256", "timestampUrl": "" } }, "app": { "security": { "csp": null }, "windows": [ { "fullscreen": false, "height": 800, "resizable": true, "title": "LeptosChatApp", "width": 1200 } ] } } ``` -------------------------------- ### Create Cargo.toml files Source: https://github.com/leptos-rs/leptos/blob/main/projects/tauri-from-scratch/README.md Creates Cargo.toml files for both the Tauri and original source packages. ```sh touch src-tauri/Cargo.toml && touch src-orig/Cargo.toml ``` -------------------------------- ### Build Tauri Application Source: https://github.com/leptos-rs/leptos/blob/main/projects/tauri-from-scratch/README.md Command to build the Tauri application for release. This process includes running a 'beforeBuildCommand' which typically builds the frontend assets using Trunk. ```sh cargo tauri build ``` -------------------------------- ### Create Tauri build.rs Source: https://github.com/leptos-rs/leptos/blob/main/projects/tauri-from-scratch/README.md Creates the build.rs file required for Tauri's build process. ```sh touch src-tauri/build.rs ``` -------------------------------- ### Create Tauri Source Directories Source: https://github.com/leptos-rs/leptos/blob/main/projects/tauri-from-scratch/README.md Shell commands to create the necessary source directories and files for a Tauri application within a Leptos project. ```sh mkdir src-tauri/src && touch src-tauri/src/main.rs && touch src-tauri/src/lib.rs ``` -------------------------------- ### Run Full CI Profile Locally Source: https://github.com/leptos-rs/leptos/blob/main/CONTRIBUTING.md Simulate the GitHub Actions CI environment locally to perform comprehensive checks. This is the most thorough check before submitting a PR. ```bash cargo +nightly make --profile=github-actions ci ``` -------------------------------- ### Build and Watch with cargo-leptos Source: https://github.com/leptos-rs/leptos/blob/main/examples/SSR_NOTES.md Build the Leptos site in watch mode using `cargo-leptos`. This command automatically recompiles client and server code upon file changes, enabling a faster development cycle. Access the application at http://localhost:3000/. ```bash cargo leptos watch ``` -------------------------------- ### Production Build with cargo-leptos Source: https://github.com/leptos-rs/leptos/blob/main/examples/SSR_NOTES.md Generate a production-ready build of the Leptos application using `cargo-leptos`. The `--release` flag optimizes the build for performance. ```bash cargo leptos build --release ``` -------------------------------- ### E2E Testing Directory Structure Source: https://github.com/leptos-rs/leptos/blob/main/examples/regression/e2e/README.md Illustrates the standard directory layout for organizing end-to-end tests, including feature files, fixtures, and step definitions. ```bash features └── {action}_{object}.feature # Specify test scenarios tests ├── fixtures │ ├── action.rs # Perform a user action (click, type, etc.) │ ├── check.rs # Assert what a user can see/not see │ ├── find.rs # Query page elements │ ├── mod.rs │ └── world │ ├── action_steps.rs # Map Gherkin steps to user actions │ ├── check_steps.rs # Map Gherkin steps to user expectations │ └── mod.rs ``` -------------------------------- ### Original Source Cargo.toml Configuration Source: https://github.com/leptos-rs/leptos/blob/main/projects/tauri-from-scratch/README.md Configures the Leptos project with features for CSR, Hydration, and SSR, including optional dependencies. ```toml [package] name = "leptos_tauri_from_scratch" version = "0.1.0" edition = "2021" [lib] crate-type = ["staticlib", "cdylib", "rlib"] [[bin]] name = "leptos_tauri_from_scratch_bin" path = "./src/main.rs" [dependencies] axum = { version = "0.8.4", optional = true } axum-macros = { version = "0.5.0", optional = true } console_error_panic_hook = { version = "0.1.7", optional = true } leptos = { git = "https://github.com/leptos-rs/leptos.git", rev = "v0.8.2" } leptos_axum = { git = "https://github.com/leptos-rs/leptos.git", rev = "v0.8.2", optional = true } leptos_meta = { git = "https://github.com/leptos-rs/leptos.git", rev = "v0.8.2", optional = true } server_fn = { git = "https://github.com/leptos-rs/leptos.git", rev = "v0.8.2", optional = true } tokio = { version = "1.45.1", features = ["rt-multi-thread"], optional = true } tower = { version = "0.5.2", optional = true } tower-http = { version = "0.5.2", features = ["fs", "cors"], optional = true } wasm-bindgen = { version = "=0.2.100", optional = true } [features] csr = ["leptos/csr", "dep:server_fn"] hydrate = [ "leptos/hydrate", "dep:leptos_meta", "dep:console_error_panic_hook", "dep:wasm-bindgen" ] ssr = [ "dep:axum", "dep:axum-macros", "leptos/ssr", "dep:leptos_axum", "dep:leptos_meta", "leptos_meta/ssr", "dep:tower-http", "dep:tower", "dep:tokio", ] [package.metadata.leptos] bin-exe-name = "leptos_tauri_from_scratch_bin" output-name = "leptos_tauri_from_scratch" assets-dir = "../public" site-pkg-dir = "pkg" site-root = "target/site" site-addr = "0.0.0.0:3000" reload-port = 3001 browserquery = "defaults" watch = false env = "DEV" bin-features = ["ssr"] bin-default-features = false lib-features = ["hydrate"] lib-default-features = false ```