perseus 0.4.0-beta.6

A lightning-fast frontend web dev platform with full support for SSR and SSG.
Documentation
[package]
name = "perseus"
version = "0.4.0-beta.6"
edition = "2021"
description = "A lightning-fast frontend web dev platform with full support for SSR and SSG."
authors = ["arctic_hen7 <arctic_hen7@pm.me>"]
license = "MIT"
repository = "https://github.com/arctic-hen7/perseus"
homepage = "https://arctic-hen7.github.io/perseus"
readme = "../../README.md"
keywords = ["wasm", "frontend", "webdev", "ssg", "ssr"]
categories = ["wasm", "web-programming", "development-tools", "asynchronous", "gui"]

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
sycamore = { version = "=0.8.0-beta.7", features = [ "ssr" ] }
sycamore-router = "=0.8.0-beta.7"
sycamore-futures = "=0.8.0-beta.7"
perseus-macro = { path = "../perseus-macro", version = "0.4.0-beta.6", optional = true }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
thiserror = "1"
async-trait = "0.1"
futures = "0.3"
fmterr = "0.1"
fluent-bundle = { version = "0.15", optional = true }
unic-langid = { version = "0.9", optional = true }
intl-memoizer = { version = "0.5", optional = true }

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
regex = "1"
tokio = { version = "1", features = [ "fs", "io-util" ] }
fs_extra = "1"
http = "0.2"
urlencoding = "2.1"
chrono = "0.4"

[target.'cfg(target_arch = "wasm32")'.dependencies]
rexie = { version = "0.2", optional = true }
js-sys = { version = "0.3", optional = true }
console_error_panic_hook = { version = "0.1.6", optional = true }
# TODO review feature flags here
web-sys = { version = "0.3", features = [ "Headers", "Navigator", "NodeList", "Request", "RequestInit", "RequestMode", "Response", "ReadableStream", "Window" ] }
wasm-bindgen = "0.2"
wasm-bindgen-futures = "0.4"

[features]
# Live reloading will only take effect in development, and won't impact production
# BUG This adds 1.9kB to the production bundle (that's without size optimizations though)
default = [ "live-reload", "hsr", "client-helpers", "macros", "dflt-engine" ]
translator-fluent = ["fluent-bundle", "unic-langid", "intl-memoizer"]
translator-lightweight = []
# This feature adds support for a number of macros that will make your life MUCH easier (read: use this unless you have very specific needs or are completely insane)
macros = [ "perseus-macro" ]
# This feature enable support for functions that make using the default engine configuration much easier.
dflt-engine = []
# This features enables client-side helpers designed to be run in the browser.
client-helpers = [ "console_error_panic_hook" ]
# This feature enables Sycamore hydration by default (Sycamore hydration feature is always activated though)
# This is not enabled by default due to some remaining bugs (also, default features in Perseus can't be disabled without altering `.perseus/`)
hydrate = []
# This feature enables the preloading of the Wasm bundle for locale redirections, which in theory improves UX
# For now, this is experimental until it can be tested in the wild (local testing of this is extremely difficult for UX, we need real world metrics)
preload-wasm-on-redirect = []
# This exposes an API for saving frozen state to IndexedDB simply, with options for making your storage persistent so the browser won't delete it
idb-freezing = [ "rexie", "web-sys/StorageManager" ]
# Switches to expecting the server to provide a JS bundle that's been created from Wasm
# Note that this is highly experimental, and currently blocked by [rustwasm/wasm-bindgen#2735](https://github.com/rustwasm/wasm-bindgen/issues/2735)
# This is *deliberately* undocumented in `lib.rs`!
wasm2js = []
# Enables automatic browser reloading whenever you make a change
live-reload = [ "js-sys", "web-sys/WebSocket", "web-sys/MessageEvent", "web-sys/ErrorEvent", "web-sys/BinaryType", "web-sys/Location" ]
# Enables hot state reloading, whereby your entire app's state can be frozen and thawed automatically every time you change code in your app
hsr = [ "live-reload", "idb-freezing" ]