Commit Graph
7117 Commits
Author SHA1 Message Date
Sebastian Flügge 82c3cab25f fix(autofmt): preserve indentation of commented-out RSX blocks (#5464)
* test: add failing idempotency tests for commented-out RSX blocks

Two variants of the regression introduced in v0.7.4 (#5257):
- commented_rsx_block: first line keeps indent, rest gets dedented
- commented_rsx_block_nested: entire block gets dedented

See #5463

* fix(autofmt): preserve indentation of commented-out RSX blocks

Trailing comments before `}` in write_rsx_block were indented at
parent level instead of child level. Truncate the tab from
tabbed_line() and bump indent to child level before
apply_line_comments, same approach as write_trailing_body_comments.

Fixes #5463
2026-04-21 17:16:20 -07:00
Jonathan Kelley cd54f5953b update the dioxus cratesio readme, add many more examples (#5501)
* update the dioxus cratesio readme

* fix example

* fix header

* add a bunch more examples
2026-04-21 17:07:48 -07:00
Jonathan Kelley 74e7d20f80 remove dioxus 0.7 callout in readme 2026-04-21 15:16:25 -07:00
Jonathan Kelley 3efe4bf14f remove image splash in readme 2026-04-21 15:15:48 -07:00
Lukas Kreussel cb8359a99b Dont borrow again (#5499) 2026-04-21 13:59:12 -07:00
Servus Altissimi 8f5c4d9f25 Added FreeBSD case for esbuild package (#5498) 2026-04-21 13:54:26 -07:00
Jonathan Kelley 86d8e58443 fix 404 links for dioxus/manganis 2026-04-21 13:53:58 -07:00
Jonathan Kelley 51b0cd3313 fix: more panic resilience (#5489)
* fix: more panic resilience

* fix: panic typos
2026-04-14 17:58:50 -07:00
John CostaandJonathan Kelley cb5abb48dd fix(cli): display user-specified address in serve output (#5481)
* fix(cli): display user-specified address in serve output

When running `dx serve --addr 0.0.0.0`, the CLI was overriding the
displayed address to 127.0.0.1. This was confusing for users who
explicitly chose 0.0.0.0 and expected the output to reflect their
choice. The default (127.0.0.1) is unchanged when no --addr flag is
given.

Fixes #5477

* fix(cli): resolve actual network IP when bound to 0.0.0.0

Instead of showing the unroutable 0.0.0.0, use the UDP socket trick
to resolve the machine's primary network address for a clickable URL.
Falls back to 127.0.0.1 when resolution fails (no network, etc).

* style: apply rustfmt to test function calls

* fit longer urls in tui frame

* space

---------

Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
2026-04-14 16:52:43 -07:00
MartinandJonathan Kelley 79693f8cff Minor fixes for tests (#4686)
* Suggested method for correcting integration tests

* Use static atomics for simplicity

This is consistent with the test immediately below.

* Add assertions to some tests, comments to others

This should fix a handful of tests that didn't correctly do their test.

In other places, comments should make it clearer *why* tests are how
they are.

* Be consistent with existing imports

* remove bad test

* nit

* fix compile errrs

---------

Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
2026-04-14 15:37:30 -07:00
Jonathan Kelley 679ba83652 make Action partialeq (#5488)
* make Action partialeq

* better docs, hoist to macro_rules

* doc
2026-04-14 14:34:41 -07:00
Evan Almloff 94e4465244 fix resize and visible types (#5483) 2026-04-14 12:10:58 -07:00
Jonathan Kelley fb855b7088 fix: workspace hotpatch cache thrashing, feat: add compile profiling, cleanup + refactor + document cli request.rs file (#5479)
* it works!

* fix wasm hotpatch error

* bump wasmopt

* rename wasmopt flag

* rename ldd_keep_exports

* add build profiling

* undo bundle ignore

* some cleanups

* more cleanups

* wip: hoist up telemetry to builder

* fix compile

* wip: flamegraph rewrite

* clean up flamegraph impl

* cleanup profiling engine

* add comment on spans obj

* cleanup more phases

* more cleanup

* small cleanups

* bit more cleanups

* cleanup phases

* sign with tokio, not std proc

* split out the specific platform helpers

* cleanup a bit

* more cleanups

* more cleanups

* more cleanups

* more cleanups

* pull out fingerprint logic

* wip... I think I have a slightly better approach. saving checkpoint

* hm I think it's better now?

* fix: also seems to work not in workspace mode juuust yet

* okay yay almost there

* clooose but not there yet

* fix: manually export __wasm_apply_data_relocs since got relocations weren't firing

WASM workspace hotpatching: export __wasm_apply_global_relocs to fix call_indirect type mismatch

When workspace crates are recompiled with -Crelocation-model=pic for hotpatching, wasm-ld generates GOT.func.internal globals that hold element-segment-relative offsets (e.g., MetricCardProps::memoize = 31). These need __table_base added at runtime by __wasm_apply_global_relocs to become absolute table indices.

wasm-ld generates __wasm_apply_global_relocs but treats it as an internal synthetic function -- neither --export nor --export-if-defined will export it. Without the export, the runtime's call silently failed (the old code used unchecked_into on undefined), leaving the globals unrelocated. Function pointers then pointed to index 31 in the original module's table (some unrelated function) instead of table_base + 31 (the patched function), causing call_indirect to a signature that does not match.

Three changes:

patch.rs: After walrus processing, find __wasm_apply_global_relocs by name and add it as an export before emitting the patched wasm.
lib.rs: Replace unchecked_into with dyn_into for calling relocation functions, so missing exports are handled gracefully instead of silently swallowed.
link.rs: Remove the ineffective --export-if-defined flags that were added during debugging.

* cleanup

* fix scope dir

* change up naming a bit

* more tidying up

* more cleanups

* ignore early return

* clean er up

* more comprehensive cache bustign

* bust fingerprints of dag

* move bust_fingerprint back to request.rs

* add better rustdoc

* more idiomatic

* more cleanups

* fix panic, typos

* more lints

* only delete workspace prints in fat mod

* clippy
2026-04-14 12:09:49 -07:00
Nico Burns 348208d1cb Remove bevy from the workspace (#5471)
Signed-off-by: Nico Burns <nico@nicoburns.com>
2026-04-10 10:38:13 -07:00
dunkylandEvan Almloff da445fdeb6 Fix: notify parent store when child is marked dirty (#5365)
* add tests

* fix: include root node when store is marked dirty

* fix tracking deep subscriptions. We need to walk all parents for deep subscriptions instead of relying on tracking all children recursively during the initial read since some children may not exist yet

* avoid double notifying parents when children re-visit parents in deep mark dirty

---------

Co-authored-by: Evan Almloff <evanalmloff@gmail.com>
2026-04-10 11:44:26 -05:00
Trevin Chow 35826114c5 feat(html): add inert global HTML attribute (#5476)
Add the `inert` boolean attribute to the global HTML attribute
group and to the SSR boolean attributes list. This allows users
to set `inert` on any HTML element, matching the HTML spec.

Fixes #5455
2026-04-10 12:25:53 +01:00
Jonathan Kelley 71df8c790f fix: clippy 2026-04-07 18:48:04 -07:00
faysouandJonathan Kelley 56882b97e5 feat: support Cursor editor as debug session option (#5205)
* feat: support Cursor editor as debug session option

* fmt

---------

Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
2026-04-07 18:13:38 -07:00
Trevin ChowandJonathan Kelley e396c1f04b feat: add blanket IntoAttributeValue impl for references (#5447)
* feat: add blanket IntoAttributeValue impl for references

Adds `impl<T: IntoAttributeValue + Clone> IntoAttributeValue for &T` so
users don't need to explicitly dereference or clone when passing references
to RSX attributes.

Closes #5444

* use to-owned

---------

Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
2026-04-07 17:09:58 -07:00
SuperKenVeryandJonathan Kelley 95fdca3cbf fix: Content-hash-based filename when bundling with wasm_split (#5340)
Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
2026-04-07 16:33:01 -07:00
Jonathan Kelley c73dc43233 fix(autofmt): add support for handling comments in various expression types (#5461)
* fix(autofmt): add support for handling comments in various expression types

* fmt
2026-04-07 16:19:00 -07:00
Samuel ÅkessonandJonathan Kelley 689e39b3f6 Add shell-completions for dx (#5232)
* add naive shell completion using clap_complete

* first pass completions

* simpler toggle

---------

Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
2026-04-07 15:25:11 -07:00
Evan Almloff d8026f8824 Fix autofill event downcast - ignore events of the wrong type (#5379)
* fix autofill events

* ignore the wrong type of event like we do in desktop

* check the event type before dispatch instead of panicing on downcast

* clean up conversion

* remove example

* pull out shared event list

* pull in deserialize_raw

* unified event list

* prettier comment

* restore test

* restore alias

* normal doc comments

* move over comments

* minimize diff

* remove alias, was moved into the macro
2026-04-07 13:18:24 -07:00
Lluc Simó 610ee8107f fix: ensure file type bit is set for rpm bundle (#5459)
By using the `permissions()` method of `FileOptionsBuilder`,
which was added in version 0.20.0 of the `rpm` crate, we fix
a bug where newer versions of `rpm` (the package, not the
crate) would fail when installing the bundle.
2026-04-07 12:55:16 -07:00
Gabriël KonatandEvan Almloff a07b406699 Fix too restrictive Clone bounds in props with generics (#5451)
* Manually implement Clone for *WithOwner for less restrictive bounds.

* add tests

* fix clippy

---------

Co-authored-by: Evan Almloff <evanalmloff@gmail.com>
2026-04-06 13:18:10 -05:00
Jonathan Kelley d027e26046 Release 0.7.5
dioxus-autofmt@0.7.5
dioxus-cli@0.7.5
dioxus-component-manifest@0.7.5
dioxus-desktop@0.7.5
dioxus-fullstack@0.7.5
dioxus-html@0.7.5
dioxus-server@0.7.5
dioxus-web@0.7.5
manganis@0.7.5

Generated by cargo-workspaces
2026-04-06 10:50:46 -07:00
Evan AlmloffandJonathan Kelley 14f3e71722 Check minimum versions in CI (#5437)
* check minimum versions

* fix min lockfile

* fix clippy

* Delete .codex

* fix toml min version

* add cache to min-deps

---------

Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
2026-04-03 15:51:42 -07:00
Blake Scampone 6e5b370481 Fixed issue #5438: Added FIPS Compliance flag to candle.exe command (#5439) 2026-04-03 15:50:59 -07:00
Yuval Deutscher 28c696bbfb Add support for aarch64 Windows platform in wasm_opt (#5442) 2026-04-03 15:49:30 -07:00
Emiliano Maldonado Garza 291c110dd4 fix(lld): use -B flag (#5443) 2026-04-02 17:39:10 -07:00
John Costa 45442af41d fix(server): don't redirect error responses from #[get] server functions (#5429)
The post-handler redirect logic was unconditionally converting responses
to 302 Found when the request had Accept: text/html and a Referer header.
This overwrote error status codes (4xx, 5xx), making it impossible to
return errors from #[get] endpoints accessed via browser navigation.

Add a response.status().is_success() guard so only successful responses
get the Post/Redirect/Get treatment.

Fixes #5428
2026-03-30 18:46:48 -07:00
John CostaandJonathan Kelley e5b9c39f4e fix(autofmt): remove extra whitespace before commas in for-loop tuple patterns (#5384)
* fix(autofmt): remove extra whitespace before commas in for-loop tuple patterns

`dx fmt` was adding spaces before commas in for-loop destructuring
patterns (e.g. `for (index , name , value)`) because `TokenStream::Display`
inserts spaces between every token. Route the pattern through prettyplease
via a new `unparse_pat` helper, following the existing `unparse_expr` pattern.

Fixes #5348

* style: apply rustfmt to writer.rs

---------

Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
2026-03-27 17:15:32 -07:00
Jonathan Kelley fff2e3d5a9 Release Dioxus v0.7.4 2026-03-27 16:58:44 -07:00
Jonathan Kelley 1eb00b5e00 commit lf desktop readme 2026-03-27 13:35:17 -07:00
Brock 0d94a51ec8 fix(cli): skip platform-specific test assertions when tools are unavailable (#5386)
The test_harnesses::run_harness test panics on machines without
Android NDK/SDK installed and on non-macOS platforms for iOS
assertions. Skip these assertions gracefully instead of failing
the entire test suite.

- Android assertions: skip when get_android_tools() returns None
- iOS assertions: skip when not running on macOS
2026-03-26 23:35:25 -07:00
Javier SuandJonathan Kelley 232a8dc83d fix: additional new line in info.plist (#5389)
Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
2026-03-26 23:10:08 -07:00
Matt JenkinsonandJonathan Kelley 371dfe5264 feat: allow config for showing the main app on tray icon click (#5361)
Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
2026-03-26 17:14:10 -07:00
Brock b94f8c6b5f chore: add .gitattributes for consistent line endings (#5385)
Normalize line endings to LF across all platforms. Without this,
Windows contributors get CRLF warnings on every checkout and test
run due to generated harness files.
2026-03-26 17:12:47 -07:00
Jonathan Kelley 5a8d5afb64 fix dup esbuild download 2026-03-26 17:12:12 -07:00
niminypiminy 364fbc2207 Updated dependencies build.gradle.kts.hbs (#5402)
This fixes the android security warning
2026-03-26 17:06:30 -07:00
Pete Watts 5d2f607681 Fix using iOS mobile simulator on Intel Mac. (#5268) 2026-03-26 16:46:44 -07:00
Jonathan Kelley 20e242628d fix stutter in bundle, fix nsis, fix msi bundling (#5412)
* fix stutter in bundle, fix nsis, fix msi bundling

* fmt

* rename android libname to `libmain`, rename server exe to `server`

* fix hot-dog url handling

* set linux product name

* update schema
2026-03-26 13:05:11 -07:00
Acheul a42dd1320b fix: diffing debug in push_all_root_nodes() (#5413) 2026-03-26 09:18:14 -07:00
John Costa cece12b57e docs: clarify difference between use_context and consume_context (#5406)
* docs: clarify difference between use_context and consume_context

Document the key distinction: use_context is a hook that captures the
context value once on first render and caches it, following the rules
of hooks. consume_context reads directly from the runtime each time
and can be called from anywhere (event handlers, async tasks, etc.).

Fixes #3862

* fix: remove redundant explicit rustdoc link targets

* fix: use plain text for cross-crate use_context reference in rustdoc
2026-03-24 08:10:13 -05:00
Jonathan Kelley 7289256b0a version tools (#5407)
* version tools

* move bundling tools to `~/.dx/tools`
2026-03-23 17:18:57 -07:00
Jonathan Kelley b2d01e6779 rip out tauri bundle (v2), swc -> esbuild, blacksmith -> warpbuild, FAST CI 🚀 (#5328)
- inline mac, windows, linux bundling in the cli
- remove tauri bundle from our dep tree
- trim down the rpm crate for fewer dependencies in tree
- migrate from blacksmith to warpbuild
- move off swc and instead use esbuild via tool
- use dev drives in windows CI
- use fork of nix action for faster caching
- test bundling in CI
- fix asset handling in linux 
- add default APPDATA location for webview2 installs for dioxus apps on windows
2026-03-20 12:27:13 -07:00
BillionTokenandBillionClaw be7296f4f0 fix(file-explorer): prevent entering files as directories (#5383)
The file_explorer example had two issues:
1. Used heuristic (contains '.') to detect files vs directories, which is unreliable
2. Tried to enter files as directories when clicked, causing errors

Changes:
- Use path.is_file() for accurate file detection
- Use path.is_dir() check before entering a directory
- Rename shadowed 'path' variable to 'path_display'

Fixes #5368

Co-authored-by: BillionClaw <267901332+BillionClaw@users.noreply.github.com>
2026-03-18 15:19:24 +00:00
InfinoidandEvan Almloff 049e4416f2 Update doc reference: SsrRender → Renderer (#5378)
* Update doc reference: SsrRender → Renderer

* make it a code link

---------

Co-authored-by: Evan Almloff <evanalmloff@gmail.com>
2026-03-16 15:01:00 -05:00
Evan Almloff 77a50f916f Fix opening native targets while they are still building and retry tcp connections to avoid server is still loading page (#5358)
* retry tcp connections

* don't open native binaries that don't exist

* fix formatting

* fix proxy
2026-03-13 13:01:42 -05:00
Martin Martinez Rivera f472349012 Update workflow to working intel macOS image (#5336) 2026-03-12 20:29:44 +00:00