Skip to content

Commit

Permalink
docs: Add leptos-0.7 example (#465)
Browse files Browse the repository at this point in the history
  • Loading branch information
spencewenski authored Oct 20, 2024
1 parent 8a7a33d commit 876339c
Show file tree
Hide file tree
Showing 33 changed files with 1,215 additions and 64 deletions.
14 changes: 7 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ tower = { workspace = true, optional = true }
tower-http = { workspace = true, features = ["trace", "timeout", "request-id", "util", "normalize-path", "sensitive-headers", "catch-panic", "compression-full", "decompression-full", "limit", "cors"], optional = true }
aide = { workspace = true, features = ["axum", "redoc", "scalar", "macros"], optional = true }
schemars = { workspace = true, optional = true }
http-body-util = { version = "0.1.0", optional = true }
http-body-util = { version = "0.1.2", optional = true }
mime = { workspace = true, optional = true }

# DB
Expand Down Expand Up @@ -106,13 +106,13 @@ strum_macros = { workspace = true }
itertools = { workspace = true }
toml = "0.8.0"
url = { version = "2.5.0", features = ["serde"] }
uuid = { version = "1.1.2", features = ["v4", "serde"] }
futures = "0.3.21"
uuid = { version = "1.10.0", features = ["v4", "serde"] }
futures = "0.3.30"
futures-core = "0.3.31"
chrono = { version = "0.4.34", features = ["serde"] }
byte-unit = { version = "5.0.0", features = ["serde"] }
convert_case = "0.6.0"
const_format = "0.2.30"
const_format = "0.2.32"
typed-builder = { workspace = true }
num-traits = "0.2.14"
validator = { version = "0.18.0", features = ["derive"] }
Expand Down Expand Up @@ -141,7 +141,7 @@ async-trait = "0.1.74"
# HTTP APIs
aide = { version = "0.13.4", features = ["axum"] }
axum-core = "0.4.5"
axum = "0.7.4"
axum = "0.7.5"
axum-extra = "0.9.0"
tower-http = "0.6.0"
tower = "0.5.0"
Expand Down Expand Up @@ -174,7 +174,7 @@ rstest = { version = "0.23.0", default-features = false }

# Others
# Todo: minimize tokio features included in `roadster`
tokio = { version = "1.34.0", features = ["full"] }
tokio = { version = "1.39.0", features = ["full"] }
# For CancellationToken
tokio-util = { version = "0.7.10" }
anyhow = "1.0.86"
Expand All @@ -191,7 +191,7 @@ itertools = "0.13.0"
cargo-manifest = "0.15.0"
typed-builder = "0.20.0"
rand = "0.8.5"
thiserror = "1.0.49"
thiserror = "1.0.61"

[package.metadata.docs.rs]
# Have docs.rs pass `--all-features` to ensure all features have their documentation built.
Expand Down
6 changes: 4 additions & 2 deletions book/src/adding-a-ui/leptos.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Adding a UI with Leptos

For an example of how to use Leptos with Roadster, see
our [leptos-ssr example](https://github.com/roadster-rs/roadster/tree/main/examples/leptos-ssr).
For an example of how to use Leptos with Roadster, see our Leptos examples:

- [leptos-0.7-ssr](https://github.com/roadster-rs/roadster/tree/main/examples/leptos-0.7-ssr) - Leptos 0.7 example
- [leptos-ssr](https://github.com/roadster-rs/roadster/tree/main/examples/leptos-ssr) - Leptos 0.6 example
6 changes: 4 additions & 2 deletions book/src/comparisons/leptos.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,7 @@ the consumer to set up the backend using Axum or Actix. That's where Roaster com
configuring all the backend resources you need using Axum as the HTTP router. So, Roadster and Leptos can be used
together to easily build your full-stack web application fully in Rust.

For an example of how to use Leptos with Roadster, see
our [leptos-ssr example](https://github.com/roadster-rs/roadster/tree/main/examples/leptos-ssr).
For an example of how to use Leptos with Roadster, see our Leptos examples:

- [leptos-0.7-ssr](https://github.com/roadster-rs/roadster/tree/main/examples/leptos-0.7-ssr) - Leptos 0.7 example
- [leptos-ssr](https://github.com/roadster-rs/roadster/tree/main/examples/leptos-ssr) - Leptos 0.6 example
225 changes: 225 additions & 0 deletions examples/leptos-0.7-ssr/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,225 @@
# tmp files
*~*

env*/
/target
gen/

# Ignore Cargo.lock because this is a lib crate
Cargo.lock

# Generated by Cargo
# will have compiled files and executables
/target/
pkg

# These are backup files generated by rustfmt
**/*.rs.bk

# node e2e test tools and outputs
node_modules/
test-results/
../end2end/playwright-report/
playwright/.cache/

# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf

# Generated files
.idea/**/contentModel.xml

# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml

# Gradle
.idea/**/gradle.xml
.idea/**/libraries

# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/artifacts
# .idea/compiler.xml
# .idea/jarRepositories.xml
# .idea/modules.xml
# .idea/*.iml
# .idea/modules
# *.iml
# *.ipr

# CMake
cmake-build-*/

# Mongo Explorer plugin
.idea/**/mongoSettings.xml

# File-based project format
*.iws

# IntelliJ
out/

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Cursive Clojure plugin
.idea/replstate.xml

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties

# Editor-based Rest Client
.idea/httpRequests

# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Snowpack dependency directory (https://snowpack.dev/)
web_modules/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional stylelint cache
.stylelintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variable files
.env
.env.development.local
.env.test.local
.env.production.local
.env.local

# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache

# Next.js build output
.next
out

# Nuxt.js build / generate output
.nuxt
dist

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

# vuepress build output
.vuepress/dist

# vuepress v2.x temp and cache directory
.temp
.cache

# Docusaurus cache and generated files
.docusaurus

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# TernJS port file
.tern-port

# Stores VSCode versions used for testing VSCode extensions
.vscode-test

# yarn v2
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*
Loading

0 comments on commit 876339c

Please sign in to comment.