Commit Graph
5095 Commits
Author SHA1 Message Date
Jonathan Kelley 32e46d98be implement files() on web data transfer 2025-10-30 19:22:08 -07:00
Jonathan Kelley 1015a9ed6c fix dual serve (#4865) 2025-10-30 19:16:29 -07:00
Omar Mohamed Khallaf a4d1fd848d feat: add option to statically add js and css assets to the header at compile time (#4653)
Signed-off-by: Omar Mohamed <mohamed.omar67492@gmail.com>
2025-10-30 18:55:51 -07:00
Javier E. 3f931e8409 Add some functions to read/write request header for server functions (#4823)
* Add some functions to read/write request header for server functions

* Use LazyLock<Mutex<_>> to allow rewriting and clearing request headers.
2025-10-30 18:54:14 -07:00
Evan Almloff ee1719af92 Expand relative assets to a placeholder if we are running in rust (#4860)
analyzer
2025-10-30 18:53:39 -07:00
Evan Almloff 566dab939f Relax asset resolver bounds and document resolving folder assets (#4859)
* relax asset bounds and document resolving folder assets

* fix docs for folder asset_path
2025-10-30 18:53:26 -07:00
Jonathan Kelley 5559e463c8 multiple fullstack nits/cleanups before release (#4852)
* feat: `:arg` syntax for serverfn

* add better decode/encode verify message

* allow catch-all query args

* add rebind

* implement websocket frames for `Streaming`

* fix lazy init

* wip... serverfnstate

* wip...

* wip: serverfns require Send/Sync, let's fix that

* wip...

* small cleanup

* fix hang by actually spawning the tokio task

* clippy

* fix parameter catchall binding

* fix lychee

* doc tests
2025-10-30 18:52:47 -07:00
Evan Almloff 43373f0be7 Fix updating components and local components (#4856)
* Fix updating components and local components

* fix typo
2025-10-28 17:02:56 -07:00
Sabin RegmiandJonathan Kelley 6e3f362872 Pipe Android/ADB logs into CLI (#4853)
* Enhance Android log handling in AppBuilder

- Introduced adb_logcat fields to manage Android logcat output.
- Implemented logcat spawning and parsing to differentiate log levels.
- Updated push_stdio method to filter Android logs based on trace settings.
- Added utility functions for retrieving app PID and parsing logcat levels.

* automatic retry to get pid

* pipe RustStdoutStderr as well

* strip logcat prefix

* filter in rust instead

* Refine log filtering in Rust output handling

- Improved log level detection by checking for prefixes after the colon in messages.
- Enhanced filtering to only show logs with standard tracing levels or fatal errors.
- Streamlined the process of stripping logcat metadata while preserving message content.

* cleanup output and kill proc

* capture logs from ios device

* clippy

---------

Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
2025-10-28 12:35:34 -07:00
Jonathan Kelley 24df6439ea feat: set windows subsytem to windows for gui apps (#4855)
* feat: set windows subsytem to windows for gui apps

* typo

* clippy
2025-10-28 11:38:52 -07:00
Amar Sood 8adea41efa Add option_asset! to match asset! (#4791) 2025-10-28 11:26:21 -07:00
Evan Almloff e656bace5c restore the extract function for server functions (#4849)
* restore the extract function for server functions

* fix compilation

* Move most fields under one shared lock

* fix typo

* fix clippy

* restore somewhat misleading FromRequest bound

* remove unused import

* fix doc links
2025-10-27 15:54:24 -07:00
Norbert Bolanowski 5786c9396f Fix missing query string on #[get] server functions (#4827) 2025-10-27 15:15:45 -07:00
Jonathan Kelley 281f68faf5 use CapturedError as dioxus::Ok() so resources still function as expected (#4851) 2025-10-27 15:06:21 -07:00
Jonathan Kelley 9f0bacc85c fix: tokio rt is not set when calling handlers (#4850) 2025-10-27 14:30:23 -07:00
Jonathan Kelley c3ff0c0ab3 Fix: initializer race condition causing android to break 2025-10-27 12:45:54 -07:00
Evan AlmloffandJonathan Kelley 07a0aa852b Pin tauri-macos-sign (#4845)
* pin tauri-macos-sign

* fix nix by pining `home

---------

Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
2025-10-27 12:44:24 -07:00
Koji AGAWA ddeeb540fc fix(cli): correct Android toolchain target for 32-bit arm architectures (#4837)
* fix(cli): correct Android toolchain target for 32-bit arm architectures

* style: rustfmt
2025-10-27 12:40:39 -07:00
Evan Almloff 9b52aa6607 Skip emitting a transposed type if the original type is entirely generic (#4838)
* Skip transposed type if the type is generic

* fix clippy
2025-10-27 12:37:02 -07:00
Evan Almloff e4297d0e09 Readable and Writable helpers for String, HashMap and HashSet (#4834)
* Add more read/write methods for string signals

* add helpers for HashMap and HashSet as well

* fix typo

* fix conflicting string and str extensions

* fix counters example
2025-10-27 11:39:48 -07:00
luckybelcikandJonathan Kelley 3eecfaa0a7 fix(hotpatch): Gracefully handle missing '-flavor' flag during WASM link (#4833)
* fix(hotpatch): Gracefully handle missing '-flavor' flag during WASM link

* drops logs

---------

Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
2025-10-27 09:58:28 -07:00
Jonathan Kelley 047e518edf feat: allow .set() on UseWebsocket to drive the connection manually 2025-10-24 19:35:59 -07:00
Nico Burns 2bbfccfd04 Native: implement hot-reloading of stylesheets (#4830)
* Make `tracing` feature of dioxus-native enable `tracing` feature of dioxus-native-dom

* Native: implement hotreloading of stylesheet assets

* Add asset support for native-headless-in-bevy example

Signed-off-by: Nico Burns <nico@nicoburns.com>

* Remove println statements

Signed-off-by: Nico Burns <nico@nicoburns.com>

---------

Signed-off-by: Nico Burns <nico@nicoburns.com>
2025-10-24 15:56:55 -07:00
Evan Almloff c55a29e930 fix the info message for the dx components subcommand (#4832) 2025-10-22 22:52:08 +01:00
Evan AlmloffandJonathan Kelley 987e41de16 CLI fixes for hotpatching the playground (#4715)
* add component subcommand

* add dx component add, remove and list commands

* handle rust dependencies

* handle component dependencies

* fetch remote registries

* sort components before listing them

* remove local dependency

* move te component manifest into the dioxus workspace

* add additional instalation instructions the first time the component
module is created

* fix mod name

* fix clippy

* improve docs and move to the main branch of components

* fix typos

* more typos

* undo const-serialize changes

* remove a few unwraps

* Allow adding multiple components at once and add a `--all` flag

* add options to the config for the base path, global asset path and
default registry

* component_path -> component_dir

* component_dir is always relative to the crate root

* fix clippy

* fix hot patching with a base path

* read the hot patch file from stdin instead of a CLI arg to allow for longer inputs

* fix request imports

* wip: code style changes

* rename to "components" instead of "component"

* bump lock

* move to method on request

* read until eof in the case of pretty json

* strip is now copy

---------

Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
2025-10-20 17:50:27 -04:00
Evan AlmloffandJonathan Kelley 79613f9db9 DX components command (#4669)
* add component subcommand

* add dx component add, remove and list commands

* handle rust dependencies

* handle component dependencies

* fetch remote registries

* sort components before listing them

* remove local dependency

* move te component manifest into the dioxus workspace

* add additional instalation instructions the first time the component
module is created

* fix mod name

* fix clippy

* improve docs and move to the main branch of components

* fix typos

* more typos

* undo const-serialize changes

* remove a few unwraps

* Allow adding multiple components at once and add a `--all` flag

* add options to the config for the base path, global asset path and
default registry

* component_path -> component_dir

* component_dir is always relative to the crate root

* fix clippy

* fix request imports

* wip: code style changes

* rename to "components" instead of "component"

* bump lock

---------

Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
2025-10-20 17:20:46 -04:00
b3966c3509 Support public dir (#4783)
* Add optional static_dir support

- add optional application.static_dir field defaulting to none
- copy configured static directory into web output during build/serve
- document config knob and add unit tests
- force full rebuild when static_dir contents change
- sync removes stale outputs and logs copy activity
- track static manifest next to platform dir

Tests: cargo fmt

* default to public dir to match vite

* static_dir -> public_dir

* wip

* deser as none...

* wip... use .manifest.json

* implement dumb form of asset manifest generation

* implement manifest using asset system directly

* cleanup

* dont create extra asset dir for server

---------

Co-authored-by: Evan Almloff <evanalmloff@gmail.com>
Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
2025-10-20 17:03:34 -04:00
Jonathan Kelley 2f6be083ce fix merge conflict 2025-10-20 13:00:59 -04:00
Jonathan Kelley 306639ee9f follow up to serveconfig (#4820)
* remove latent dbg!

* cleanup serveconfig
2025-10-20 12:22:35 -04:00
Rick Wong 7408a33be7 Removed wasm rel-preload link from bundle index.html to save bandwidth for Safari users (#4796) 2025-10-20 12:20:46 -04:00
Jasper Bekkers 9a1cbf50a7 👩‍🏫 Add support for (#4811) 2025-10-20 12:05:27 -04:00
Jonathan KelleyandEvan Almloff 19ada89cec resolve the index before rendering (#4806)
Co-authored-by: Evan Almloff <evanalmloff@gmail.com>
2025-10-19 15:03:57 -04:00
Amos Wenger 5018074a12 Elements: add autocorrect attribute to <input> and <textarea> (#4797)
See https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Global_attributes/autocorrect
2025-10-19 15:03:39 -04:00
Jonathan Kelley 20fa29ac6e feat: allow setting http response header in fullstack 2025-10-15 01:20:16 -07:00
Jonathan Kelley 0aa7351473 datatransfer object, drag_and_drop example, fix drag-and-drop (#4789)
* wip: implement datatransfer

* Editable kanban contents

* desktop sorta works without crashing

* lint
2025-10-15 01:06:13 -07:00
Jonathan Kelley 7856679641 remove --docs cfg to fix docsrs building (#4788) 2025-10-14 20:18:13 -07:00
Jonathan Kelley 056b47fcd0 fix: ios hotpatching due to missing isysroot flag 2025-10-14 19:59:25 -07:00
Jonathan Kelley 7102bc3b6a more fullstack cleanups: loaders serialize, ServeConfig only (#4785)
* some opinionated cleanups in dioxus-server

* add serialize to loader

* add `result` to Resource

* clippy

* fix

* writable memos, resources, `onmount`, `.pending`, and `.value()` on actions

* fix compile issues

* fix typo
2025-10-14 17:34:52 -07:00
Amar Sood a3e40a5ea2 Prevent hot patch from leaving devserver in BuildError state (#4784)
Scenario: without this patch, if you fail a build, fix the code, let the thin build succeed, and then refresh the browser... then after reloading the browser page, it gets stuck on the "One sec" loader because the devserver status never clears the earlier BuildError.

- mark build status ready after sending hot patch messages so refreshes succeed
- reuse the same helper from reload command to avoid stale loading screens
- add set_ready() helper to avoid duplicate status broadcasts
2025-10-14 16:18:35 -07:00
Jonathan Kelley 8f6e7dc1f2 fix: server function custom errors set status codes (#4782)
* fix: handling status codes from errors

* add demo

* clippy + check

* fix clippy again
2025-10-13 16:02:33 -07:00
Herbert MaschkeandHerbert Maschke fc069f0faf Feat: "dx new" check if given project name is available in filesystem (#4773)
Co-authored-by: Herbert Maschke <thyseus@pm.me>
2025-10-13 14:23:59 -07:00
Moritz Hedtke 6d5e1ac8de Don't rely on window (#4775) 2025-10-13 12:44:03 -07:00
Moritz Hedtke cf893dc94a Fix on NixOS (#4776) 2025-10-13 12:43:50 -07:00
Jonathan Kelley 76319005b8 use queue_events instead of process_events to fix ssr issue (#4772)
* use `queue_events` instead of `process_events` to fix ssr issue

* remove suspense wait from liveview
2025-10-11 21:03:54 -07:00
Jonathan Kelley 01db142750 fix collect2 ld error with hotpatching (#4771)
* get repro case

* disable --with-deps for playwright

* extend hotpatch with better path
2025-10-11 20:33:10 -07:00
Moritz Hedtke 16bbabb3e3 Fix base path for wasm splitting (#4770) 2025-10-11 20:04:00 -07:00
Amar Sood 11b2ea7f39 Fix wasm hotpatching for zero-sized data symbols (#4747) 2025-10-10 21:44:15 -07:00
Jonathan Kelley 9243ef4128 redirects, middleware, Transport, set/capture error status (#4751)
* wip: redirect

* redirect example

* fix file upload not in a form

* wip

* deny missing cfgs

* wip: add router fallback but it's not working

* fix suspense bug after rebuilds that queued work

* more cleanup

* add test for error codes

* add helpful comment

* bring back middleware annotation

* fix cfg

* add server feature

* fix doctest

* just disable liveview test for now

* fix liveview

* dont send init

* cache more playwright!

* add more pkgs to cache
2025-10-10 21:43:57 -07:00
Amar Sood 8a81475ba8 Handle wasm-bindgen wbg_cast helper in wasm hotpatching (#4748) 2025-10-10 18:55:33 -07:00
Nico Burns 0ca8c86cbd native: disable debug logs by default (#4740)
Signed-off-by: Nico Burns <nico@nicoburns.com>
2025-10-10 18:04:49 -07:00