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