Commit Graph
4865 Commits
Author SHA1 Message Date
Evan Almloff 9b16cbf254 Fix url encoding query and implement FromQueryArgument for Option<T> (#4213)
* Fix url encoding queries

* handle percent encoding hash fragments

* implement fromqueryargument for Option<T>

* fix tests

* fix typo
2025-06-02 13:14:53 -05:00
Evan AlmloffandJonathan Kelley 58669f892d Move asset hashing into the CLI (#3988)
* Fix deduping assets

* hash assets in the linker

* fix extracting assets

* Fix the hashed asset name

* deserialize the asset back from the link section

* prevent the read from being inlined

* remove some extra logs

* Fix liveview routing

* Only look for direct dependencies on dioxus features

* fix wasm split test

* On wasm, create a new object file with the asset information

* Fix multiple assets

* add a regression test for 3467

* fix image link

* fix linker out file

* fix linux linker args

* add windows linker command

* fix linux link args

* fix windows target triple

* Expose an option to build assets in the linker intercept

* Fix the standalone optimizer and document it in the dx help command

* include the cli opt version in the hash

* fix clippy

* fix ssg port

* add a safety note to the read_volatile call

* move found assets log

* fix some merge conflicts

* fix build

* make most env var for the linker optional

* guess the target triple when dx acts as the linker intercept

* automatically find the linker for normal builds

* use the right linker in wasm mode

* fix mac linker

* look inside archive files (rlibs)

* remove out.txt

* fix clippy

* fix typo

* fix clippy

* fix build

* fix dx link name in docs

* ignore libcompiler_builtins warnings

* fix playwright

* pass typocheck

* fix printing sysroot

* Modify final binary

* fix wasm assets

* remove old link section logic

* fix tests

* forward manganis export args

* fail to evaluate relocatable address

* retain all exports in the same pattern as other platforms

* Fix adding assets during a wasm hot patch

* less nesting and remove logs

* fix clippy

* log pdb files

* read from pdb

* print data section contents

* print with object

* normal windows builds working

* fix hot patch windows

* clean up logs

* fix clippy

* clean up assets

* use the most recent pdb

* fix doc test

* fix typo

* tiny nits

* make bundled a reference instead of a pointer

* add helpful comment to impl

* match on file format

* Fix asset hashing comment

---------

Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
2025-05-31 21:45:12 +02:00
Leon Wimbes 39e783c19f update Playwright to 1.52.0 (#4125) 2025-05-31 14:12:04 +02:00
Craig 49e44f583e Remove schedule_update and schedule_update_any from prelude (#4128) 2025-05-31 14:06:13 +02:00
Nico Burns 51d7affc54 Upgrade to Blitz 0.1.0-alpha.2 (#4227)
* Update to use latest Blitz net traits

* Pass url to flush_style_attribute

* Add system-fonts feature to dioxus-native

* Native: cleanup log output

* Make dioxus-native work with Blitz simplified Document and Renderer traits

* Native: upgrade to event refactor

* Upgrade to blitz 0.1.0-alpha.2

* Add typo exception

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

* Ensure root_id is set to <main> element

---------

Signed-off-by: Nico Burns <nico@nicoburns.com>
2025-05-31 13:52:19 +02:00
Jonathan Kelley e1bd06bda5 unset CARGO_MANIFEST_DIR, don't set it to empty string (#4225)
* tie rust backtrace to verbosity to tracing

* dont panic
2025-05-30 22:22:43 +02:00
liga 90adffd236 fix: escape backslashes in debug locations for HTMLData serialization (#4116) 2025-05-30 22:20:41 +02:00
Jonathan Kelley 3565172255 fix merge conflict causing main to not build 2025-05-30 20:36:26 +02:00
Kristopher Ali 841256e7af Add the onload property to links (#3843) 2025-05-30 19:54:55 +02:00
leo030303and= f963958c3f Update global hotkey (#4207)
* Bump global-hotkey version

* Cargo lock bump

---------

Co-authored-by: = <=>
2025-05-30 19:44:06 +02:00
Evan Almloff 18d8e6a534 Fix dx bundle and release web builds (#4211)
* remove fullstack flag

* fix release web builds
2025-05-30 19:43:26 +02:00
laund 937e9b9789 subsecond/cli: fix linker and passing through -fuse-ld properly (#4222)
* subsecond/cli: fix passing through -fuse-ld for LinkerFlavour::Gnu

* if linker isn't a relative, local path, keep it unresolved since its a command on PATH
2025-05-30 13:06:57 +02:00
René Kijewski 3a5b68e56d chore(ssr): update askama_escape dependency (#4215) 2025-05-29 09:44:08 +02:00
Evan Almloff 77d10a40e3 Fix the toggle event (#4206) 2025-05-27 10:27:05 +02:00
CraigandEvan Almloff ffce3a7512 Clarify schedule_update docs (#4127)
* Clarify schedule_update docs

* Fix typos and improve phrasing for schedule_update_any

---------

Co-authored-by: Evan Almloff <evanalmloff@gmail.com>
2025-05-26 15:41:06 -05:00
Evan Almloff ee3b45af49 Restore docs CI checks and fix all doc lints (#4204) 2025-05-26 19:50:51 +01:00
Jonathan Kelley 9027ffc278 attempt to fix playwright (#4198)
* disable precompress by default

* go back to nuking wasm dir in some cases

* enable more wasm-opt flags, use stable

* add better logging for wasm-opt failure
2025-05-25 18:51:40 +01:00
Jonathan Kelley 22e0682f10 fix hot-reload watcher for client/server (#4200)
* use `@` syntax

* watch the server

* fmt
2025-05-25 17:42:12 +01:00
Jonathan Kelley bb0621fa1b use vcs when dx new (#4199) 2025-05-25 17:25:32 +01:00
Falk Woldmann 3c3256ec02 refactor: remove once_cell dependency and use std::sync equivalents (#4185) 2025-05-25 16:09:56 +01:00
Jonathan Kelley 1d954c2f6f fix: only patch pid and require rebuilds (#4197) 2025-05-25 14:45:53 +01:00
Jonathan Kelley b2bd1f48d4 debugger support for dx (#3814)
* add vscode debugger for apps

* todo: need to disconnect when rebuilding

* update debugger

* add uri handler to remote launch the debugger

* attach

* dont panic

* fixed it - hung processes are not errors

* wip: android debugger

* clean it up a bit

* revert ios stdout/stderr

* wire up pid from ios

* use target family instead of target_arch

* fix android

* bring back softkill

* typo
2025-05-24 23:31:42 +01:00
Drew Ridley eb15b42ab1 Enable serve_dioxus_application for WASM targets (#4170)
* optional asset serving

* optional asset serving

* Add serve_api_application for WASM environments

* fix cfg

* remove old placeholder
2025-05-24 17:26:24 -05:00
Jonathan Kelley 0982c1ff8b feat: copy frameworks to Frameworks folder, detect linkers, custom target dirs (#4174)
* feat: copy frameworks to Frameworks folder

* add dylib linking to patching

* remove logging

* rename __aslr_offset

* fix android/linux

* support linker flavor

* support custom target dirs

* custom cargo target dir support

* whoops ios

* dlsym doesn't exist on windows

* look for the right main symbol per platform

* distinction between mains

* export main on windows

* enbable rlib caching

* add dx hash

* adjust linking warnings

* update tui with hotreload state

* implement symbol flags

* add flags

* only run ranlib on darwin

* enable lld

* paths

* add harness test for tls

* wip: revert launch mobile

* wip

* fix fullstack mobile

* fix a few bugs
- long paths?
- reverting back to original

* pass-thru fuse-ld args

* fix nan in render, fix empty archives

* consider existing dep files if archive exists

* fmt

* drop msrv
2025-05-24 22:41:30 +01:00
Jonathan Kelley 751f1920c3 fix rust 1.87 with wasm-opt bulk-memory, allow configuring wasm-opt flags (#4187)
* add handling for bulk features for rust 1.87

* bump nightly

* rollback changes to toolchain
2025-05-24 15:58:27 +01:00
Evan Almloff 40ce4c269d Fix setting option value to an empty string (#4176)
* Fix setting option value to an empty string

* fix formatting
2025-05-24 12:44:54 +01:00
Fontlos ad8c869ba2 fix(cli): filter out .lib files when targeting Android (#4130)
When building for Android, the linker may incorrectly pick up Windows-specific
.lib files (e.g., from embed-resource) even with proper #[cfg] guards in build.rs.
This explicitly filters out .lib files from linker arguments when the target
environment is Android to prevent linkage failures.
2025-05-23 12:39:19 +01:00
François Mockers f557fd4d3b subsecond: Typed HotFn pointer (#4153)
* type the HotFn pointer

* can reuse a HotFnPtr to run a hot patched function

* unsafe constructor

* try_call_with_ptr is unsafe
2025-05-22 16:32:54 +01:00
Jonathan Kelley d435f0084e fix: use the rustc env for linking too, hopefully fixing windows (#4172) 2025-05-22 12:33:17 +01:00
Daniel GallupsandJonathan Kelley 8216e4f177 fix: symbol mismatch in object file (#4171)
* fix: symbol kind in obj

* actually patch TLS

* update docs and cleanup size impl for tls

* remove debug logs

---------

Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
2025-05-22 12:33:08 +01:00
Jonathan Kelley e719f9c7c4 fix: use system ranlib (#4163) 2025-05-22 11:10:31 +01:00
Marc Espin ab76d909e1 fix: Make Writable::toggle use peek to avoid subscribing as Readable::Cloned uses Readable::read (#4166) 2025-05-21 14:46:06 -05:00
Jonathan Kelley 021c877361 fix windows subsecond, add DX_LINKER and DX_HOST_LINKER env var overrides (#4164)
* fix: subsecond on windows

an off-by-one error and improper escaping for response files was causing windows to fail

this fixes that

* add linker selection
2025-05-21 15:43:39 +01:00
Fontlos 78e65f240c fix(cli): prevent linker argument overflow on Windows (#4126) 2025-05-20 11:40:05 +02:00
Jonathan Kelley bd3b2da7a4 fixes the ADRP violation bugs by treating TLS as Text (#4152)
This is because Rust generates accessors but marks them as TLS. This might not be a 100% portable fix across all code, but the dissasembly seems to hold.
2025-05-20 10:59:24 +02:00
Jonathan Kelley b610ab372c fix: use diagnostic instead of compilermessage giving rendered ansi logs during hotpatch (#4123)
* fix: use diagnostic instead of compilermessage giving rendered ansi logs during hotpatch

* no need for builder
2025-05-19 17:10:11 +02:00
VipWW 0a18c12c32 fix: fixed wasm and js paths in release mode (#4140) 2025-05-19 15:54:48 +02:00
Leon WimbesandJonathan Kelley 18477a0373 Fix is_release_profile Logic (#4091)
* fix `is_release_profile` logic

* fix: don't merge wasm-split modules with asset system, don't compress randomly

---------

Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
2025-05-15 19:18:36 +02:00
Jonathan Kelley 06aaf15d83 fix: use response files (@args) on windows (#4121)
* fix: use use response files on windows

* response files are based on host arch, not target
2025-05-15 18:58:21 +02:00
Jonathan Kelley 6b8919b37b fix stdin handling for the tw watcher (#4119) 2025-05-15 14:16:59 +02:00
Jonathan Kelley 48e925f9af fix: don't use offline in cargo-metadata 2025-05-15 13:11:22 +02:00
Jonathan Kelley 1b9a33ef97 fix: null stdin breaks tailwind 2025-05-14 10:49:51 +02:00
Jonathan Kelley fa012f36ff release 0.7.0-alpha.0
- fix wasm-used versioning
2025-05-14 10:14:42 +02:00
Jonathan Kelley 3dcd8f3880 fix: use wasm-splitter as package=wasm-split 2025-05-14 09:49:44 +02:00
Jonathan Kelley 37654d35e5 add cargo info to protocol 2025-05-14 09:18:08 +02:00
Jonathan Kelley 4d3d55a7a3 CLI self-updater, warn on version mismatch, direct install.sh option, androidmanifest and info.plist customization, bump to 0.7-alpha.0 (#4095)
* wip.... bun installer

* - warn on incompatible versions
- clean up some logs
- add coloring to log levels

* add toasts to desktop/mobile

* Auto open simulators

* auto boot android

* preserve url

* pull out some of the warnings

* add self-updater

* wip: mcp

* add install.sh and adjust binstall path

* add some cuter styling to logs!

* update "input.css"

* update other input.css

* style a bit more

* change getting started

* add windows installer

* move dioxus-mobile into dioxus-desktop
add sentry wip to cli

* shorten timeout of toast

* fix cli display

* wire up customization of android manifest

* udid is a real word

* add 429 to lychee cache

* accept all 200-204 and 429
2025-05-14 08:43:11 +02:00
Evan Almloff 53ef78823d Fix web redirect routes (#4109) 2025-05-14 08:42:23 +02:00
Evan Almloff 6b70ba7cd2 Fix websocket server functions and add an example (#4107)
* Fix websocket server function

* Add websocket test

* add a websocket example

* fix clippy
2025-05-14 08:28:43 +02:00
Jonathan Kelley cb651a8ca2 Inline the TailwindCLI into dx and run it during serve (#4086)
* wip: download the tailwind cli and then run it during serve
* allow no-downloads again
2025-05-07 17:17:39 -07:00
FontlosandJonathan Kelley 7d5bd44791 feat(cli): add bundle.android config to build and sign the apk file in release mode (#4062)
* feat(cli): add `bundle.android` config to build and sign the apk file in release mode

Add this to `Dioxus.toml`

```toml
[bundle.android]
jks_file = "path/to/jks file relative to Dioxus.toml"
jks_password = "jks_password "
key_alias = "key_alias"
key_password = "key_password "
```

When release flag is enabled and this configuration exists  at the same time, use `gradlew assembleRelease` build and sign apk file

* fix merge conflict

* only run assembleRelease when bundle exists

---------

Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
2025-05-07 14:22:59 -07:00