Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
43 changes: 43 additions & 0 deletions packages/autofmt/README-docs-rs.md
Original file line number Diff line number Diff line change
@@ -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.
22 changes: 11 additions & 11 deletions packages/autofmt/README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,11 @@
<!-- This file is autogenerated from README-docs-rs.md. Edit that file instead and rerun `cargo run --package crates-io-readme` before publishing -->
# 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) |
Expand All @@ -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
2 changes: 1 addition & 1 deletion packages/autofmt/src/lib.rs
Original file line number Diff line number Diff line change
@@ -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")]

Expand Down
39 changes: 39 additions & 0 deletions packages/check/README-docs-rs.md
Original file line number Diff line number Diff line change
@@ -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.
22 changes: 11 additions & 11 deletions packages/check/README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,11 @@
<!-- This file is autogenerated from README-docs-rs.md. Edit that file instead and rerun `cargo run --package crates-io-readme` before publishing -->
# 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) |
Expand All @@ -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
2 changes: 1 addition & 1 deletion packages/check/src/lib.rs
Original file line number Diff line number Diff line change
@@ -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")]

Expand Down
53 changes: 53 additions & 0 deletions packages/cli-config/README-docs-rs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<div align="center">
<img
src="https://github.com/user-attachments/assets/6c7e227e-44ff-4e53-824a-67949051149c"
alt="Build web, desktop, and mobile apps with a single codebase."
width="100%"
class="darkmode-image"
>
</div>

# 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.
55 changes: 51 additions & 4 deletions packages/cli-config/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,54 @@
# dioxus-cli-config
<!-- This file is autogenerated from README-docs-rs.md. Edit that file instead and rerun `cargo run --package crates-io-readme` before publishing -->
<div align="center">
<img
src="https://github.com/user-attachments/assets/6c7e227e-44ff-4e53-824a-67949051149c"
alt="Build web, desktop, and mobile apps with a single codebase."
width="100%"
class="darkmode-image"
>
</div>

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.
Loading
Loading