Commit Graph
6746 Commits
Author SHA1 Message Date
kbz_8andJonathan Kelley 86f22983f9 adding android main activity path to cli config (#4294)
Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
2025-07-23 12:44:10 -07:00
b257e7e8ce CLI: add --renderer argument (#4320)
* Add --renderer argument to the CLI

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

* Make `--platform native` work

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

* Emit `krates` error when cargo metadata fails

* Reinstate default "desktop" feature for examples

* Remove commented 'no platform specified' error

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

* use the target tripple and bundle format as the source of truth for the build

* resolve renderer and bundle format

* add shorthand flags

* add headings to the help for shorthands

* resolve the renderer from the target triple if it isn't passed

* make value after --fullstack optional

* convert desktop -> mobile when targeting mobile webview

* use the new shorthand flags in the playwright tests

* fix clippy

* merge fix

* cleanup merge conflicts

* fix clippy

* remove nit

* restore platform as a legacy argument

* improve help message

* vendor openssl on native, pin server_fn

* print build errors as warnings

* add --desktop arg compat

* adjust cli headings

* prefer self.is_wasm_or_wasi()

---------

Signed-off-by: Nico Burns <nico@nicoburns.com>
Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
Co-authored-by: Evan Almloff <evanalmloff@gmail.com>
2025-07-22 14:32:54 -07:00
Derek JohnsonandJonathan Kelley 4848e714ae fix(bundle): add serde default for all fields that impl Default (#4442)
* fix(bundle): add serde default for all fields that impl Default

 - Adds #[serde(default)] for all fields of all bundle settings structs
   where the types impl Default
 - WindowsSettings: derive Default since all types impl Default

Default values for more [bundle] settings #3785

* Add default for Nsis settings

* Add default impl

---------

Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
2025-07-22 13:20:36 -07:00
Olivier Lemoine 196db43e23 Add secure context on android (#4428)
* Add secure context on android

* Remove location permission in AndroidManifest.xml.hbs
2025-07-22 13:12:30 -07:00
Nico Burns 6524f55462 Upgrade Blitz to 0.1.0-rc.1 (#4452)
* Update to newer version of blitz_dom::Document trait

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

* Native: use DocumentConfig parameter

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

* Native: set event converter less often

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

* Native: count event handlers and skip events if none

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

* Upgrade to Blitz 0.1.0-rc.1

* Fix typo

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

* Fix native-headless example

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

* Use workspace deps for native-headless-in-bevy example

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

* Fix native-headless-in-bevy example (for blitz 0.1.0-rc.1)

* Fix native-dom-document doc tests

---------

Signed-off-by: Nico Burns <nico@nicoburns.com>
2025-07-22 13:08:36 -07:00
Evan Almloff 18fe6de9a0 Fix server function warning with default features (#4453)
* fix server function warning with default features

* document and hide mock client

* fix clippy

* more clippy fixes

* fix formatting
2025-07-22 11:48:47 -07:00
Jerome CaucatandJerome Caucat 86086477d0 Add an example rendering dioxus-native to a texture in a bevy app (#4427)
Co-authored-by: Jerome Caucat <jerome.caucat@smartshape.com>
2025-07-22 13:33:52 +01:00
Evan Almloff 98f7667fb4 Remove dioxus-lib, fix doc imports (#4438)
* remove dioxus lib

* inline some doc items

* fix tests

* test docs

* Fix doc tests

* Pull out dioxus/lib feature

* disable logger and devtools in library feature

* fix cargo doc

* fix cargo doc
2025-07-18 14:51:07 -07:00
Himmelschmidt 4cb32d372b Fix Tailwind race condition in fullstack serve mode (#4433)
Skip Tailwind watcher in fullstack mode to prevent race conditions between
the watcher and prebuild() both trying to install/run Tailwind simultaneously.

In fullstack mode, the client build's prebuild() properly handles Tailwind
generation, making the watcher redundant and problematic.

Fixes "Text file busy" error when running:
dx serve --fullstack true --platform web

Fixes #4431
2025-07-18 11:09:08 -07:00
Evan Almloff 71b00ab171 Fix assets with odd extensions and fix race condition with duplicate assets with different sources (#4436) 2025-07-18 11:08:18 -07:00
Jonathan Kelley 9478525dd0 temporarily drop musl target 2025-07-16 18:02:40 -07:00
Jonathan Kelley f9e7011e72 Release 0.7.0-alpha.3 2025-07-16 17:42:14 -07:00
Jonathan Kelley 4f1d039bad clean up prelude (#4416)
* clear away prelude on dioxus

* clippy

* wip - drop prelude from dioxus-html

* docs clippy

* wip

* more fixe

* delete all preludes

* doc...

* better export

* merge some imports

* fewer global imports

* global incremental renderer

* fix cargo doc
2025-07-16 16:04:13 -07:00
Juan VásquezandJonathan Kelley 54d465a7b5 Avoid the accidental removal of comments inside expressions by dx fmt (#4410)
* Avoid the accidental removal of comments inside expressions by dx fmt

* Rewrite the logic to pass failed tests

* Removed unnecessary call to write_inline_comments

* add failing test case

* alter parsing a bit to handle more test cases

* almost there...

* fix

* use threadlocal

---------

Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
2025-07-16 13:51:43 -07:00
Jonathan Kelley 88c693b2e4 fix: don't eat comments in more situations (#4423)
* fix: don't eat comments in more situations

* clippy...
2025-07-15 14:39:35 -07:00
Jonathan Kelley 57dba1949c Capture the rustc environment and project it into run (#4421) 2025-07-15 14:27:04 -07:00
Evan Almloff 0d2e1f4051 Prevent desktop reloads at the wry level (#4422)
* Prevent desktop reloads at the wry level

* add a test

* only allow one navigation
2025-07-15 14:26:52 -07:00
Jonathan Kelley 393246b923 fix unicode characters in line printing (#4420)
* fix unicode characters in line printing

* remove outdated comment
2025-07-15 11:52:49 -07:00
Jonathan Kelley f2c6fb2616 relax versions 2025-07-14 19:10:02 -07:00
Jonathan Kelley 01a50cdcaa Fix: drop pollster in lieu of std::sync::mpsc 2025-07-14 17:53:30 -07:00
Nico BurnsandJonathan Kelley 9db593e303 Example of rendering a dioxus-native app to a texture (#4365)
* Create example of rendering a dioxus-native app to a texture

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

* Use dioxus-native-dom crate

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

* bump lock

* cleanup cargo tomls

* rustc hash

---------

Signed-off-by: Nico Burns <nico@nicoburns.com>
Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
2025-07-14 17:48:51 -07:00
Evan AlmloffandJonathan Kelley b9b847c3f8 Warn about assets being stripped if strip is true and the current package depends on manganis (#4400)
* warn if we both find manganis in the dependencies and strip is enabled in the current profile

* bump node

---------

Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
2025-07-14 17:35:29 -07:00
Jonathan Kelley 9bfde632f9 fix link opening on mobile (#4415)
* fix link opening on mobile

* fix compil;e

* ughh just use webbrowser

* remove open
2025-07-14 16:51:53 -07:00
Jonathan Kelley 2dec6205c8 fix: only link c++_shared, don't link c++ always 2025-07-14 15:47:46 -07:00
Evan AlmloffandJonathan Kelley 3f62cd8fc0 Reconnect the edits websocket if it disconnects (#4391)
* Reconnect the edits websocket if it disconnects

* restart the server if the OS kills it

* fix clippy

* clean up code and add more comments

* cleanups

---------

Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
2025-07-14 13:39:21 -07:00
c5b33924ae updated the dependencies - maintaining compatibility and tests (#4363)
* Update dependencies in Cargo.lock

* added in the missing bevy example which was included in recent merge

* undo unneccessary library installation in gh actions

* cleaned up further

* Update dependencies in Cargo.toml and Cargo.lock askana_escape to 0.13

* updated code to make tests work

* updated the wgpu texture example

* replaced all direct reference with use

* fixed wgpu and jsframework errors in benches and examples

* Fix: Import black_box from std::hint

* grand finale upgrade

* updated cargo.lock

* Bump hyper-util to 0.1.15 and plist to 1.7.4

* remove some unused swc dependencies and add a command to update them in the future

---------

Co-authored-by: Evan Almloff <evanalmloff@gmail.com>
Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
2025-07-14 13:03:40 -07:00
bananabit-dev 93147587b8 Fixed touch input it will now serialize the touchlist (#4406)
* fixed branch

* serializeTouchEvent fix
2025-07-14 13:00:06 -07:00
Jonathan Kelley 727752a965 final 0.7 fixes: xcode 15/16 hybrid, auto openssldir for android, include_*! tracking hotpatch, fix /assets/ brick at high opt levels, windows linker file, etc (#4376)
* wip: openssl autodetection

* add voltaile read inside of asset fn

* support xcode 15 for --device

* vendor openssl on android

* Smaller width TUI

* switch to anyhow for the entire CLI

* add backtrace and print double printing of cargo_metadata errors

* add some padding to multi-line anyhow error

* check semvers

* don't open if not interactive

* set the tailwind current_dir so it doesn't twitch

* get the oboe demo working

* copy the c++ library on android

* cleanup env vars

* add depinfo watcher

* fix stale hotpatches and crate count

* add musl support

* remove outdated autofmt test

* update scanner app

* add hotdog app and bundle to ci

* upload dx on every branch

* collapse mobile into desktop

* `dx doctor` command

* windows command files

* no pipe on doctor

* fix ci?

* fix links

* fix ci

* use main instead of nightly

* bump node

* build cli for host

* cargo doc

* prep dog_app for bundle

* package hotdog

* no bundle or nightly cli

* comment out nightly cli

* add quotes to linker files
2025-07-14 12:54:15 -07:00
Shoshána Abigail 97947b169b prevent_default must be called synchronously or it will have no effect (#4386) 2025-07-09 12:22:29 -04:00
rennanpo 1a494d1f5e fix(bundle): add serde defaults to prevent deserialization errors (#4398) 2025-07-08 17:52:48 -04:00
Himmelschmidt b82ba85653 Add PartialEq and Eq derives to ServerFnError (#4393)
This fixes the missing `PartialEq` implementation for `ServerFnError` in v0.7.0-alpha.2 which was breaking `use_memo` functionality.

Closes #4387
2025-07-08 13:24:34 -04:00
Nico Burns a4ebdcb69e Native: Split dioxus-native-dom crate out of dioxus-native (#4366)
Signed-off-by: Nico Burns <nico@nicoburns.com>
2025-07-07 22:14:59 +01:00
Evan Almloff b252528722 Fix router state after client side navigation (#4383)
* Fix router state after client side navigation

* add client side navigation to the fullstack routing spec

* fix playwright test
2025-07-07 13:43:32 -05:00
Nico Burns ddc94cf44c Native: Accept winit::WindowAttributes as a config value (#4364) 2025-07-06 12:44:00 -04:00
5495bcedb4 Add a bevy-texture example based on wgpu-texture (#4360)
* Add a bevy-texture example based on wgpu-texture

* Use git branch of Blitz

* Update existing code to new blitz

* Use Device from Dioxus for bevy

* Use ManualTextureView

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

* Fix texture size on window resize

* Clean code

* Rename example to 'bevy-example' in 'bevy' directory

* Upgrade to blitz 0.1.0-alpha.5 and anyrender 0.4

* Install alsa in CI

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

* Add libudev to CI

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

---------

Signed-off-by: Nico Burns <nico@nicoburns.com>
Co-authored-by: Jerome Caucat <jerome.caucat@smartshape.com>
Co-authored-by: Nico Burns <nico@nicoburns.com>
2025-07-04 22:01:00 +01:00
David Bernard a66bffb487 fix: allow to name module std in project (#4353)
add missing prefix '::' for use of 'core' or 'std' module

RELATED #4331
2025-07-02 08:03:13 -05:00
Jonathan Kelley d5bc480f6f Publish 0.7.0-alpha.2 2025-07-02 01:36:52 -07:00
Josh Rose a0f83f2679 Reclaim element id for all removed nodes (#3782)
* reclaim el id for nested dyn nodes

* reclaim root element ids as well
2025-07-02 00:34:21 -07:00
Jonathan Kelley 1db4b2a13d fix multiwindow due to mounts not dropping in virtualdom (#4351)
* fix handlers not dropping thanks to mounts

* use `desktop`

* Add tasks and effects

* only destroy on virtualdom destroy

* fix clippy
2025-07-01 20:49:45 -07:00
Jonathan Kelley ff762cec84 tweaks to the LastWindowClose to make it more imperative 2025-07-01 19:58:41 -07:00
KlemenandJonathan Kelley 9573af115a Added close behaviour option for specific window (#3754)
Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
2025-07-01 18:59:44 -07:00
zhiyanzhaijie c3c7e5f705 fix router macro mixed core crate by clearify core:: -> ::core:: (#4350) 2025-07-01 18:44:13 -07:00
d5daf14c15 chore(deps): upgrade wry from 0.45.0 to v0.52.0 (#4255)
* chore(deps): upgrade wry from 0.45.0 to v0.51.2

* Unwrap webview

* update tauri

* fix more versions

* switch to a single websocket per app to communicate edits in desktop

* use websockets on the ts side

* queue pending edits before the websocket connects

* fix decoding the websocket blobs in ts

* rebuild js

* fix clippy

* more sensible struct names

* allow http on android and require a key to match between the webview and native sides

* remove out.txt

* clippy

* small style changes

* More light cleanups

---------

Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
Co-authored-by: Evan Almloff <evanalmloff@gmail.com>
2025-07-01 18:08:24 -07:00
Clouds 65dd1f1762 Save logical position when restoring on macos (#4061)
* save logical position on restore

* only use logical position on macos

* fix adjustment

* fix windows window restoration

* fix inner_size for windows
2025-06-30 23:03:38 -07:00
Moritz Hedtke e947f5ec08 Fix form submission on native if there is an onclick handler somewhere (#4329) 2025-06-30 22:46:42 -07:00
Mahmoud 🦀andJonathan Kelley e23debf096 chore: update readme (#4075)
* chore: update readme

* chore: mv `sledgehammer` `sledgehammer_bindgen`

* tweak language

---------

Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
2025-06-30 22:09:12 -07:00
Evan AlmloffandJonathan Kelley e74c838441 Hashless assets (#4312)
* add support for external assets

* fix playwright tests

* add more documentation to with_hash_suffix

* restore external asset hashing tests

* Update gtk workflow dependencies

* fix doc test

* multiple versions of libgtk

* clear dx in playwright tests

* fix fullstack caching test

* try without apt cache

* cache everything except libxdo-dev

* revert ci changes

* fix wasm asset options

* fix merge conflict

* recommend the used attribute instead

* Move options to AssetOptionsBuilder

* Don't deprecate non-canonical new asset options functions

---------

Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
2025-06-30 19:21:49 -07:00
Jonathan Kelley 0bd376b873 Fix: switch to --device instead of --device true 2025-06-30 19:18:48 -07:00
Jonathan Kelley 7d24a47c22 fix ios codesign on device (#4339)
* fix ios codesign on device

* switch to tmpfile
2025-06-30 19:14:17 -07:00
Moritz Hedtke ac9b1fc519 Intentionally shadow module to prevent accidential use (#4327) 2025-06-30 17:42:22 -07:00