# WebComPy > WebComPy is a Python frontend framework running entirely in the browser via PyScript/Emscripten with SSR and static site generation (SSG) in standard CPython from a single codebase. **Core concepts** - **Dual-environment execution**: The same Python `webcompy` core code renders live DOM nodes in the browser (PyScript/Pyodide) and HTML strings on the server (CPython or server-side Emscripten/Pyodide ASGI), separating browser PyScript detection (`ENVIRONMENT == "pyscript"`) from Emscripten runtime mechanics (`IS_EMSCRIPTEN`, i.e., `platform.system() == "Emscripten"`) and switching ports via dependency injection (`RenderContext`). - **Reactivity by default**: `Signal`, `Computed`, `ReactiveList`, and `ReactiveDict` track dependencies automatically and update bound DOM text, attributes, lists (`repeat`), and conditional branches (`switch`) without manual DOM orchestration. - **Light DOM custom elements**: Components are Python functions decorated with `@define_component()` returning virtual element trees with props, slots, lifecycle hooks (`on_before_rendering`, `on_mounted`, `on_before_destroy`), and component-scoped CSS. - **SSR hydration transfer**: State created inside component setup with `use_state`, `use_computed`, `use_reactive_list`, `use_reactive_dict`, and `use_async_result` (and `HttpClient` / `load_text` results) transfers cleanly from SSR/SSG HTML into the browser without flash or double-fetching. - **ASGI coexistence**: WebComPy dev/prod servers are standard Starlette ASGI applications that can mount sub-apps (`WebComPyServerConfig.mounts`) or be embedded inside host FastAPI/Starlette applications, alongside typed JSON-RPC (`webcompy.rpc`). - **Current installation note**: Until the latest releases are published on PyPI, `webcompy`, `webcompy-server`, `webcompy-cli`, and `webcompy-testing` are installed via GitHub `#subdirectory=packages/` URLs (see Installation), while PyScript resolves `webcompy` from PyPI/wheels. **Important notes** - Always call `@define_component()` with parentheses; omitting arguments derives the custom-element tag from the function name (`HomePage` -> ``), and passing `"custom-tag"` overrides it explicitly. - Create reactive state via `use_state` / `use_reactive_list` / `use_reactive_dict` inside component setup functions when SSR-to-browser value transfer is needed. - No JavaScript build step or Node.js bundler is required for WebComPy applications. - Keep server/build configuration (`WebComPyBuildConfig`, `WebComPyServerConfig`, `StaticRoute`) in `webcompy_config.py`; keep browser-visible runtime config (`WebComPyAppConfig`) in your app module so server-only code never enters the browser wheel. - Prefer typed RPC contracts (`Procedure`, `StreamingProcedure`, `Subscription`) bound to `app.rpc` (`ProcedureRegistry`) and called via `RpcHttpClient` / `RpcWsClient` over ad-hoc untyped RPC endpoints. **Minimal working example** ```python from webcompy.app import WebComPyApp from webcompy.components import ComponentContext, define_component from webcompy.elements import DOMEvent, html from webcompy.signal import use_computed, use_state @define_component() def CounterApp(context: ComponentContext[None]): count = use_state(lambda: 0) doubled = use_computed(lambda: count.value * 2) def increment(_ev: DOMEvent) -> None: count.value += 1 return html.DIV( {}, html.H1({}, "Counter"), html.P({}, "Count: ", count, " (doubled: ", doubled, ")"), html.BUTTON({"@click": increment}, "+1"), ) app = WebComPyApp(root_component=CounterApp) ``` Serve locally with `uv run python -m webcompy start --dev`, materialize deployable artifacts once with `uv run python -m webcompy prebuild` (and run `start --prebuilt`), or export static HTML/wheels with `uv run python -m webcompy generate` (browser-only standalone usage calls `app.run()`). **Essential API cheat sheet** | Area | Module | Core Public Symbols | Purpose | |---|---|---|---| | App & Components | `webcompy.app`, `webcompy.components` | `WebComPyApp`, `WebComPyAppConfig`, `PluginScript`, `PrePaintStyle`, `pre_paint_vars`, `use_pre_paint_style`, `define_component`, `ComponentContext`, `on_before_rendering`, `on_mounted`, `on_before_destroy` | App bootstrap, config, pre-paint scripts/styles, Light DOM components, lifecycle hooks | | Reactive State | `webcompy.signal` | `Signal`, `Computed`, `ReactiveList`, `ReactiveDict`, `use_state`, `use_computed`, `use_reactive_list`, `use_reactive_dict`, `use_readonly_signal`, `effect` | Reactive state primitives, setup-scoped transfer state, tracked side effects | | Elements & Flow | `webcompy.elements` | `html`, `DOMEvent`, `DomNodeRef`, `repeat`, `switch`, `Suspense`, `ErrorBoundary`, `ClientOnly`, `Teleport`, `Transition` | Typed HTML builders, keyed list reconciliation, async/error/portal/animation boundaries | | Templates & Assets | `webcompy.template`, `webcompy.resources` | `render_template`, `load_markdown_document`, `css_text`, `load_text`, `load_bytes` | HTML template interpolation, Markdown loading, package resource access | | Routing & DI | `webcompy.router`, `webcompy.di` | `Router`, `RouterLink`, `RouterView`, `RouterContext`, `use_router`, `lazy`, `InjectKey`, `provide`, `inject` | History/hash SPA routing, lazy routes, scoped dependency injection | | Async, HTTP & Forms | `webcompy.components`, `webcompy.ajax`, `webcompy.forms` | `use_async_result`, `use_async`, `HttpClient`, `Response`, `from_json`, `Field`, `Form`, `use_field`, `use_form`, `required`, `email` | Async setup data, typed HTTP client, reactive fields and validation | | Realtime & RPC | `webcompy.realtime`, `webcompy.rpc` | `use_event_source`, `use_websocket`, `Procedure`, `StreamingProcedure`, `Subscription`, `RpcHttpClient`, `RpcWsClient`, `ProcedureRegistry`, `batch`, `notify` | Shared SSE/WebSocket composables and contract-first typed JSON-RPC | | UI & i18n | `webcompy.ui`, `webcompy.ui.code_block`, `webcompy.i18n` | `CodeBlock`, `Input`, `Select`, `Modal`, `Drawer`, `Dropdown`, `Tabs`, `Alert`, `Card`, `Spinner`, `use_i18n`, `I18nManager` | First-party accessible UI primitives and SSR-consistent internationalization | | Server, CLI & Testing | `webcompy_server`, `webcompy_cli`, `webcompy_cli.config`, `webcompy_testing` | `configure_server_context`, `generate_html`, `create_asgi_app`, `create_prebuilt_asgi_app`, `prebuild_app`, `generate_static_site`, `run_server`, `PrebuildManifest`, `WebComPyBuildConfig`, `WebComPyServerConfig`, `StaticRoute`, `PWAConfig`, `TestRenderer`, `create_test_asgi_app`, `render_app_html` | ASGI embedding, dev/prod/prebuilt server, SSG export, headless component & ASGI testing | **Context bundles and Markdown endpoints** - Index only (overview, essential API cheat sheet, and `.md` page links — smallest file, tens of KB): https://webcompy.net/llms.txt - Compact single-file bundle (smaller alternative to `llms-full.txt` with Getting Started, Basic Usage, and Server & Tooling inlined; larger than the index, hundreds of KB): https://webcompy.net/llms-small.txt - Complete single-file bundle (all documentation pages with runnable demo sources inlined; ~1 MB+): https://webcompy.net/llms-full.txt - Per-page raw Markdown: append `.md` to any documentation page URL (for example, https://webcompy.net/documents/basic/components.md). ## Getting Started - [What is WebComPy](https://webcompy.net/documents/getting-started/what-is-webcompy.md): Framework positioning, the dual-environment model, core promises, and the relationship to FastAPI and Starlette. - [Why WebComPy](https://webcompy.net/documents/getting-started/why-webcompy.md): Why you might choose WebComPy — and an honest account of when you should not. - [Installation](https://webcompy.net/documents/getting-started/installation.md): How to install WebComPy and set up a project with uv or Poetry. - [Quickstart](https://webcompy.net/documents/getting-started/quickstart.md): Create a WebComPy project, start the dev server, and render your first component. - [Project Structure](https://webcompy.net/documents/getting-started/project-structure.md): The layout of a WebComPy app package, build vs server configuration, static files, resources, and the lockfile. ## Guides - [Guides Overview](https://webcompy.net/documents/guides/overview.md): Build a complete six-step ToDo application with WebComPy, covering reactive state, components, routing, forms, remote data, and static deployment. - [Step 1 — App Shell and Reactive State](https://webcompy.net/documents/guides/todo-app-shell.md): Model tasks in a ReactiveList, track a filter signal with use_state, derive counts and filtered views with use_computed, and render keyed lists with repeat(). - [Step 2 — Components](https://webcompy.net/documents/guides/todo-components.md): Extract TodoItem and TodoToolbar into reusable @define_component() components using props, named slots, and component-scoped styles. - [Step 3 — Navigation](https://webcompy.net/documents/guides/todo-navigation.md): Add client-side routes for All, Active, and Done views using flat Router definitions, RouterLink active classes, and RouterView inside TodoApp. - [Step 4 — Forms](https://webcompy.net/documents/guides/todo-forms.md): Add a validated task-creation form with use_field(), use_form(), FormField, and Input, and toggle task completion with Checkbox. - [Step 5 — Remote Data](https://webcompy.net/documents/guides/todo-remote-data.md): Load and mutate tasks over HTTP using HttpClient, dataclass decoding, and use_async_result(), backed by a client-side FetchMiddleware mock. - [Step 6 — Deploy](https://webcompy.net/documents/guides/todo-deploy.md): Wrap routed views in ErrorBoundary for runtime resilience, generate a static site bundle with webcompy generate, and understand hydration versus browser fetching. ## Basic Usage - [Components](https://webcompy.net/documents/basic/components.md): Define Light DOM components with @define_component(), receive props and slots, hook into lifecycle events, and apply static scoped styles. - [HTML Templates](https://webcompy.net/documents/basic/template-html.md): Render WebComPy Element trees from HTML strings with reactive {{ }} interpolation, safe expressions, filters, conditionals, loops, events, and component tags. - [Reactive State](https://webcompy.net/documents/basic/reactive-state.md): Manage fine-grained UI state with Signal, Computed, ReactiveList, ReactiveDict, transfer-capable use_* composables, and effect(). - [Elements & Events](https://webcompy.net/documents/basic/elements-and-events.md): Build reactive DOM trees directly in Python with the html namespace, repeat(), switch(), DOMEvent handlers, and DomNodeRef. - [Markdown Documents](https://webcompy.net/documents/basic/markdown-documents.md): Render Markdown strings with render_markdown(), load frontmatter-backed documents with load_markdown_document(), extract TOC headings, and apply prose.css. - [Routing](https://webcompy.net/documents/basic/routing.md): Configure client-side routes with Router, RouterView, RouterLink, route parameters, query strings, hash vs history modes, and use_router(). - [Forms](https://webcompy.net/documents/basic/forms.md): Manage reactive form state and validation with use_field(), use_form(), two-way :bind attributes, and first-party UI form controls. - [HTTP & Async](https://webcompy.net/documents/basic/http-and-async.md): Fetch HTTP endpoints with HttpClient, decode responses into Python types with response_type, and render loading/success/error UI with use_async_result(). - [Styling & Themes](https://webcompy.net/documents/basic/styling-and-themes.md): Style components with scoped dicts or css_text(), understand the CSS @layer cascade, register app-level styles, and toggle themes with use_theme(). - [Storage](https://webcompy.net/documents/basic/storage.md): Persist reactive Signal state in browser localStorage and sessionStorage with use_local_storage() and use_session_storage(). - [Error Handling](https://webcompy.net/documents/basic/error-handling.md): Isolate subtree rendering and event errors with ErrorBoundary, render custom fallback UI, and allow users to retry via reset(). - [UI Primitives](https://webcompy.net/documents/basic/ui-primitives.md): The two-layer first-party component model — headless behavior cores and token-themed skins — with the Spinner as the worked example. - [Overlay Components](https://webcompy.net/documents/basic/overlay.md): Build accessible Modal, Drawer, Dropdown, and Toast overlays with Teleport, Transition animations, and keyboard management. - [Disclosure & Feedback](https://webcompy.net/documents/basic/disclosure.md): Show/hide content with Tabs, Collapse, and Accordion, and surface status with Alert, Progress, Badge, Skeleton, and Card components. ## Advanced Usage - [Read-only Signals and Events](https://webcompy.net/documents/advanced/readonly-signal.md): Realtime & RPC: Expose reactive state to consumers without letting them mutate it — use_readonly_signal, use_window_event, use_document_event, lifecycle chaining, and SSR behavior. - [Signals and Streams](https://webcompy.net/documents/advanced/signal-stream.md): Realtime & RPC: Bridge occurrence-based async streams and reactive cell state — choose between cells and occurrences, convert feeds with to_signal and to_reactive_list, and stream signal updates with to_async_iter. - [Server-Sent Events](https://webcompy.net/documents/advanced/event-source.md): Realtime & RPC: Stream unidirectional server events into WebComPy components with use_event_source — shared registries, named event filtering, POST streaming, Last-Event-ID resumption, and SSR degradation. - [WebSocket](https://webcompy.net/documents/advanced/websocket.md): Realtime & RPC: Open bidirectional text connections with use_websocket — connection sharing, exponential backoff with jitter, close introspection, disconnected send buffering, and gap recovery. - [Typed Realtime](https://webcompy.net/documents/advanced/typed-realtime.md): Realtime & RPC: Send and receive dataclass-typed WebSocket messages with use_websocket(message_type=...) — metadata-typed fields, strict reconstruction, error signals, and custom allowlisted codecs. - [RPC Contracts](https://webcompy.net/documents/advanced/rpc-contracts.md): Realtime & RPC: Primary entry point for typed WebComPy RPC — transport routing guide, shared Procedure/StreamingProcedure/Subscription contracts, batch and notify helpers, server binding, and middleware. - [RPC](https://webcompy.net/documents/advanced/rpc.md): Realtime & RPC: HTTP transport for WebComPy JSON-RPC — RpcHttpClient, Starlette dispatcher mounting, strict typed decoding, error handling, SSR baking, and manual transport appendix. - [RPC over WebSocket](https://webcompy.net/documents/advanced/rpc-websocket.md): Realtime & RPC: Run typed RPC calls, batches, notifications, and cursor-replayed subscriptions over a single shared auto-reconnecting WebSocket with RpcWsClient. - [RPC Streaming](https://webcompy.net/documents/advanced/rpc-streaming.md): Realtime & RPC: Stream finite, call-scoped typed responses from server generators with StreamingProcedure and RpcStream over HTTP SSE or WebSocket, including lifecycle states, cancellation, and SSR fallback. - [SSR & SSG](https://webcompy.net/documents/advanced/ssr-and-ssg.md): Rendering & Performance: Understand WebComPy's dual-environment render pipeline, dev/prod/generate modes, per-request RenderContext isolation, and self-site fetch handling during pre-rendering. - [Hydration & Data Transfer](https://webcompy.net/documents/advanced/hydration-and-transfer.md): Rendering & Performance: How WebComPy adopts server-rendered DOM nodes, scopes state transfer to the initial hydration window, encodes Python types, compresses payloads, and avoids navigation flicker. - [Async Rendering & Boundaries](https://webcompy.net/documents/advanced/async-rendering-and-boundaries.md): Rendering & Performance: Author async components cleanly, coordinate Suspense and ClientOnly across SSR and hydration, and understand how AsyncSchedulerPort gates the initial page reveal. - [Transition](https://webcompy.net/documents/advanced/transition.md): Rendering & Performance: Animate appearing and disappearing conditional elements using WebComPy's Vue-compatible Transition class protocol, duration resolution, and reduced-motion support. - [Teleport](https://webcompy.net/documents/advanced/teleport.md): Rendering & Performance: Relocate modals, drawers, and overlays to external DOM containers like body with Teleport, preserving reactive bindings, SSR block emission, and hydration order. - [Loading Screen](https://webcompy.net/documents/advanced/loading-screen.md): Rendering & Performance: Configure the boot-time loading experience — presentation modes, interaction policies, staged progress, dormant wake-up timing, custom templates, and accessibility. - [Styling Deep Dive](https://webcompy.net/documents/advanced/styling-deep-dive.md): Rendering & Performance: Master WebComPy's full CSS @layer cascade, css_text_template(), reactive component styles, unlayered app.append_style() helpers, incremental style injection, and :host patterns. - [Progressive Web App](https://webcompy.net/documents/advanced/pwa.md): Rendering & Performance: Enable installability and offline support declaratively with PWAConfig — build-time Web App Manifest and framework-owned Service Worker generation, precaching, runtime caching decision rules, and offline navigation fallback. - [Dependency Injection Deep Dive](https://webcompy.net/documents/advanced/dependency-injection-deep-dive.md): Architecture & Integration: Understand WebComPy's hierarchical DIScope tree, lazy component child scopes, per-render-context port isolation, and clean service/fake overrides in unit tests. - [Middleware](https://webcompy.net/documents/advanced/middleware.md): Architecture & Integration: Intercept HTTP and JSON-RPC operations with stackable FetchMiddleware and RpcMiddleware chains, DI-scoped additive registries, streaming header resolution, and plugin hooks. - [Routing Deep Dive](https://webcompy.net/documents/advanced/routing-deep-dive.md): Architecture & Integration: Build multi-level layouts and guarded navigation with nested RouterPage children, RouterView depth reuse, lazy() preloading, async route guards, and automatic scroll restoration. - [Plugins](https://webcompy.net/documents/advanced/plugins.md): Architecture & Integration: Extend WebComPy applications with WebComPyPlugin subclasses — lifecycle hooks, DI providers, fetch and RPC middleware aggregation, and conditional PluginScript tags. - [Typed API Deep Dive](https://webcompy.net/documents/advanced/typed-api-deep-dive.md): Architecture & Integration: Decode plain JSON endpoints with from_json strictness modes, preserve non-JSON Python types via encode_with_meta and FastAPI TypedJSONResponse, and submit multipart forms through FetchPort. - [UI Headless Contract](https://webcompy.net/documents/advanced/ui-headless-contract.md): Architecture & Integration: Understand WebComPy's two-layer UI architecture — zero-style webcompy.ui.headless behavior primitives, data-state vocabularies, class_name pass-through, DI-scoped FormField wiring, and custom theme authoring. - [Custom Elements](https://webcompy.net/documents/advanced/custom-elements.md): Architecture & Integration: Author Light DOM custom-element components with @define_component() — multi-root wrappers, document connection hooks, observed attributes, registry reuse, hydration upgrade order, and :host styling. - [Persistence Patterns](https://webcompy.net/documents/advanced/persistence-patterns.md): Architecture & Integration: Share state safely across browser tabs and page reloads — compare localStorage, sessionStorage, hydration transfer, cookies, and URL state, and understand sync_tabs=True event coalescing and SSR semantics. - [Internationalization](https://webcompy.net/documents/advanced/i18n.md): Architecture & Integration: Add multi-language support with webcompy.i18n — DI-managed I18nManager, dot-path catalogs with interpolation and CLDR plurals, fallback chains, cookie-only persistence, and deterministic SSR/hydration parity. ## Server & Tooling - [CLI Reference](https://webcompy.net/documents/server/cli-reference.md): Complete command and flag reference for python -m webcompy, exit behavior, lockfile workflows, and browser inspection via webcompy inspect. - [Project Configuration](https://webcompy.net/documents/server/project-configuration.md): Structure browser and server settings across pyproject.toml and webcompy_config.py, configure resource allow-lists, and manage webcompy-lock.json. - [ASGI Integration](https://webcompy.net/documents/server/asgi-integration.md): Embed WebComPy inside an existing FastAPI or Starlette host ASGI application with base_url alignment, or mount child ASGI apps under WebComPy. - [Serving Modes](https://webcompy.net/documents/server/serving-modes.md): Understand dependency classification, CDN vs local runtime/WASM serving, standalone builds, bundled vs split wheel modes, and offline deployments. - [Testing](https://webcompy.net/documents/server/testing.md): Test WebComPy components, signals, HTTP clients, and SSR/ASGI apps without a browser using webcompy_testing, TestRenderer, and fake ports. ## API Reference - [App & Components API](https://webcompy.net/documents/api/app-and-components.md): API reference for webcompy.app, webcompy.components, webcompy.plugin, webcompy.exception, and webcompy.utils. - [Template & Markdown API](https://webcompy.net/documents/api/template-and-markdown.md): API reference for webcompy.template including HTML template rendering, AST nodes, CSS helpers, and Markdown parsing. - [Reactivity API](https://webcompy.net/documents/api/reactivity.md): API reference for webcompy.signal reactive containers, computed signals, effects, collections, and composables. - [Elements, Routing & DI API](https://webcompy.net/documents/api/elements-and-routing.md): API reference for webcompy.elements, webcompy.router, and webcompy.di. - [Data, Forms & i18n API](https://webcompy.net/documents/api/data.md): API reference for webcompy.ajax, webcompy.aio, webcompy.forms, webcompy.storage, webcompy.events, webcompy.resources, webcompy.realtime, and webcompy.i18n. - [UI & Theme API](https://webcompy.net/documents/api/ui.md): API reference for webcompy.ui components, headless primitives, theme management, styles, and code blocks. - [Server, CLI, RPC & Ports API](https://webcompy.net/documents/api/server-and-cli.md): API reference for webcompy_server, webcompy_cli, webcompy.rpc, webcompy.hydration, and webcompy.ports. - [Testing API](https://webcompy.net/documents/api/testing.md): API reference for webcompy_testing component rendering, ASGI helpers, fake ports, and browser test runner. ## Optional - [Hello World](https://webcompy.net/documents/examples/hello-world.md): Minimal WebComPy application demonstrating @define_component, ComponentContext, html helpers, and WebComPyApp bootstrapping. - [ToDo List](https://webcompy.net/documents/examples/todo.md): Reactive list and dictionary mutations, fine-grained derived counts, DomNodeRef inputs, child components, and scoped CSS in a browser ToDo app. - [Forms](https://webcompy.net/documents/examples/forms.md): Complete form built with use_field, use_form, validators, and accessible first-party WebComPy UI form controls (Input, Select, Textarea, Checkbox, Switch, RadioGroup, FormField). - [Routing](https://webcompy.net/documents/examples/routing.md): Nested child routes with preserved parent layout state, dynamic path parameters, and a before_route_change redirect guard running in an isolated hash-mode router. - [Storage Sync](https://webcompy.net/documents/examples/storage-sync.md): Live cross-tab and cross-window state synchronization using use_local_storage(sync_tabs=True) demonstrated with two same-origin demo windows. - [Transition](https://webcompy.net/documents/examples/transition.md): CSS-driven enter and leave animations for conditional elements using WebComPy's Transition wrapper, timed cleanup, and reduced-motion support. - [Teleport](https://webcompy.net/documents/examples/teleport.md): Relocate modals and floating dropdowns into document.body using Teleport while preserving component signals, event handlers, and scoped CSS. - [i18n Playground](https://webcompy.net/documents/examples/i18n-playground.md): Reactive internationalization demo showing webcompy.i18n factory provisioning, use_i18n() catalogs, parameter interpolation, and CLDR pluralization. - [Matplotlib](https://webcompy.net/documents/examples/matplotlib.md): Running WASM scientific libraries (NumPy and Matplotlib) inside an isolated PyScript iframe and rendering reactive base64 charts. - [HTTP Fetch](https://webcompy.net/documents/examples/http-fetch.md): Fetching JSON endpoints with HttpClient and decoding objects, lists, scalars, and raw responses using dataclass response_type annotations. - [Fetch Middleware](https://webcompy.net/documents/examples/fetch-middleware.md): Stackable FetchMiddleware chains adding trace headers and mocking a /api/notes REST endpoint inside a serverless static app. - [RPC Middleware](https://webcompy.net/documents/examples/rpc-middleware.md): Contract-first typed Procedure and batch() RPC calls answered in-browser by RpcMiddleware response synthesis, plus server registration reference. - [Migrating from Jinja2 + FastAPI](https://webcompy.net/documents/migration/from-jinja2-fastapi.md): Architecture guide, ASGI strangler integration, live before/after comparison, and phase-by-phase checklist for teams migrating from Jinja2 templates and FastAPI. - [Jinja2 Compatibility Notes](https://webcompy.net/documents/migration/compatibility-notes.md): Complete matrix mapping Jinja2 directives, filters, expressions, tests, and HTML behavior to WebComPy's reactive template compiler with exact exception messages. - [Compact Context Bundle](https://webcompy.net/llms-small.txt): Smaller single-file alternative to llms-full.txt containing Getting Started, Basic Usage, and Server & Tooling (larger than this index; hundreds of KB). - [Full Context Bundle](https://webcompy.net/llms-full.txt): Complete single-file bundle concatenating all 79 documentation pages with runnable demo sources (~1 MB+).