[package] name = "aac-web" version.workspace = true edition.workspace = true # public/symbols/ holds CC BY-SA 4.0 symbol sprites (see LICENSES.md there). license = "Apache-2.0 AND CC-BY-SA-4.0" repository.workspace = true authors.workspace = true publish = false description = "aac.transaction.science — reference AAC communication app for the AAC open standard, built with Leptos 0.8. Free forever." [lib] crate-type = ["cdylib", "rlib"] [[bin]] name = "aac-web" path = "src/main.rs" required-features = ["ssr"] [dependencies] # Internal — the AAC open standard reference engine + shared access kernel aac-core = { workspace = true } access-core = { workspace = true } # Leptos framework leptos = "0.8" leptos_router = "0.8" leptos_meta = "0.8" leptos_axum = { version = "0.8", optional = true } leptos_config = { version = "0.8", optional = true } # Common serde = { version = "1", features = ["derive"] } serde_json = "1" uuid = { version = "1", features = ["v4"] } chrono = { workspace = true } # The app's own words in the person's language (src/i18n.rs): Project Fluent # messages — stable ids, placeholders, CLDR plural rules, selectors. fluent-bundle = "0.16" unic-langid = "0.9" # Server (SSR only) axum = { version = "0.8", features = ["macros"], optional = true } axum-server = { version = "0.9", optional = true } tower = { version = "0.5", optional = true } tower-http = { version = "0.7", features = ["fs", "cors"], optional = true } tokio = { version = "1", features = ["full"], optional = true } tracing = { version = "0.1", optional = true } tracing-subscriber = { version = "0.3", features = ["env-filter"], optional = true } dotenvy = { version = "0.15", optional = true } # WASM (hydrate only). Pinned to the wasm-bindgen-cli version installed on the # build machine (0.2.114); js-sys/web-sys cascade to matching versions. wasm-bindgen = { version = "=0.2.114", optional = true } wasm-bindgen-futures = { version = "0.4", optional = true } web-sys = { version = "0.3", optional = true, features = [ "Window", "Document", "Element", "HtmlElement", "HtmlButtonElement", "HtmlInputElement", "HtmlTextAreaElement", "HtmlVideoElement", "HtmlMediaElement", "Node", "NodeList", "console", "Performance", "KeyboardEvent", "MouseEvent", "PointerEvent", "Event", "EventTarget", "SpeechSynthesis", "SpeechSynthesisUtterance", "SpeechSynthesisVoice", "SpeechSynthesisEvent", "MediaDevices", "MediaStream", "MediaStreamConstraints", "MediaRecorder", "MediaRecorderOptions", "Navigator", "BlobEvent", "CssStyleDeclaration", "DomRect", "Gamepad", "GamepadButton", "GamepadEvent", "Blob", "BlobPropertyBag", "Url", "File", "FileList", "FileReader", "Storage", "StorageEvent", "VisibilityState", "MediaQueryList", "ServiceWorkerContainer", "ServiceWorkerRegistration", "Location", # Auditory scanning's tone (cues.rs), panels scrolled to the highlight # (dialog_scan.rs), and the pointer and touch listeners (pointing.rs). "AudioContext", "BaseAudioContext", "AudioNode", "AudioParam", "GainNode", "OscillatorNode", "AudioDestinationNode", "AudioScheduledSourceNode", "ScrollIntoViewOptions", "ScrollLogicalPosition", "AddEventListenerOptions", "HtmlSelectElement", "HtmlOptionElement", "HtmlOptionsCollection", "EventInit", # A scene's layout follows the room its board has (components/scene_board.rs). "ResizeObserver", "ResizeObserverEntry", ] } js-sys = { version = "0.3", optional = true } gloo-timers = { version = "0.4", optional = true, features = ["futures"] } console_error_panic_hook = { version = "0.1", optional = true } [build-dependencies] # build.rs names each language's catalogue by its SHA-256, as the site serves it. sha2 = "0.11" [dev-dependencies] # tests/ui_strings.rs reads the catalogues' placeholders. fluent-syntax = "0.12" [features] default = [] # The optional symbol sets for non-commercial use (ARASAAC, Sclera): their # catalogue, the pack loader (src/bindings/symbol_packs.js) and everything in # the app that names them. A deployment that ships their packs builds with it # (aac-aurasense-web scripts/build-app.sh, only with AAC_NC_SYMBOLS=on); the # standard's own build does not. nc-symbols = ["aac-core/nc-symbols"] hydrate = [ "leptos/hydrate", "dep:wasm-bindgen", "dep:wasm-bindgen-futures", "dep:web-sys", "dep:js-sys", "dep:gloo-timers", "dep:console_error_panic_hook", ] ssr = [ "leptos/ssr", "dep:leptos_axum", "dep:leptos_config", "dep:axum", "dep:axum-server", "dep:tower", "dep:tower-http", "dep:tokio", "dep:tracing", "dep:tracing-subscriber", "dep:dotenvy", ] [package.metadata.leptos] bin-target = "aac-web" output-name = "aac-web" site-root = "target/site" site-pkg-dir = "pkg" style-file = "style/main.css" assets-dir = "public" site-addr = "127.0.0.1:3920" reload-port = 3921 bin-features = ["ssr"] lib-features = ["hydrate"] # On wasm32, uuid's v4 generator needs a browser randomness source. Feature # unification carries this to aac-core's UUID use too; the native server build # is unaffected. (Must stay at file end — a target table closes [dependencies].) [target.'cfg(target_arch = "wasm32")'.dependencies] uuid = { version = "1", features = ["js"] }