[package] name = "perseus" version = "0.4.2" edition = "2021" description = "A lightning-fast frontend web dev platform with full support for SSR and SSG." authors = ["arctic_hen7 "] license = "MIT" repository = "https://github.com/framesurge/perseus" homepage = "https://framesurge.sh/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.1", features = [ "ssr", "suspense" ] } sycamore-router = "0.8" sycamore-futures = "0.8" perseus-macro = { path = "../perseus-macro", version = "0.4.2", 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(engine)'.dependencies] regex = "1" tokio = { version = "1", features = [ "fs", "io-util" ] } fs_extra = "1" http = "0.2" urlencoding = "2.1" chrono = "0.4" # Be very careful about changing this! Patches may be required in Perseus. minify-html-onepass = "=0.10.8" # These dependencies will also be available in documentation [target.'cfg(any(client, clientdoc))'.dependencies] rexie = { version = "0.4", optional = true, default-features = false } js-sys = { version = "0.3", optional = true } # Note that this is not needed in production, but that can't be specified, so it will just be compiled away to nothing console_error_panic_hook = { version = "0.1.7", optional = true } # TODO review feature flags here web-sys = { version = "0.3", features = [ "Headers", "Navigator", "NodeList", "Request", "RequestInit", "RequestMode", "Response", "ReadableStream", "Window", "CustomEvent", "CustomEventInit" ] } 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", "minify", "minify-css", "cache-initial-load" ] translator-fluent = ["fluent-bundle", "unic-langid", "intl-memoizer"] translator-lightweight = [] # Suspends all `click` events at the document root until Perseus is fully loaded, then passing them through. suspended-interaction = [] # 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 the minification of HTML, CSS, and JS assets, improving your page load speeds. You should only disable this if you're having issues with invalid # HTML. minify = [] minify-js = [ "minify" ] minify-css = [ "minify" ] # This feature enables caching of pages that are loaded through the initial loads system (i.e. the first one the user goes to on your site); this involves making a # (usually excellent) guess at the contents of the `` on that page. If you perform any advanced manipulation of the `` such that loading a page from # scratch, going somewhere else, and then going back to it breaks something, disable this. cache-initial-load = [] # 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" ] # Enables reactive versions of common Rust collections, like `Vec` and `HashMap`. (Note that `RxResult` is always present, as it's needed for suspended state.) rx-collections = [] [package.metadata.docs.rs] rustc-args = ["--cfg=engine", "--cfg=clientdoc"] rustdoc-args = ["--cfg=engine", "--cfg=clientdoc"]