diff --git a/Cargo.lock b/Cargo.lock
index 8074b12b17..ad8a17a355 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -4221,6 +4221,17 @@ dependencies = [
"libc",
]
+[[package]]
+name = "crates-io-readme"
+version = "0.1.0"
+dependencies = [
+ "anyhow",
+ "ignore",
+ "pulldown-cmark",
+ "pulldown-cmark-to-cmark",
+ "walkdir",
+]
+
[[package]]
name = "crc"
version = "2.1.0"
@@ -12731,6 +12742,33 @@ dependencies = [
"syn 1.0.109",
]
+[[package]]
+name = "pulldown-cmark"
+version = "0.13.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1e8bbe1a966bd2f362681a44f6edce3c2310ac21e4d5067a6e7ec396297a6ea0"
+dependencies = [
+ "bitflags 2.9.1",
+ "memchr",
+ "pulldown-cmark-escape",
+ "unicase",
+]
+
+[[package]]
+name = "pulldown-cmark-escape"
+version = "0.11.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "007d8adb5ddab6f8e3f491ac63566a7d5002cc7ed73901f72057943fa71ae1ae"
+
+[[package]]
+name = "pulldown-cmark-to-cmark"
+version = "21.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e5b6a0769a491a08b31ea5c62494a8f144ee0987d86d670a8af4df1e1b7cde75"
+dependencies = [
+ "pulldown-cmark",
+]
+
[[package]]
name = "qoi"
version = "0.4.1"
diff --git a/Cargo.toml b/Cargo.toml
index 06c12b87c9..f8d9512d07 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -97,6 +97,9 @@ members = [
"packages/subsecond/subsecond-tests/cross-tls-crate-dylib",
"packages/subsecond/subsecond-tests/cross-tls-test",
+ # tools
+ "packages/crates-io-readme",
+
# Full project examples
"example-projects/fullstack-hackernews",
"example-projects/ecommerce-site",
diff --git a/packages/autofmt/README-docs-rs.md b/packages/autofmt/README-docs-rs.md
new file mode 100644
index 0000000000..4236eef150
--- /dev/null
+++ b/packages/autofmt/README-docs-rs.md
@@ -0,0 +1,43 @@
+# dioxus-autofmt
+
+[![Crates.io][crates-badge]][crates-url]
+[![MIT licensed][mit-badge]][mit-url]
+[![Build Status][actions-badge]][actions-url]
+[![Discord chat][discord-badge]][discord-url]
+
+[crates-badge]: https://img.shields.io/crates/v/dioxus-autofmt.svg
+[crates-url]: https://crates.io/crates/dioxus-autofmt
+[mit-badge]: https://img.shields.io/badge/license-MIT-blue.svg
+[mit-url]: https://github.com/dioxuslabs/dioxus/blob/main/LICENSE-MIT
+[actions-badge]: https://github.com/dioxuslabs/dioxus/actions/workflows/main.yml/badge.svg
+[actions-url]: https://github.com/dioxuslabs/dioxus/actions?query=workflow%3ACI+branch%3Amaster
+[discord-badge]: https://img.shields.io/discord/899851952891002890.svg?logo=discord&style=flat-square
+[discord-url]: https://discord.gg/XgGxMSkvUM
+
+[Website](https://dioxuslabs.com) |
+[Guides](https://dioxuslabs.com/learn/0.6) |
+[API Docs](https://docs.rs/dioxus-autofmt/latest/dioxus_autofmt) |
+[Chat](https://discord.gg/XgGxMSkvUM)
+
+## Overview
+
+`dioxus-autofmt` provides a pretty printer for the `rsx` syntax tree.
+
+This is done manually with a via set of formatting rules. The output is not guaranteed to be stable between minor versions of the crate as we might tweak the output.
+
+`dioxus-autofmt` provides an API to perform precision edits as well as just spit out a block of formatted RSX from any RSX syntax tree. This is used by the `rsx-rosetta` crate which can accept various input languages and output valid RSX.
+
+## Contributing
+
+- Report issues on our [issue tracker](https://github.com/dioxuslabs/dioxus/issues).
+- Join the discord and ask questions!
+
+## License
+
+This project is licensed under the [MIT license].
+
+[mit license]: https://github.com/dioxuslabs/dioxus/blob/main/LICENSE-MIT
+
+Unless you explicitly state otherwise, any contribution intentionally submitted
+for inclusion in Dioxus by you shall be licensed as MIT without any additional
+terms or conditions.
diff --git a/packages/autofmt/README.md b/packages/autofmt/README.md
index 4236eef150..7c06b3b54b 100644
--- a/packages/autofmt/README.md
+++ b/packages/autofmt/README.md
@@ -1,3 +1,4 @@
+
# dioxus-autofmt
[![Crates.io][crates-badge]][crates-url]
@@ -5,15 +6,6 @@
[![Build Status][actions-badge]][actions-url]
[![Discord chat][discord-badge]][discord-url]
-[crates-badge]: https://img.shields.io/crates/v/dioxus-autofmt.svg
-[crates-url]: https://crates.io/crates/dioxus-autofmt
-[mit-badge]: https://img.shields.io/badge/license-MIT-blue.svg
-[mit-url]: https://github.com/dioxuslabs/dioxus/blob/main/LICENSE-MIT
-[actions-badge]: https://github.com/dioxuslabs/dioxus/actions/workflows/main.yml/badge.svg
-[actions-url]: https://github.com/dioxuslabs/dioxus/actions?query=workflow%3ACI+branch%3Amaster
-[discord-badge]: https://img.shields.io/discord/899851952891002890.svg?logo=discord&style=flat-square
-[discord-url]: https://discord.gg/XgGxMSkvUM
-
[Website](https://dioxuslabs.com) |
[Guides](https://dioxuslabs.com/learn/0.6) |
[API Docs](https://docs.rs/dioxus-autofmt/latest/dioxus_autofmt) |
@@ -36,8 +28,16 @@ This is done manually with a via set of formatting rules. The output is not guar
This project is licensed under the [MIT license].
-[mit license]: https://github.com/dioxuslabs/dioxus/blob/main/LICENSE-MIT
-
Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in Dioxus by you shall be licensed as MIT without any additional
terms or conditions.
+
+[crates-badge]: https://img.shields.io/crates/v/dioxus-autofmt.svg
+[crates-url]: https://crates.io/crates/dioxus-autofmt
+[mit-badge]: https://img.shields.io/badge/license-MIT-blue.svg
+[mit-url]: https://github.com/dioxuslabs/dioxus/blob/main/LICENSE-MIT
+[actions-badge]: https://github.com/dioxuslabs/dioxus/actions/workflows/main.yml/badge.svg
+[actions-url]: https://github.com/dioxuslabs/dioxus/actions?query=workflow%3ACI+branch%3Amaster
+[discord-badge]: https://img.shields.io/discord/899851952891002890.svg?logo=discord&style=flat-square
+[discord-url]: https://discord.gg/XgGxMSkvUM
+[MIT license]: https://github.com/dioxuslabs/dioxus/blob/main/LICENSE-MIT
\ No newline at end of file
diff --git a/packages/autofmt/src/lib.rs b/packages/autofmt/src/lib.rs
index 553df27bb5..94f86cac1f 100644
--- a/packages/autofmt/src/lib.rs
+++ b/packages/autofmt/src/lib.rs
@@ -1,4 +1,4 @@
-#![doc = include_str!("../README.md")]
+#![doc = include_str!("../README-docs-rs.md")]
#![doc(html_logo_url = "https://avatars.githubusercontent.com/u/79236386")]
#![doc(html_favicon_url = "https://avatars.githubusercontent.com/u/79236386")]
diff --git a/packages/check/README-docs-rs.md b/packages/check/README-docs-rs.md
new file mode 100644
index 0000000000..e735e7d5c4
--- /dev/null
+++ b/packages/check/README-docs-rs.md
@@ -0,0 +1,39 @@
+# dioxus-check
+
+[![Crates.io][crates-badge]][crates-url]
+[![MIT licensed][mit-badge]][mit-url]
+[![Build Status][actions-badge]][actions-url]
+[![Discord chat][discord-badge]][discord-url]
+
+[crates-badge]: https://img.shields.io/crates/v/dioxus-autofmt.svg
+[crates-url]: https://crates.io/crates/dioxus-check
+[mit-badge]: https://img.shields.io/badge/license-MIT-blue.svg
+[mit-url]: https://github.com/dioxuslabs/dioxus/blob/main/LICENSE-MIT
+[actions-badge]: https://github.com/dioxuslabs/dioxus/actions/workflows/main.yml/badge.svg
+[actions-url]: https://github.com/dioxuslabs/dioxus/actions?query=workflow%3ACI+branch%3Amaster
+[discord-badge]: https://img.shields.io/discord/899851952891002890.svg?logo=discord&style=flat-square
+[discord-url]: https://discord.gg/XgGxMSkvUM
+
+[Website](https://dioxuslabs.com) |
+[Guides](https://dioxuslabs.com/learn/0.6) |
+[API Docs](https://docs.rs/dioxus-check) |
+[Chat](https://discord.gg/XgGxMSkvUM)
+
+## Overview
+
+`dioxus-check` analyzes Dioxus source code and reports errors and warnings. Primarily, it enforces the [Rules of Hooks](https://dioxuslabs.com/learn/0.6/reference/hooks#rules-of-hooks).
+
+## Contributing
+
+- Report issues on our [issue tracker](https://github.com/dioxuslabs/dioxus/issues).
+- Join the discord and ask questions!
+
+## License
+
+This project is licensed under the [MIT license].
+
+[mit license]: https://github.com/dioxuslabs/dioxus/blob/main/LICENSE-MIT
+
+Unless you explicitly state otherwise, any contribution intentionally submitted
+for inclusion in Dioxus by you shall be licensed as MIT without any additional
+terms or conditions.
diff --git a/packages/check/README.md b/packages/check/README.md
index e735e7d5c4..f8c4ef3a01 100644
--- a/packages/check/README.md
+++ b/packages/check/README.md
@@ -1,3 +1,4 @@
+
# dioxus-check
[![Crates.io][crates-badge]][crates-url]
@@ -5,15 +6,6 @@
[![Build Status][actions-badge]][actions-url]
[![Discord chat][discord-badge]][discord-url]
-[crates-badge]: https://img.shields.io/crates/v/dioxus-autofmt.svg
-[crates-url]: https://crates.io/crates/dioxus-check
-[mit-badge]: https://img.shields.io/badge/license-MIT-blue.svg
-[mit-url]: https://github.com/dioxuslabs/dioxus/blob/main/LICENSE-MIT
-[actions-badge]: https://github.com/dioxuslabs/dioxus/actions/workflows/main.yml/badge.svg
-[actions-url]: https://github.com/dioxuslabs/dioxus/actions?query=workflow%3ACI+branch%3Amaster
-[discord-badge]: https://img.shields.io/discord/899851952891002890.svg?logo=discord&style=flat-square
-[discord-url]: https://discord.gg/XgGxMSkvUM
-
[Website](https://dioxuslabs.com) |
[Guides](https://dioxuslabs.com/learn/0.6) |
[API Docs](https://docs.rs/dioxus-check) |
@@ -32,8 +24,16 @@
This project is licensed under the [MIT license].
-[mit license]: https://github.com/dioxuslabs/dioxus/blob/main/LICENSE-MIT
-
Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in Dioxus by you shall be licensed as MIT without any additional
terms or conditions.
+
+[crates-badge]: https://img.shields.io/crates/v/dioxus-autofmt.svg
+[crates-url]: https://crates.io/crates/dioxus-check
+[mit-badge]: https://img.shields.io/badge/license-MIT-blue.svg
+[mit-url]: https://github.com/dioxuslabs/dioxus/blob/main/LICENSE-MIT
+[actions-badge]: https://github.com/dioxuslabs/dioxus/actions/workflows/main.yml/badge.svg
+[actions-url]: https://github.com/dioxuslabs/dioxus/actions?query=workflow%3ACI+branch%3Amaster
+[discord-badge]: https://img.shields.io/discord/899851952891002890.svg?logo=discord&style=flat-square
+[discord-url]: https://discord.gg/XgGxMSkvUM
+[MIT license]: https://github.com/dioxuslabs/dioxus/blob/main/LICENSE-MIT
\ No newline at end of file
diff --git a/packages/check/src/lib.rs b/packages/check/src/lib.rs
index 43a164514a..d05b9ef6a3 100644
--- a/packages/check/src/lib.rs
+++ b/packages/check/src/lib.rs
@@ -1,4 +1,4 @@
-#![doc = include_str!("../README.md")]
+#![doc = include_str!("../README-docs-rs.md")]
#![doc(html_logo_url = "https://avatars.githubusercontent.com/u/79236386")]
#![doc(html_favicon_url = "https://avatars.githubusercontent.com/u/79236386")]
diff --git a/packages/cli-config/README-docs-rs.md b/packages/cli-config/README-docs-rs.md
new file mode 100644
index 0000000000..ce337cb5ea
--- /dev/null
+++ b/packages/cli-config/README-docs-rs.md
@@ -0,0 +1,53 @@
+
+
+
+
+# Dioxus CLI configuration
+
+This crate exposes the various configuration options that the Dioxus CLI sets when running the
+application during development.
+
+Note that these functions will return a different value when running under the CLI, so make sure
+not to rely on them when running in a production environment.
+
+## Constants
+
+The various constants here are the names of the environment variables that the CLI sets. We recommend
+using the functions in this crate to access the values of these environment variables indirectly.
+
+The CLI uses this crate and the associated constants to _set_ the environment variables, but as
+a consumer of the CLI, you would want to read the values of these environment variables using
+the provided functions.
+
+## Example Usage
+
+We recommend using the functions here to access the values of the environment variables set by the CLI.
+For example, you might use the [`fullstack_address_or_localhost`] function to get the address that
+the CLI is requesting the application to be served on.
+
+```rust, ignore
+async fn launch_axum(app: axum::Router<()>) {
+// Read the PORT and ADDR environment variables set by the CLI
+let addr = dioxus_cli_config::fullstack_address_or_localhost();
+
+ // Bind to the address and serve the application
+ let listener = tokio::net::TcpListener::bind(&addr).await.unwrap();
+ axum::serve(listener, app.into_make_service())
+ .await
+ .unwrap();
+
+}
+```
+
+## Stability
+
+The _values_ that these functions return are _not_ guaranteed to be stable between patch releases
+of Dioxus. At any time, we might change the values that the CLI sets or the way that they are read.
+
+We also don't guarantee the stability of the env var names themselves. If you want to rely on a
+particular env var, use the defined constants in your code.
diff --git a/packages/cli-config/README.md b/packages/cli-config/README.md
index e544837bdb..5f68ea068a 100644
--- a/packages/cli-config/README.md
+++ b/packages/cli-config/README.md
@@ -1,7 +1,54 @@
-# dioxus-cli-config
+
+
+
+
-A crate that provides key/value names and types for configuring Dioxus applications at runtime.
+# Dioxus CLI configuration
-This crate exists for us to very cleanly define the exact fields we want to pass down to Dioxus applications at runtime but without exposing the entire config object.
+This crate exposes the various configuration options that the Dioxus CLI sets when running the
+application during development.
-This leads to faster compile times, smaller binaries, and a clearer distinction between the config and the application.
+Note that these functions will return a different value when running under the CLI, so make sure
+not to rely on them when running in a production environment.
+
+## Constants
+
+The various constants here are the names of the environment variables that the CLI sets. We recommend
+using the functions in this crate to access the values of these environment variables indirectly.
+
+The CLI uses this crate and the associated constants to _set_ the environment variables, but as
+a consumer of the CLI, you would want to read the values of these environment variables using
+the provided functions.
+
+## Example Usage
+
+We recommend using the functions here to access the values of the environment variables set by the CLI.
+For example, you might use the [`fullstack_address_or_localhost`] function to get the address that
+the CLI is requesting the application to be served on.
+
+```rust, ignore
+async fn launch_axum(app: axum::Router<()>) {
+// Read the PORT and ADDR environment variables set by the CLI
+let addr = dioxus_cli_config::fullstack_address_or_localhost();
+
+ // Bind to the address and serve the application
+ let listener = tokio::net::TcpListener::bind(&addr).await.unwrap();
+ axum::serve(listener, app.into_make_service())
+ .await
+ .unwrap();
+
+}
+```
+
+## Stability
+
+The _values_ that these functions return are _not_ guaranteed to be stable between patch releases
+of Dioxus. At any time, we might change the values that the CLI sets or the way that they are read.
+
+We also don't guarantee the stability of the env var names themselves. If you want to rely on a
+particular env var, use the defined constants in your code.
\ No newline at end of file
diff --git a/packages/cli-config/src/lib.rs b/packages/cli-config/src/lib.rs
index e3092266a0..57be723db2 100644
--- a/packages/cli-config/src/lib.rs
+++ b/packages/cli-config/src/lib.rs
@@ -1,55 +1,4 @@
-//!
-//!
-//!
-//!
-//! # Dioxus CLI configuration
-//!
-//! This crate exposes the various configuration options that the Dioxus CLI sets when running the
-//! application during development.
-//!
-//! Note that these functions will return a different value when running under the CLI, so make sure
-//! not to rely on them when running in a production environment.
-//!
-//! ## Constants
-//!
-//! The various constants here are the names of the environment variables that the CLI sets. We recommend
-//! using the functions in this crate to access the values of these environment variables indirectly.
-//!
-//! The CLI uses this crate and the associated constants to *set* the environment variables, but as
-//! a consumer of the CLI, you would want to read the values of these environment variables using
-//! the provided functions.
-//!
-//! ## Example Usage
-//!
-//! We recommend using the functions here to access the values of the environment variables set by the CLI.
-//! For example, you might use the [`fullstack_address_or_localhost`] function to get the address that
-//! the CLI is requesting the application to be served on.
-//!
-//! ```rust, ignore
-//! async fn launch_axum(app: axum::Router<()>) {
-//! // Read the PORT and ADDR environment variables set by the CLI
-//! let addr = dioxus_cli_config::fullstack_address_or_localhost();
-//!
-//! // Bind to the address and serve the application
-//! let listener = tokio::net::TcpListener::bind(&addr).await.unwrap();
-//! axum::serve(listener, app.into_make_service())
-//! .await
-//! .unwrap();
-//! }
-//! ```
-//!
-//! ## Stability
-//!
-//! The *values* that these functions return are *not* guaranteed to be stable between patch releases
-//! of Dioxus. At any time, we might change the values that the CLI sets or the way that they are read.
-//!
-//! We also don't guarantee the stability of the env var names themselves. If you want to rely on a
-//! particular env var, use the defined constants in your code.
+#![doc = include_str!("../README-docs-rs.md")]
use std::{
net::{IpAddr, Ipv4Addr, SocketAddr},
diff --git a/packages/cli/README-docs-rs.md b/packages/cli/README-docs-rs.md
new file mode 100644
index 0000000000..5913d9f2c3
--- /dev/null
+++ b/packages/cli/README-docs-rs.md
@@ -0,0 +1,68 @@
+
+
📦✨ Dioxus CLI
+
Tooling to supercharge Dioxus projects
+
+
+The **dioxus-cli** (inspired by wasm-pack and webpack) is a tool for getting Dioxus projects up and running.
+It handles building, bundling, development and publishing to simplify development.
+
+## Installation
+
+### Install the stable version (recommended)
+
+```shell
+cargo install dioxus-cli
+```
+
+### Install the latest development build through git
+
+To get the latest bug fixes and features, you can install the development version from git.
+However, this is not fully tested.
+That means you're probably going to have more bugs despite having the latest bug fixes.
+
+```shell
+cargo install --git https://github.com/DioxusLabs/dioxus dioxus-cli
+```
+
+This will download the CLI from the master branch,
+and install it in Cargo's global binary directory (`~/.cargo/bin/` by default).
+
+### Install from local folder
+Note: The CLI will fail to build projects in debug profile. This is currently under investigation.
+```shell
+cargo install --path .
+```
+
+## Get started
+
+Use `dx new` to initialize a new Dioxus project.
+It will be cloned from the [dioxus-template](https://github.com/DioxusLabs/dioxus-template) repository.
+
+Alternatively, you can specify the template path:
+
+```shell
+dx new --template gh:dioxuslabs/dioxus-template
+```
+
+Run `dx --help` for a list of all the available commands.
+Furthermore, you can run `dx --help` to get help with a specific command.
+
+## Dioxus config file
+
+You can use the `Dioxus.toml` file for further configuration.
+Some fields are mandatory, but the CLI tool will tell you which ones are missing.
+You can create a `Dioxus.toml` with all fields already set using `dx config init project-name`,
+or you can use this bare-bones template (only mandatory fields) to get started:
+
+```toml
+[application]
+name = "project-name"
+# Currently supported platforms: web, desktop
+default_platform = "web"
+
+[web.app]
+title = "Hello"
+
+[web.resource.dev]
+```
+
diff --git a/packages/cli/README.md b/packages/cli/README.md
index 5913d9f2c3..4e23bf760c 100644
--- a/packages/cli/README.md
+++ b/packages/cli/README.md
@@ -1,3 +1,4 @@
+
📦✨ Dioxus CLI
Tooling to supercharge Dioxus projects
@@ -28,7 +29,9 @@ This will download the CLI from the master branch,
and install it in Cargo's global binary directory (`~/.cargo/bin/` by default).
### Install from local folder
+
Note: The CLI will fail to build projects in debug profile. This is currently under investigation.
+
```shell
cargo install --path .
```
@@ -64,5 +67,4 @@ default_platform = "web"
title = "Hello"
[web.resource.dev]
-```
-
+```
\ No newline at end of file
diff --git a/packages/cli/src/main.rs b/packages/cli/src/main.rs
index 9184e86e5c..f724960997 100644
--- a/packages/cli/src/main.rs
+++ b/packages/cli/src/main.rs
@@ -1,4 +1,4 @@
-#![doc = include_str!("../README.md")]
+#![doc = include_str!("../README-docs-rs.md")]
#![doc(html_logo_url = "https://avatars.githubusercontent.com/u/79236386")]
#![doc(html_favicon_url = "https://avatars.githubusercontent.com/u/79236386")]
#![cfg_attr(docsrs, feature(doc_cfg))]
diff --git a/packages/config-macro/README-docs-rs.md b/packages/config-macro/README-docs-rs.md
new file mode 100644
index 0000000000..39ca7e98df
--- /dev/null
+++ b/packages/config-macro/README-docs-rs.md
@@ -0,0 +1,39 @@
+# dioxus-config-macro
+
+[![Crates.io][crates-badge]][crates-url]
+[![MIT licensed][mit-badge]][mit-url]
+[![Build Status][actions-badge]][actions-url]
+[![Discord chat][discord-badge]][discord-url]
+
+[crates-badge]: https://img.shields.io/crates/v/dioxus-config-macro.svg
+[crates-url]: https://crates.io/crates/dioxus-config-macro
+[mit-badge]: https://img.shields.io/badge/license-MIT-blue.svg
+[mit-url]: https://github.com/dioxuslabs/dioxus/blob/main/LICENSE-MIT
+[actions-badge]: https://github.com/dioxuslabs/dioxus/actions/workflows/main.yml/badge.svg
+[actions-url]: https://github.com/dioxuslabs/dioxus/actions?query=workflow%3ACI+branch%3Amaster
+[discord-badge]: https://img.shields.io/discord/899851952891002890.svg?logo=discord&style=flat-square
+[discord-url]: https://discord.gg/XgGxMSkvUM
+
+[Website](https://dioxuslabs.com) |
+[Guide](https://dioxuslabs.com/learn/0.6) |
+[API Docs](https://docs.rs/dioxus-config-macro/latest/dioxus_config_macro/) |
+[Chat](https://discord.gg/XgGxMSkvUM)
+
+## Overview
+
+`dioxus-config-macro` provides a handful of helpful macros to make it easier to work with optional sections of the launch builder.
+
+## Contributing
+
+- Report issues on our [issue tracker](https://github.com/dioxuslabs/dioxus/issues).
+- Join the discord and ask questions!
+
+## License
+
+This project is licensed under the [MIT license].
+
+[mit license]: https://github.com/dioxuslabs/dioxus/blob/main/LICENSE-MIT
+
+Unless you explicitly state otherwise, any contribution intentionally submitted
+for inclusion in Dioxus by you shall be licensed as MIT without any additional
+terms or conditions.
diff --git a/packages/config-macro/README.md b/packages/config-macro/README.md
index 39ca7e98df..94db63647e 100644
--- a/packages/config-macro/README.md
+++ b/packages/config-macro/README.md
@@ -1,3 +1,4 @@
+
# dioxus-config-macro
[![Crates.io][crates-badge]][crates-url]
@@ -5,15 +6,6 @@
[![Build Status][actions-badge]][actions-url]
[![Discord chat][discord-badge]][discord-url]
-[crates-badge]: https://img.shields.io/crates/v/dioxus-config-macro.svg
-[crates-url]: https://crates.io/crates/dioxus-config-macro
-[mit-badge]: https://img.shields.io/badge/license-MIT-blue.svg
-[mit-url]: https://github.com/dioxuslabs/dioxus/blob/main/LICENSE-MIT
-[actions-badge]: https://github.com/dioxuslabs/dioxus/actions/workflows/main.yml/badge.svg
-[actions-url]: https://github.com/dioxuslabs/dioxus/actions?query=workflow%3ACI+branch%3Amaster
-[discord-badge]: https://img.shields.io/discord/899851952891002890.svg?logo=discord&style=flat-square
-[discord-url]: https://discord.gg/XgGxMSkvUM
-
[Website](https://dioxuslabs.com) |
[Guide](https://dioxuslabs.com/learn/0.6) |
[API Docs](https://docs.rs/dioxus-config-macro/latest/dioxus_config_macro/) |
@@ -32,8 +24,16 @@
This project is licensed under the [MIT license].
-[mit license]: https://github.com/dioxuslabs/dioxus/blob/main/LICENSE-MIT
-
Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in Dioxus by you shall be licensed as MIT without any additional
terms or conditions.
+
+[crates-badge]: https://img.shields.io/crates/v/dioxus-config-macro.svg
+[crates-url]: https://crates.io/crates/dioxus-config-macro
+[mit-badge]: https://img.shields.io/badge/license-MIT-blue.svg
+[mit-url]: https://github.com/dioxuslabs/dioxus/blob/main/LICENSE-MIT
+[actions-badge]: https://github.com/dioxuslabs/dioxus/actions/workflows/main.yml/badge.svg
+[actions-url]: https://github.com/dioxuslabs/dioxus/actions?query=workflow%3ACI+branch%3Amaster
+[discord-badge]: https://img.shields.io/discord/899851952891002890.svg?logo=discord&style=flat-square
+[discord-url]: https://discord.gg/XgGxMSkvUM
+[MIT license]: https://github.com/dioxuslabs/dioxus/blob/main/LICENSE-MIT
\ No newline at end of file
diff --git a/packages/config-macro/src/lib.rs b/packages/config-macro/src/lib.rs
index d54cb84b6b..3d4241e411 100644
--- a/packages/config-macro/src/lib.rs
+++ b/packages/config-macro/src/lib.rs
@@ -1,4 +1,4 @@
-#![doc = include_str!("../README.md")]
+#![doc = include_str!("../README-docs-rs.md")]
#![doc(html_logo_url = "https://avatars.githubusercontent.com/u/79236386")]
#![doc(html_favicon_url = "https://avatars.githubusercontent.com/u/79236386")]
diff --git a/packages/config-macros/README-docs-rs.md b/packages/config-macros/README-docs-rs.md
new file mode 100644
index 0000000000..8384525d56
--- /dev/null
+++ b/packages/config-macros/README-docs-rs.md
@@ -0,0 +1,15 @@
+# Dioxus Config Macros
+
+These macros are used internally by codegen and are not intended for general use.
+
+Dioxus will export its feature flags into this crate, allowing downstream codegen to use them under the "dioxus" namespace.
+
+## License
+
+This project is licensed under the [MIT license].
+
+[mit license]: https://github.com/dioxuslabs/dioxus/blob/main/LICENSE-MIT
+
+Unless you explicitly state otherwise, any contribution intentionally submitted
+for inclusion in Dioxus by you shall be licensed as MIT without any additional
+terms or conditions.
diff --git a/packages/config-macros/README.md b/packages/config-macros/README.md
index 8384525d56..c4dedc8092 100644
--- a/packages/config-macros/README.md
+++ b/packages/config-macros/README.md
@@ -1,3 +1,4 @@
+
# Dioxus Config Macros
These macros are used internally by codegen and are not intended for general use.
@@ -8,8 +9,8 @@ Dioxus will export its feature flags into this crate, allowing downstream codege
This project is licensed under the [MIT license].
-[mit license]: https://github.com/dioxuslabs/dioxus/blob/main/LICENSE-MIT
-
Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in Dioxus by you shall be licensed as MIT without any additional
terms or conditions.
+
+[MIT license]: https://github.com/dioxuslabs/dioxus/blob/main/LICENSE-MIT
\ No newline at end of file
diff --git a/packages/config-macros/src/lib.rs b/packages/config-macros/src/lib.rs
index a7fddac1f0..157368cace 100644
--- a/packages/config-macros/src/lib.rs
+++ b/packages/config-macros/src/lib.rs
@@ -1,3 +1,5 @@
+#![doc = include_str!("../README-docs-rs.md")]
+
/// A macro for deciding whether or not to split the wasm bundle.
/// Used by the internal router-macro code. The contents here are considered to be semver exempt.
///
diff --git a/packages/const-serialize/README-docs-rs.md b/packages/const-serialize/README-docs-rs.md
new file mode 100644
index 0000000000..dfa66de631
--- /dev/null
+++ b/packages/const-serialize/README-docs-rs.md
@@ -0,0 +1,57 @@
+A rust serialization library that works in const with complex(ish) types like enums, nested structs and arrays. Const rust does not have an allocator, so this library cannot work in a cross architecture environment with Vecs, slices or strings.
+
+```rust
+use const_serialize::{deserialize_const, serialize_const, serialize_eq, ConstVec, SerializeConst};
+#[derive(Clone, Copy, Debug, PartialEq, SerializeConst)]
+struct Struct {
+ a: u32,
+ b: u8,
+ c: u32,
+ d: Enum,
+}
+
+#[derive(Clone, Copy, Debug, PartialEq, SerializeConst)]
+#[repr(C, u8)]
+enum Enum {
+ A { one: u32, two: u16 },
+ B { one: u8, two: u16 } = 15,
+}
+
+const {
+ let data = [Struct {
+ a: 0x11111111,
+ b: 0x22,
+ c: 0x33333333,
+ d: Enum::A {
+ one: 0x44444444,
+ two: 0x5555,
+ },
+ }; 3];
+ let mut buf = ConstVec::new();
+ buf = serialize_const(&data, buf);
+ let buf = buf.read();
+ let (buf, deserialized) = match deserialize_const!([Struct; 3], buf) {
+ Some(data) => data,
+ None => panic!("data mismatch"),
+ };
+ if !serialize_eq(&data, &deserialized) {
+ panic!("data mismatch");
+ }
+}
+```
+
+## How it works
+
+`const-serialize` relies heavily on well defined layouts for the types you want to serialize. The serialization format is the linear sequence of unaligned bytes stored in the order of the fields, items or variants of the type. Numbers are stored in little endian order.
+
+In order to support complex nested types, serialization is done using a trait. Since functions in traits cannot be const, `const-serialize` uses a macro to generate constant associated items that describe the memory layout of the type. That layout is then used to read all of the bytes in the type into the serialized buffer.
+
+The deserialization is done in a similar way, but the layout is used to write the bytes from the serialized buffer into the type.
+
+The rust [nomicon](https://doc.rust-lang.org/nomicon/data.html) defines the memory layout of different types. It is used as a reference for the layout of the types implemented in `const-serialize`.
+
+## Limitations
+
+- Only constant sized types are supported. This means that you can't serialize a type like `Vec`. These types are difficult to create in const contexts in general
+- Only types with a well defined memory layout are supported (see and ). `repr(Rust)` enums don't have a well defined layout, so they are not supported. `repr(C, u8)` enums can be used instead
+- Const rust does not support mutable references or points, so this crate leans heavily on function data structures for data processing.
diff --git a/packages/const-serialize/README.md b/packages/const-serialize/README.md
index dfa66de631..bc5a282648 100644
--- a/packages/const-serialize/README.md
+++ b/packages/const-serialize/README.md
@@ -1,3 +1,4 @@
+
A rust serialization library that works in const with complex(ish) types like enums, nested structs and arrays. Const rust does not have an allocator, so this library cannot work in a cross architecture environment with Vecs, slices or strings.
```rust
@@ -54,4 +55,4 @@ The rust [nomicon](https://doc.rust-lang.org/nomicon/data.html) defines the memo
- Only constant sized types are supported. This means that you can't serialize a type like `Vec`. These types are difficult to create in const contexts in general
- Only types with a well defined memory layout are supported (see and ). `repr(Rust)` enums don't have a well defined layout, so they are not supported. `repr(C, u8)` enums can be used instead
-- Const rust does not support mutable references or points, so this crate leans heavily on function data structures for data processing.
+- Const rust does not support mutable references or points, so this crate leans heavily on function data structures for data processing.
\ No newline at end of file
diff --git a/packages/const-serialize/src/lib.rs b/packages/const-serialize/src/lib.rs
index ac27500d06..e6ef49a374 100644
--- a/packages/const-serialize/src/lib.rs
+++ b/packages/const-serialize/src/lib.rs
@@ -1,4 +1,4 @@
-#![doc = include_str!("../README.md")]
+#![doc = include_str!("../README-docs-rs.md")]
#![warn(missing_docs)]
use std::{char, mem::MaybeUninit};
diff --git a/packages/core-macro/README-docs-rs.md b/packages/core-macro/README-docs-rs.md
new file mode 100644
index 0000000000..7a7d1639a6
--- /dev/null
+++ b/packages/core-macro/README-docs-rs.md
@@ -0,0 +1,46 @@
+# dioxus-core-macro
+
+[![Crates.io][crates-badge]][crates-url]
+[![MIT licensed][mit-badge]][mit-url]
+[![Build Status][actions-badge]][actions-url]
+[![Discord chat][discord-badge]][discord-url]
+
+[crates-badge]: https://img.shields.io/crates/v/dioxus-core-macro.svg
+[crates-url]: https://crates.io/crates/dioxus-core-macro
+[mit-badge]: https://img.shields.io/badge/license-MIT-blue.svg
+[mit-url]: https://github.com/dioxuslabs/dioxus/blob/main/LICENSE-MIT
+[actions-badge]: https://github.com/dioxuslabs/dioxus/actions/workflows/main.yml/badge.svg
+[actions-url]: https://github.com/dioxuslabs/dioxus/actions?query=workflow%3ACI+branch%3Amaster
+[discord-badge]: https://img.shields.io/discord/899851952891002890.svg?logo=discord&style=flat-square
+[discord-url]: https://discord.gg/XgGxMSkvUM
+
+[Website](https://dioxuslabs.com) |
+[Guides](https://dioxuslabs.com/learn/0.6) |
+[API Docs](https://docs.rs/dioxus-core-macro/latest/dioxus_core_macro) |
+[Chat](https://discord.gg/XgGxMSkvUM)
+
+## Overview
+
+`dioxus-core-macro` provides a handful of helpful macros used by the `dioxus` crate. These include:
+
+- The `rsx!` macro that underpins templates and node creation.
+- The `component` attribute macro denotes a function as a Dioxus component. Currently, this:
+ - Transforms function arguments into an auto-derived struct.
+ - Ensures that your component name uses PascalCase.
+ - Probably more stuff in the future. This macro allows us to have a way of distinguishing functions and components, which can be quite handy.
+- The `format_args_f` macro which allows f-string formatting with support for expressions.
+
+## Contributing
+
+- Report issues on our [issue tracker](https://github.com/dioxuslabs/dioxus/issues).
+- Join the discord and ask questions!
+
+## License
+
+This project is licensed under the [MIT license].
+
+[mit license]: https://github.com/dioxuslabs/dioxus/blob/main/LICENSE-MIT
+
+Unless you explicitly state otherwise, any contribution intentionally submitted
+for inclusion in Dioxus by you shall be licensed as MIT without any additional
+terms or conditions.
diff --git a/packages/core-macro/README.md b/packages/core-macro/README.md
index 7a7d1639a6..cb2b95c95b 100644
--- a/packages/core-macro/README.md
+++ b/packages/core-macro/README.md
@@ -1,3 +1,4 @@
+
# dioxus-core-macro
[![Crates.io][crates-badge]][crates-url]
@@ -5,15 +6,6 @@
[![Build Status][actions-badge]][actions-url]
[![Discord chat][discord-badge]][discord-url]
-[crates-badge]: https://img.shields.io/crates/v/dioxus-core-macro.svg
-[crates-url]: https://crates.io/crates/dioxus-core-macro
-[mit-badge]: https://img.shields.io/badge/license-MIT-blue.svg
-[mit-url]: https://github.com/dioxuslabs/dioxus/blob/main/LICENSE-MIT
-[actions-badge]: https://github.com/dioxuslabs/dioxus/actions/workflows/main.yml/badge.svg
-[actions-url]: https://github.com/dioxuslabs/dioxus/actions?query=workflow%3ACI+branch%3Amaster
-[discord-badge]: https://img.shields.io/discord/899851952891002890.svg?logo=discord&style=flat-square
-[discord-url]: https://discord.gg/XgGxMSkvUM
-
[Website](https://dioxuslabs.com) |
[Guides](https://dioxuslabs.com/learn/0.6) |
[API Docs](https://docs.rs/dioxus-core-macro/latest/dioxus_core_macro) |
@@ -39,8 +31,16 @@
This project is licensed under the [MIT license].
-[mit license]: https://github.com/dioxuslabs/dioxus/blob/main/LICENSE-MIT
-
Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in Dioxus by you shall be licensed as MIT without any additional
terms or conditions.
+
+[crates-badge]: https://img.shields.io/crates/v/dioxus-core-macro.svg
+[crates-url]: https://crates.io/crates/dioxus-core-macro
+[mit-badge]: https://img.shields.io/badge/license-MIT-blue.svg
+[mit-url]: https://github.com/dioxuslabs/dioxus/blob/main/LICENSE-MIT
+[actions-badge]: https://github.com/dioxuslabs/dioxus/actions/workflows/main.yml/badge.svg
+[actions-url]: https://github.com/dioxuslabs/dioxus/actions?query=workflow%3ACI+branch%3Amaster
+[discord-badge]: https://img.shields.io/discord/899851952891002890.svg?logo=discord&style=flat-square
+[discord-url]: https://discord.gg/XgGxMSkvUM
+[MIT license]: https://github.com/dioxuslabs/dioxus/blob/main/LICENSE-MIT
\ No newline at end of file
diff --git a/packages/core-macro/src/lib.rs b/packages/core-macro/src/lib.rs
index b65351cd66..6a8cd71ae4 100644
--- a/packages/core-macro/src/lib.rs
+++ b/packages/core-macro/src/lib.rs
@@ -1,4 +1,4 @@
-#![doc = include_str!("../README.md")]
+#![doc = include_str!("../README-docs-rs.md")]
#![doc(html_logo_url = "https://avatars.githubusercontent.com/u/79236386")]
#![doc(html_favicon_url = "https://avatars.githubusercontent.com/u/79236386")]
diff --git a/packages/core/README-docs-rs.md b/packages/core/README-docs-rs.md
new file mode 100644
index 0000000000..ae568c14da
--- /dev/null
+++ b/packages/core/README-docs-rs.md
@@ -0,0 +1,99 @@
+# dioxus-core
+
+`dioxus-core` provides a fast and featureful VirtualDom implementation for Rust.
+
+```rust, no_run
+# tokio::runtime::Runtime::new().unwrap().block_on(async {
+use dioxus_core::{VirtualDom, Event, Element, Mutations, VNode, ElementId};
+
+let mut vdom = VirtualDom::new(app);
+let real_dom = SomeRenderer::new();
+
+loop {
+ tokio::select! {
+ evt = real_dom.event() => {
+ let evt = Event::new(evt, true);
+ vdom.runtime().handle_event("onclick", evt, ElementId(0))
+ },
+ _ = vdom.wait_for_work() => {}
+ }
+ vdom.render_immediate(&mut real_dom.apply())
+}
+
+# fn app() -> Element { VNode::empty() }
+# struct SomeRenderer; impl SomeRenderer { fn new() -> SomeRenderer { SomeRenderer } async fn event(&self) -> std::rc::Rc { unimplemented!() } fn apply(&self) -> Mutations { Mutations::default() } }
+# });
+```
+
+## Features
+
+A virtualdom is an efficient and flexible tree data structure that allows you to manage state for a graphical user interface. The Dioxus VirtualDom is perhaps the most fully-featured virtualdom implementation in Rust and powers renderers running across Web, Desktop, Mobile, SSR, TUI, LiveView, and more. When you use the Dioxus VirtualDom, you immediately enable users of your renderer to leverage the wide ecosystem of Dioxus components, hooks, and associated tooling.
+
+Some features of `dioxus-core` include:
+
+- UI components are just functions
+- State is provided by hooks
+- Deep integration with async
+- Strong focus on performance
+- Integrated hotreloading support
+- Extensible system for UI elements and their attributes
+
+If you are just starting, check out the Guides first.
+
+## Understanding the implementation
+
+`dioxus-core` is designed to be a lightweight crate that. It exposes a number of flexible primitives without being deeply concerned about the intracices of state management itself. We provide a number of useful abstractions built on these primitives in the `dioxus-hooks` crate as well as the `dioxus-signals` crate.
+
+The important abstractions to understand are:
+
+- The [`VirtualDom`]
+- The [`Component`] and its [`Properties`]
+- Handling events
+- Working with async
+- Suspense
+
+## Usage
+
+The `dioxus` crate exports the `rsx` macro which transforms a helpful, simpler syntax of Rust.
+
+First, start with your app:
+
+```rust
+# use dioxus::dioxus_core::{Mutations, VirtualDom};
+use dioxus::prelude::*;
+
+// First, declare a root component
+fn app() -> Element {
+ rsx! {
+ div { "hello world" }
+ }
+}
+
+fn main() {
+ // Next, create a new VirtualDom using this app as the root component.
+ let mut dom = VirtualDom::new(app);
+
+ // The initial render of the dom will generate a stream of edits for the real dom to apply
+ let mutations = dom.rebuild_to_vec();
+}
+```
+
+## Contributing
+
+- Check out the website [section on contributing](https://dioxuslabs.com/learn/0.6/contributing).
+- Report issues on our [issue tracker](https://github.com/dioxuslabs/dioxus/issues).
+- [Join](https://discord.gg/XgGxMSkvUM) the discord and ask questions!
+
+
+
+
+
+## License
+
+This project is licensed under the [MIT license].
+
+[mit license]: https://github.com/DioxusLabs/dioxus/blob/master/LICENSE-MIT
+
+Unless you explicitly state otherwise, any contribution intentionally submitted
+for inclusion in Dioxus by you, shall be licensed as MIT, without any additional
+terms or conditions.
diff --git a/packages/core/README.md b/packages/core/README.md
index ae568c14da..15dc87cc32 100644
--- a/packages/core/README.md
+++ b/packages/core/README.md
@@ -1,9 +1,9 @@
+
# dioxus-core
`dioxus-core` provides a fast and featureful VirtualDom implementation for Rust.
```rust, no_run
-# tokio::runtime::Runtime::new().unwrap().block_on(async {
use dioxus_core::{VirtualDom, Event, Element, Mutations, VNode, ElementId};
let mut vdom = VirtualDom::new(app);
@@ -19,10 +19,6 @@ loop {
}
vdom.render_immediate(&mut real_dom.apply())
}
-
-# fn app() -> Element { VNode::empty() }
-# struct SomeRenderer; impl SomeRenderer { fn new() -> SomeRenderer { SomeRenderer } async fn event(&self) -> std::rc::Rc { unimplemented!() } fn apply(&self) -> Mutations { Mutations::default() } }
-# });
```
## Features
@@ -59,7 +55,6 @@ The `dioxus` crate exports the `rsx` macro which transforms a helpful, simpler s
First, start with your app:
```rust
-# use dioxus::dioxus_core::{Mutations, VirtualDom};
use dioxus::prelude::*;
// First, declare a root component
@@ -92,8 +87,8 @@ fn main() {
This project is licensed under the [MIT license].
-[mit license]: https://github.com/DioxusLabs/dioxus/blob/master/LICENSE-MIT
-
Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in Dioxus by you, shall be licensed as MIT, without any additional
terms or conditions.
+
+[MIT license]: https://github.com/DioxusLabs/dioxus/blob/master/LICENSE-MIT
\ No newline at end of file
diff --git a/packages/core/src/lib.rs b/packages/core/src/lib.rs
index c093003e0e..7914f676ae 100644
--- a/packages/core/src/lib.rs
+++ b/packages/core/src/lib.rs
@@ -1,4 +1,4 @@
-#![doc = include_str!("../README.md")]
+#![doc = include_str!("../README-docs-rs.md")]
#![doc(html_logo_url = "https://avatars.githubusercontent.com/u/79236386")]
#![doc(html_favicon_url = "https://avatars.githubusercontent.com/u/79236386")]
#![warn(missing_docs)]
diff --git a/packages/crates-io-readme/Cargo.toml b/packages/crates-io-readme/Cargo.toml
new file mode 100644
index 0000000000..6b969d7cd3
--- /dev/null
+++ b/packages/crates-io-readme/Cargo.toml
@@ -0,0 +1,12 @@
+[package]
+name = "crates-io-readme"
+version = "0.1.0"
+edition = "2021"
+publish = false
+
+[dependencies]
+pulldown-cmark = { version = "0.13.0", default-features = false, features = ["simd"] }
+anyhow = "1.0"
+walkdir = "2.5"
+pulldown-cmark-to-cmark = "21.0.0"
+ignore = "0.4.23"
diff --git a/packages/crates-io-readme/src/main.rs b/packages/crates-io-readme/src/main.rs
new file mode 100644
index 0000000000..03d12eb149
--- /dev/null
+++ b/packages/crates-io-readme/src/main.rs
@@ -0,0 +1,124 @@
+/// We use the readme as the frontpage of the docs.rs for most crates, but Crates.io and github render code blocks slightly different from docs.rs.
+/// This CLI searches through the current directory for markdown files that have the `-docs-rs` suffix and transforms them to remove lines that start with `# ` in fenced rust code blocks.
+///
+/// # Usage
+///
+/// Run this command in the root of the workspace:
+/// ```bash
+/// cargo run --package crates-io-readme
+/// ```
+use anyhow::{Context, Result};
+use pulldown_cmark::{CodeBlockKind, Event, Tag, TagEnd};
+use std::fs;
+use std::path::Path;
+use walkdir::WalkDir;
+
+fn main() -> Result<()> {
+ let current_dir = std::env::current_dir()?;
+ // walk up looking for a git root
+ let mut git_root = current_dir.as_path();
+ while !git_root.join(".git").exists() {
+ if let Some(parent) = git_root.parent() {
+ git_root = parent;
+ } else {
+ break;
+ }
+ }
+ let git_folder = git_root.join(".git");
+ let gitignore_path = git_root.join(".gitignore");
+
+ // Ignore files in the gitignore
+ let (ignore, _) = ignore::gitignore::Gitignore::new(&gitignore_path);
+
+ // Process all markdown files in the current directory
+ for entry in WalkDir::new(¤t_dir).into_iter().filter_entry(|e| {
+ let path = e.path();
+ let is_dir = path.is_dir();
+ // Ignore files in the gitignore
+ ignore.matched(path, is_dir).is_none() && !path.starts_with(&git_folder)
+ }) {
+ let entry = entry?;
+ let path = entry.path();
+
+ if path.extension().and_then(|s| s.to_str()) == Some("md") {
+ let stem_name = path
+ .file_stem()
+ .and_then(|s| s.to_str())
+ .unwrap_or_default();
+ if let Some(base_name) = stem_name.strip_suffix("-docs-rs") {
+ process_markdown_file(path, &path.with_file_name(base_name).with_extension("md"))?;
+ }
+ }
+ }
+
+ println!("✅ Transformation complete!");
+ Ok(())
+}
+
+fn process_markdown_file(path: &Path, output_path: &Path) -> Result<()> {
+ // Read the markdown file
+ let content = fs::read_to_string(path)
+ .with_context(|| format!("Failed to read file: {}", path.display()))?;
+
+ let source_file_name = path
+ .file_name()
+ .and_then(|s| s.to_str())
+ .unwrap_or_default();
+
+ // Transform the markdown content
+ let mut output_writer = format!(
+ "\n"
+ );
+ transform_markdown_to(&content, &mut output_writer)?;
+
+ // Write the transformed content to the output file
+ fs::write(output_path, output_writer)
+ .with_context(|| format!("Failed to write file: {}", output_path.display()))?;
+
+ println!(" ✅ Transformed: {}", path.display());
+ Ok(())
+}
+
+fn transform_markdown_to(content: &str, writer: impl std::fmt::Write) -> Result<()> {
+ let parser = pulldown_cmark::Parser::new(content);
+ let iterator = pulldown_cmark::TextMergeWithOffset::new(parser.into_offset_iter());
+
+ let mut in_rust_block = false;
+ let iterator = iterator.map(|(event, offset)| match &event {
+ Event::Start(Tag::CodeBlock(info)) => {
+ // docs.rs strips lines in rust blocks that start with `# `
+ if let CodeBlockKind::Fenced(lang) = info {
+ let is_rust =
+ lang.starts_with("rust") || lang.starts_with("rs") || lang.starts_with("rsx");
+ in_rust_block = is_rust;
+ }
+ (event, Some(offset))
+ }
+ Event::End(TagEnd::CodeBlock) => {
+ in_rust_block = false;
+ (event, Some(offset))
+ }
+ Event::Text(text) if in_rust_block => {
+ // Strip lines that start with `# `
+ let stripped_text = text
+ .lines()
+ .filter(|line| !line.starts_with("# "))
+ .collect::>()
+ .join("\n");
+ (Event::Text(stripped_text.into()), None)
+ }
+ _ => (event, Some(offset)),
+ });
+
+ let options = pulldown_cmark_to_cmark::Options {
+ code_block_token_count: 3,
+ list_token: '-',
+ emphasis_token: '_',
+ ..Default::default()
+ };
+ pulldown_cmark_to_cmark::cmark_with_source_range_and_options(
+ iterator, content, writer, options,
+ )?;
+
+ Ok(())
+}
diff --git a/packages/depinfo/README-docs-rs.md b/packages/depinfo/README-docs-rs.md
new file mode 100644
index 0000000000..cc9bebc996
--- /dev/null
+++ b/packages/depinfo/README-docs-rs.md
@@ -0,0 +1,14 @@
+# Rustc Dep-Info Parser
+
+This crate parses the output of rustc's `.d` dep-info file. It is used by the hot-reloading engine and other libraries to provide higher quality dependency analysis for the user's project.
+
+## License
+
+This project is licensed under either the [MIT license] or the [Apache-2 License].
+
+[apache-2 license]: https://github.com/DioxusLabs/dioxus/blob/master/LICENSE-APACHE
+[mit license]: https://github.com/DioxusLabs/dioxus/blob/master/LICENSE-MIT
+
+Unless you explicitly state otherwise, any contribution intentionally submitted
+for inclusion in Dioxus by you, shall be licensed as MIT or Apache-2, without any additional
+terms or conditions.
diff --git a/packages/depinfo/README.md b/packages/depinfo/README.md
index cc9bebc996..65a47c5314 100644
--- a/packages/depinfo/README.md
+++ b/packages/depinfo/README.md
@@ -1,3 +1,4 @@
+
# Rustc Dep-Info Parser
This crate parses the output of rustc's `.d` dep-info file. It is used by the hot-reloading engine and other libraries to provide higher quality dependency analysis for the user's project.
@@ -6,9 +7,9 @@ This crate parses the output of rustc's `.d` dep-info file. It is used by the ho
This project is licensed under either the [MIT license] or the [Apache-2 License].
-[apache-2 license]: https://github.com/DioxusLabs/dioxus/blob/master/LICENSE-APACHE
-[mit license]: https://github.com/DioxusLabs/dioxus/blob/master/LICENSE-MIT
-
Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in Dioxus by you, shall be licensed as MIT or Apache-2, without any additional
terms or conditions.
+
+[MIT license]: https://github.com/DioxusLabs/dioxus/blob/master/LICENSE-MIT
+[Apache-2 License]: https://github.com/DioxusLabs/dioxus/blob/master/LICENSE-APACHE
\ No newline at end of file
diff --git a/packages/depinfo/src/lib.rs b/packages/depinfo/src/lib.rs
index c5ef6e9fe1..b13be17826 100644
--- a/packages/depinfo/src/lib.rs
+++ b/packages/depinfo/src/lib.rs
@@ -1,7 +1,4 @@
-//! Parse the output of rustc's `.d` dep-info file.
-//!
-//! Used by the hot-reloading engine and other libraries to provide higher quality dependency analysis
-//! for the user's project.
+#![doc = include_str!("../README-docs-rs.md")]
use std::path::{Path, PathBuf};
diff --git a/packages/desktop/README-docs-rs.md b/packages/desktop/README-docs-rs.md
new file mode 100644
index 0000000000..cebf39cbca
--- /dev/null
+++ b/packages/desktop/README-docs-rs.md
@@ -0,0 +1,51 @@
+# Dioxus Desktop (webview)
+
+[![Crates.io][crates-badge]][crates-url]
+[![MIT licensed][mit-badge]][mit-url]
+[![Build Status][actions-badge]][actions-url]
+[![Discord chat][discord-badge]][discord-url]
+
+[crates-badge]: https://img.shields.io/crates/v/dioxus-desktop.svg
+[crates-url]: https://crates.io/crates/dioxus-desktop
+[mit-badge]: https://img.shields.io/badge/license-MIT-blue.svg
+[mit-url]: https://github.com/dioxuslabs/dioxus/blob/main/LICENSE-MIT
+[actions-badge]: https://github.com/dioxuslabs/dioxus/actions/workflows/main.yml/badge.svg
+[actions-url]: https://github.com/dioxuslabs/dioxus/actions?query=workflow%3ACI+branch%3Amaster
+[discord-badge]: https://img.shields.io/discord/899851952891002890.svg?logo=discord&style=flat-square
+[discord-url]: https://discord.gg/XgGxMSkvUM
+
+[Website](https://dioxuslabs.com) |
+[Guides](https://dioxuslabs.com/learn/0.6) |
+[API Docs](https://docs.rs/dioxus-desktop/latest/dioxus_desktop) |
+[Chat](https://discord.gg/XgGxMSkvUM)
+
+## Overview
+
+`dioxus-desktop` provides a webview-based desktop renderer for the Dioxus VirtualDom.
+
+This requires that webview is installed on the target system. WebView is installed by default on macOS and iOS devices, but might not come preinstalled on Windows or Linux devices. To fix these issues, follow the [instructions in the guide](guide-url).
+
+[guide-url]: https://dioxuslabs.com/learn/0.6/getting_started
+
+## Features
+
+- Simple, one-line launch for desktop apps
+- Dioxus VirtualDom running on a native thread
+- Full HTML/CSS support via `wry` and `tao`
+- Exposed `window` and `Proxy` types from tao for direct window manipulation
+- Helpful hooks for accessing the window, WebView, and running javascript.
+
+## Contributing
+
+- Report issues on our [issue tracker](https://github.com/dioxuslabs/dioxus/issues).
+- Join the discord and ask questions!
+
+## License
+
+This project is licensed under the [MIT license].
+
+[mit license]: https://github.com/dioxuslabs/dioxus/blob/main/LICENSE-MIT
+
+Unless you explicitly state otherwise, any contribution intentionally submitted
+for inclusion in Dioxus by you shall be licensed as MIT without any additional
+terms or conditions.
diff --git a/packages/desktop/README.md b/packages/desktop/README.md
index cebf39cbca..5c7bbaa2dc 100644
--- a/packages/desktop/README.md
+++ b/packages/desktop/README.md
@@ -1,3 +1,4 @@
+
# Dioxus Desktop (webview)
[![Crates.io][crates-badge]][crates-url]
@@ -5,15 +6,6 @@
[![Build Status][actions-badge]][actions-url]
[![Discord chat][discord-badge]][discord-url]
-[crates-badge]: https://img.shields.io/crates/v/dioxus-desktop.svg
-[crates-url]: https://crates.io/crates/dioxus-desktop
-[mit-badge]: https://img.shields.io/badge/license-MIT-blue.svg
-[mit-url]: https://github.com/dioxuslabs/dioxus/blob/main/LICENSE-MIT
-[actions-badge]: https://github.com/dioxuslabs/dioxus/actions/workflows/main.yml/badge.svg
-[actions-url]: https://github.com/dioxuslabs/dioxus/actions?query=workflow%3ACI+branch%3Amaster
-[discord-badge]: https://img.shields.io/discord/899851952891002890.svg?logo=discord&style=flat-square
-[discord-url]: https://discord.gg/XgGxMSkvUM
-
[Website](https://dioxuslabs.com) |
[Guides](https://dioxuslabs.com/learn/0.6) |
[API Docs](https://docs.rs/dioxus-desktop/latest/dioxus_desktop) |
@@ -25,8 +17,6 @@
This requires that webview is installed on the target system. WebView is installed by default on macOS and iOS devices, but might not come preinstalled on Windows or Linux devices. To fix these issues, follow the [instructions in the guide](guide-url).
-[guide-url]: https://dioxuslabs.com/learn/0.6/getting_started
-
## Features
- Simple, one-line launch for desktop apps
@@ -44,8 +34,16 @@ This requires that webview is installed on the target system. WebView is install
This project is licensed under the [MIT license].
-[mit license]: https://github.com/dioxuslabs/dioxus/blob/main/LICENSE-MIT
-
Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in Dioxus by you shall be licensed as MIT without any additional
terms or conditions.
+
+[crates-badge]: https://img.shields.io/crates/v/dioxus-desktop.svg
+[crates-url]: https://crates.io/crates/dioxus-desktop
+[mit-badge]: https://img.shields.io/badge/license-MIT-blue.svg
+[mit-url]: https://github.com/dioxuslabs/dioxus/blob/main/LICENSE-MIT
+[actions-badge]: https://github.com/dioxuslabs/dioxus/actions/workflows/main.yml/badge.svg
+[actions-url]: https://github.com/dioxuslabs/dioxus/actions?query=workflow%3ACI+branch%3Amaster
+[discord-badge]: https://img.shields.io/discord/899851952891002890.svg?logo=discord&style=flat-square
+[discord-url]: https://discord.gg/XgGxMSkvUM
+[MIT license]: https://github.com/dioxuslabs/dioxus/blob/main/LICENSE-MIT
\ No newline at end of file
diff --git a/packages/desktop/src/lib.rs b/packages/desktop/src/lib.rs
index d4051bf4be..aa8f4e882d 100644
--- a/packages/desktop/src/lib.rs
+++ b/packages/desktop/src/lib.rs
@@ -1,4 +1,4 @@
-#![doc = include_str!("readme.md")]
+#![doc = include_str!("../README-docs-rs.md")]
#![doc(html_logo_url = "https://avatars.githubusercontent.com/u/79236386")]
#![doc(html_favicon_url = "https://avatars.githubusercontent.com/u/79236386")]
#![deny(missing_docs)]
diff --git a/packages/dioxus/README-docs-rs.md b/packages/dioxus/README-docs-rs.md
new file mode 100644
index 0000000000..b0a8eec427
--- /dev/null
+++ b/packages/dioxus/README-docs-rs.md
@@ -0,0 +1,229 @@
+
+
+---
+
+Dioxus is a framework for building cross-platform apps in Rust. With one codebase, you can build web, desktop, and mobile apps with fullstack server functions. Dioxus is designed to be easy to learn for developers familiar with web technologies like HTML, CSS, and JavaScript.
+
+
+
+
+
+## At a glance
+
+Dioxus is crossplatform app framework that empowers developer to build beautiful, fast, type-safe apps with Rust. By default, Dioxus apps are declared with HTML and CSS. Dioxus includes a number of useful features:
+
+- Hotreloading of RSX markup and assets
+- Interactive CLI with logging, project templates, linting, and more
+- Integrated bundler for deploying to the web, macOS, Linux, and Windows
+- Support for modern web features like SSR, Hydration, and HTML streaming
+- Direct access to system APIs through JNI (Android), CoreFoundation (Apple), and web-sys (web)
+- Type-safe application routing and server functions
+
+## Quick start
+
+To get started with Dioxus, you'll want to grab the dioxus-cli tool: `dx`. We distribute `dx` with `cargo-binstall` - if you already have binstall skip this step.
+
+```shell
+# skip if you already have cargo-binstall
+cargo install cargo-binstall
+
+# install the precompiled `dx` tool
+cargo binstall dioxus-cli
+
+# create a new app, following the template
+dx new my-app && cd my-app
+
+# and then serve!
+dx serve --desktop
+```
+
+## Your first app
+
+All Dioxus apps are built by composing functions return an `Element`.
+
+To launch an app, we use the `launch` method. In the launch function, we pass the app's root `Component`.
+
+```rust, no_run
+use dioxus::prelude::*;
+
+fn main() {
+ dioxus::launch(App);
+}
+
+// The #[component] attribute streamlines component creation.
+// It's not required, but highly recommended. It will lint incorrect component definitions and help you create props structs.
+#[component]
+fn App() -> Element {
+ rsx! { "hello world!" }
+}
+```
+
+## Elements & your first component
+
+You can use the `rsx!` macro to create elements with a jsx-like syntax.
+Any element in `rsx!` can have attributes, listeners, and children. For
+consistency, we force all attributes and listeners to be listed _before_
+children.
+
+```rust, no_run
+# use dioxus::prelude::*;
+let value = "123";
+
+rsx! {
+ div {
+ class: "my-class {value}", // <--- attribute
+ onclick: move |_| println!("clicked!"), // <--- listener
+ h1 { "hello world" } // <--- child
+ }
+};
+```
+
+The `rsx!` macro accepts attributes in "struct form". Any rust expression contained within curly braces that implements [`IntoDynNode`](dioxus_core::IntoDynNode) will be parsed as a child. We make two exceptions: both `for` loops and `if` statements are parsed where their body is parsed as a rsx nodes.
+
+```rust, no_run
+# use dioxus::prelude::*;
+rsx! {
+ div {
+ for _ in 0..10 {
+ span { "hello world" }
+ }
+ }
+};
+```
+
+Putting everything together, we can write a simple component that renders a list of
+elements:
+
+```rust, no_run
+# use dioxus::prelude::*;
+#[component]
+fn App() -> Element {
+ let name = "dave";
+ rsx! {
+ h1 { "Hello, {name}!" }
+ div { class: "my-class", id: "my-id",
+ for i in 0..5 {
+ div { "FizzBuzz: {i}" }
+ }
+ }
+ }
+}
+```
+
+## Components
+
+We can compose these function components to build a complex app. Each new component takes some Properties. For components with no explicit properties, we can omit the type altogether.
+
+In Dioxus, all properties are memoized by default with `Clone` and `PartialEq`. For props you can't clone, simply wrap the fields in a [`ReadSignal`](dioxus_signals::ReadSignal) and Dioxus will handle converting types for you.
+
+```rust, no_run
+# use dioxus::prelude::*;
+# #[component] fn Header(title: String, color: String) -> Element { todo!() }
+#[component]
+fn App() -> Element {
+ rsx! {
+ Header {
+ title: "My App",
+ color: "red",
+ }
+ }
+}
+```
+
+The `#[component]` macro will help us automatically create a props struct for our component:
+
+```rust, no_run
+# use dioxus::prelude::*;
+// The component macro turns the arguments for our function into named fields we can pass in to the component in rsx
+#[component]
+fn Header(title: String, color: String) -> Element {
+ rsx! {
+ div {
+ background_color: "{color}",
+ h1 { "{title}" }
+ }
+ }
+}
+```
+
+> You can read more about props in the [reference](https://dioxuslabs.com/learn/0.6/reference/component_props).
+
+## Hooks
+
+While components are reusable forms of UI elements, hooks are reusable forms of logic. Hooks provide a way of retrieving state from Dioxus' internal `Scope` and using
+it to render UI elements.
+
+By convention, all hooks are functions that should start with `use_`. We can use hooks to define the state and modify it from within listeners.
+
+```rust, no_run
+# use dioxus::prelude::*;
+#[component]
+fn App() -> Element {
+ // The use signal hook runs once when the component is created and then returns the current value every run after the first
+ let name = use_signal(|| "world");
+
+ rsx! { "hello {name}!" }
+}
+```
+
+Hooks are sensitive to how they are used. To use hooks, you must abide by the ["rules of hooks"](https://dioxuslabs.com/learn/0.6/reference/hooks#rules-of-hooks):
+
+- Hooks can only be called in the body of a component or another hook. Not inside of another expression like a loop, conditional or function call.
+- Hooks should start with "use\_"
+
+Hooks let us add a field of state to our component without declaring an explicit state struct. However, this means we need to "load" the struct in the right order. If that order is wrong, then the hook will pick the wrong state and panic.
+
+Dioxus includes many built-in hooks that you can use in your components. If those hooks don't fit your use case, you can also extend Dioxus with custom hooks.
+
+## Putting it all together
+
+Using components, rsx, and hooks, we can build a simple app.
+
+```rust, no_run
+use dioxus::prelude::*;
+
+fn main() {
+ dioxus::launch(App);
+}
+
+#[component]
+fn App() -> Element {
+ let mut count = use_signal(|| 0);
+
+ rsx! {
+ div { "Count: {count}" }
+ button { onclick: move |_| count += 1, "Increment" }
+ button { onclick: move |_| count -= 1, "Decrement" }
+ }
+}
+```
+
+## Conclusion
+
+This overview doesn't cover everything. Make sure to check out the [tutorial](https://dioxuslabs.com/learn/0.6/guide) and [guides](https://dioxuslabs.com/learn/0.6/guides) on the official
+website for more details.
+
+Beyond this overview, Dioxus supports:
+
+- Server-side rendering
+- Concurrent rendering (with async support)
+- Web/Desktop/Mobile support
+- Pre-rendering and hydration
+- Fragments, and Suspense
+- Inline-styles
+- Custom event handlers
+- Custom elements
+- Basic fine-grained reactivity (IE SolidJS/Svelte)
+- and more!
+
+Build cool things ✌️
diff --git a/packages/dioxus/README.md b/packages/dioxus/README.md
index b0a8eec427..2a086f4cbc 100644
--- a/packages/dioxus/README.md
+++ b/packages/dioxus/README.md
@@ -1,3 +1,4 @@
+
Element {
let name = "dave";
@@ -127,8 +125,6 @@ We can compose these function components to build a complex app. Each new compon
In Dioxus, all properties are memoized by default with `Clone` and `PartialEq`. For props you can't clone, simply wrap the fields in a [`ReadSignal`](dioxus_signals::ReadSignal) and Dioxus will handle converting types for you.
```rust, no_run
-# use dioxus::prelude::*;
-# #[component] fn Header(title: String, color: String) -> Element { todo!() }
#[component]
fn App() -> Element {
rsx! {
@@ -143,7 +139,6 @@ fn App() -> Element {
The `#[component]` macro will help us automatically create a props struct for our component:
```rust, no_run
-# use dioxus::prelude::*;
// The component macro turns the arguments for our function into named fields we can pass in to the component in rsx
#[component]
fn Header(title: String, color: String) -> Element {
@@ -156,7 +151,8 @@ fn Header(title: String, color: String) -> Element {
}
```
-> You can read more about props in the [reference](https://dioxuslabs.com/learn/0.6/reference/component_props).
+ >
+ > You can read more about props in the [reference](https://dioxuslabs.com/learn/0.6/reference/component_props).
## Hooks
@@ -166,7 +162,6 @@ it to render UI elements.
By convention, all hooks are functions that should start with `use_`. We can use hooks to define the state and modify it from within listeners.
```rust, no_run
-# use dioxus::prelude::*;
#[component]
fn App() -> Element {
// The use signal hook runs once when the component is created and then returns the current value every run after the first
@@ -179,7 +174,7 @@ fn App() -> Element {
Hooks are sensitive to how they are used. To use hooks, you must abide by the ["rules of hooks"](https://dioxuslabs.com/learn/0.6/reference/hooks#rules-of-hooks):
- Hooks can only be called in the body of a component or another hook. Not inside of another expression like a loop, conditional or function call.
-- Hooks should start with "use\_"
+- Hooks should start with "use_"
Hooks let us add a field of state to our component without declaring an explicit state struct. However, this means we need to "load" the struct in the right order. If that order is wrong, then the hook will pick the wrong state and panic.
@@ -226,4 +221,4 @@ Beyond this overview, Dioxus supports:
- Basic fine-grained reactivity (IE SolidJS/Svelte)
- and more!
-Build cool things ✌️
+Build cool things ✌️
\ No newline at end of file
diff --git a/packages/dioxus/src/lib.rs b/packages/dioxus/src/lib.rs
index 9a200476f6..518ddddd78 100644
--- a/packages/dioxus/src/lib.rs
+++ b/packages/dioxus/src/lib.rs
@@ -1,4 +1,4 @@
-#![doc = include_str!("../README.md")]
+#![doc = include_str!("../README-docs-rs.md")]
//!
//! ## Dioxus Crate Features
//!
diff --git a/packages/fullstack-hooks/README-docs-rs.md b/packages/fullstack-hooks/README-docs-rs.md
new file mode 100644
index 0000000000..f025fd32c3
--- /dev/null
+++ b/packages/fullstack-hooks/README-docs-rs.md
@@ -0,0 +1,32 @@
+# Dioxus Fullstack Hooks
+
+Dioxus fullstack hooks provides hooks and contexts for [`dioxus-fullstack`](https://crates.io/crates/dioxus-fullstack). Libraries that need to integrate with dioxus-fullstack should rely on this crate instead of the renderer for quicker build times.
+
+## Usage
+
+To start using this crate, you can run the following command:
+
+```bash
+cargo add dioxus-fullstack-hooks
+```
+
+Then you can use hooks like `use_server_future` in your components:
+
+```rust
+use dioxus::prelude::*;
+async fn fetch_article(id: u32) -> String {
+ format!("Article {}", id)
+}
+
+fn App() -> Element {
+ let mut article_id = use_signal(|| 0);
+ // `use_server_future` will spawn a task that runs on the server and serializes the result to send to the client.
+ // The future will rerun any time the
+ // Since we bubble up the suspense with `?`, the server will wait for the future to resolve before rendering
+ let article = use_server_future(move || fetch_article(article_id()))?;
+
+ rsx! {
+ "{article().unwrap()}"
+ }
+}
+```
diff --git a/packages/fullstack-hooks/README.md b/packages/fullstack-hooks/README.md
index f025fd32c3..5e3ba45bbc 100644
--- a/packages/fullstack-hooks/README.md
+++ b/packages/fullstack-hooks/README.md
@@ -1,3 +1,4 @@
+
# Dioxus Fullstack Hooks
Dioxus fullstack hooks provides hooks and contexts for [`dioxus-fullstack`](https://crates.io/crates/dioxus-fullstack). Libraries that need to integrate with dioxus-fullstack should rely on this crate instead of the renderer for quicker build times.
@@ -29,4 +30,4 @@ fn App() -> Element {
"{article().unwrap()}"
}
}
-```
+```
\ No newline at end of file
diff --git a/packages/fullstack-hooks/src/lib.rs b/packages/fullstack-hooks/src/lib.rs
index 83637de732..b48c2bb297 100644
--- a/packages/fullstack-hooks/src/lib.rs
+++ b/packages/fullstack-hooks/src/lib.rs
@@ -1,5 +1,5 @@
#![warn(missing_docs)]
-#![doc = include_str!("../README.md")]
+#![doc = include_str!("../README-docs-rs.md")]
pub mod history;
mod hooks;
diff --git a/packages/fullstack-protocol/README-docs-rs.md b/packages/fullstack-protocol/README-docs-rs.md
new file mode 100644
index 0000000000..cd0f68c0cc
--- /dev/null
+++ b/packages/fullstack-protocol/README-docs-rs.md
@@ -0,0 +1,3 @@
+# Fullstack Protocol
+
+Dioxus-fullstack-protocol is the internal protocol the dioxus web and server renderers use to communicate with each other in dioxus fullstack. It is used to send futures and values from the server to the client during fullstack rendering.
diff --git a/packages/fullstack-protocol/README.md b/packages/fullstack-protocol/README.md
index cd0f68c0cc..6aa81e153e 100644
--- a/packages/fullstack-protocol/README.md
+++ b/packages/fullstack-protocol/README.md
@@ -1,3 +1,4 @@
+
# Fullstack Protocol
-Dioxus-fullstack-protocol is the internal protocol the dioxus web and server renderers use to communicate with each other in dioxus fullstack. It is used to send futures and values from the server to the client during fullstack rendering.
+Dioxus-fullstack-protocol is the internal protocol the dioxus web and server renderers use to communicate with each other in dioxus fullstack. It is used to send futures and values from the server to the client during fullstack rendering.
\ No newline at end of file
diff --git a/packages/fullstack-protocol/src/lib.rs b/packages/fullstack-protocol/src/lib.rs
index 5f81d12030..c16a25828f 100644
--- a/packages/fullstack-protocol/src/lib.rs
+++ b/packages/fullstack-protocol/src/lib.rs
@@ -1,5 +1,5 @@
#![warn(missing_docs)]
-#![doc = include_str!("../README.md")]
+#![doc = include_str!("../README-docs-rs.md")]
use base64::Engine;
use dioxus_core::CapturedError;
diff --git a/packages/fullstack/README-docs-rs.md b/packages/fullstack/README-docs-rs.md
new file mode 100644
index 0000000000..23dcaffaa0
--- /dev/null
+++ b/packages/fullstack/README-docs-rs.md
@@ -0,0 +1,157 @@
+# Dioxus Fullstack
+
+[![Crates.io][crates-badge]][crates-url]
+[![MIT licensed][mit-badge]][mit-url]
+[![Build Status][actions-badge]][actions-url]
+[![Discord chat][discord-badge]][discord-url]
+
+[crates-badge]: https://img.shields.io/crates/v/dioxus-fullstack.svg
+[crates-url]: https://crates.io/crates/dioxus-fullstack
+[mit-badge]: https://img.shields.io/badge/license-MIT-blue.svg
+[mit-url]: https://github.com/dioxuslabs/dioxus/blob/main/LICENSE-MIT
+[actions-badge]: https://github.com/dioxuslabs/dioxus/actions/workflows/main.yml/badge.svg
+[actions-url]: https://github.com/dioxuslabs/dioxus/actions?query=workflow%3ACI+branch%3Amaster
+[discord-badge]: https://img.shields.io/discord/899851952891002890.svg?logo=discord&style=flat-square
+[discord-url]: https://discord.gg/XgGxMSkvUM
+
+[Website](https://dioxuslabs.com) |
+[Guides](https://dioxuslabs.com/learn/0.6/) |
+[API Docs](https://docs.rs/dioxus-fullstack/latest/dioxus_fullstack/) |
+[Chat](https://discord.gg/XgGxMSkvUM)
+
+Fullstack utilities for the [`Dioxus`](https://dioxuslabs.com) framework.
+
+# Features
+
+- Integrates with the [Axum](./examples/axum-hello-world/src/main.rs) server framework with utilities for serving and rendering Dioxus applications.
+- [Server functions](https://docs.rs/dioxus-fullstack/latest/dioxus_fullstack/prelude/attr.server.html) allow you to call code on the server from the client as if it were a normal function.
+- Instant RSX Hot reloading with [`dioxus-hot-reload`](https://crates.io/crates/dioxus-hot-reload).
+- Passing root props from the server to the client.
+
+# Example
+
+Full stack Dioxus in under 30 lines of code
+
+```rust, no_run
+#![allow(non_snake_case)]
+use dioxus::prelude::*;
+
+fn main() {
+ dioxus::launch(App);
+}
+
+#[component]
+fn App() -> Element {
+ let mut meaning = use_signal(|| None);
+
+ rsx! {
+ h1 { "Meaning of life: {meaning:?}" }
+ button {
+ onclick: move |_| async move {
+ if let Ok(data) = get_meaning("life the universe and everything".into()).await {
+ meaning.set(data);
+ }
+ },
+ "Run a server function"
+ }
+ }
+}
+
+#[server]
+async fn get_meaning(of: String) -> ServerFnResult