forked from srid/leptos-fullstack
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Cargo.toml
64 lines (58 loc) · 1.94 KB
/
Cargo.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
[package]
authors = ["Sridhar Ratnakumar <srid@srid.ca>"]
edition = "2021"
# If you change the name here, you must also do it in flake.nix (and run `cargo generate-lockfile` afterwards)
name = "leptos-fullstack"
version = "0.1.0"
[lib]
crate-type = ["cdylib", "rlib"]
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
axum = { version = "0.6", features = ["json", "tokio"], optional = true }
axum-macros = { version = "0.3", optional = true }
cfg-if = "1"
console_error_panic_hook = "0.1"
console_log = { version = "1" }
http = { version = "0.2", optional = true }
leptos = { version = "0.4", features = ["serde"] }
leptos_axum = { version = "0.4", optional = true }
leptos_meta = { version = "0.4" }
leptos_router = { version = "0.4" }
log = "0.4"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
tokio = { version = "1.29", features = ["full"], optional = true }
tower = { version = "0.4", optional = true }
tower-http = { version = "0.4", features = ["full"], optional = true }
wasm-bindgen = "=0.2.87" # The version here must match the pinned stuff in Nix flakes.
[features]
hydrate = ["leptos/hydrate", "leptos_meta/hydrate", "leptos_router/hydrate"]
ssr = [
"dep:axum-macros",
"dep:axum",
"dep:http",
"dep:leptos_axum",
"dep:tokio",
"dep:tower-http",
"dep:tower",
"leptos_meta/ssr",
"leptos_router/ssr",
"leptos/ssr",
]
# Defines a size-optimized profile for the WASM bundle in release mode
[profile.wasm-release]
inherits = "release"
opt-level = 'z'
lto = true
codegen-units = 1
panic = "abort"
[package.metadata.leptos]
site-addr = "127.0.0.1:3000"
tailwind-input-file = "css/input.css"
assets-dir = "assets"
bin-features = ["ssr"]
lib-features = ["hydrate"]
# The profile to use for the lib target when compiling for release
#
# Optional. Defaults to "release".
lib-profile-release = "wasm-release"