Commit Graph
488 Commits
Author SHA1 Message Date
Jonathan Kelley fada28f7b1 Remove duplicated auth example 2025-10-08 19:47:15 -07:00
Jonathan Kelley 05f3b8d20f release: dioxus 0.7.0-rc.1 2025-10-08 00:33:21 -07:00
Nico Burns 9359446017 Upgrade to Blitz v0.2.0 (#4731)
* Bump Rust CI version to 1.88

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

* Upgrade to Blitz v0.2.0

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

* Native: enable clipboard and file_dialog support by default

* Fix clippy errors

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

* See if cargo update magically fixes build

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

* Fix compile err

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

* Remove unused wasm-opt dep

* Fix wgpu_child_window example

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

* Update blitz-shell

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

* cargo fmt

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

* Allow clippy lint

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

* CI: Bump pinned nightly version

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

* Allow clippy lint in whole module

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

* Fix more clippy lints

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

* Use Rust 1.90 for clippy

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

* cargo update --ignore-rust-version

* revert cargo updates

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

* Revert another silly clippy lint

---------

Signed-off-by: Nico Burns <nico@nicoburns.com>
2025-10-07 11:18:59 -07:00
Evan Almloff 03801e1312 Fix hydration with empty spread attributes (#4647)
* Fix hydration of empty spread attributes

* add a regression test

* fix doctest
2025-10-03 19:41:23 -07:00
Evan AlmloffandJonathan Kelley 12fab0f9f7 Fix fullstack serialization order for adjacent components (#4600)
* fix serialization order

* add regression test

* split out test into a seperate package

* revert logging

* change order

* opinions on structure

* small wait in hydration order test

---------

Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
2025-10-03 19:23:34 -07:00
Jonathan Kelley f2b1c6d97f codify "platform" into resolution logic, server-fn/fullstack overhaul (#4596)
overhaul dioxus fullstack using a new implementation of server_fn

This PR is a complete rewrite of dioxus fullstack designed to improve compatibility with axum and to fix a number of compilation errors based on feature flag unification plumbing through macros.
2025-10-03 18:26:19 -07:00
Nico Burns ab19ad4624 native: open links in default webbrowser (#4623) 2025-10-03 13:43:47 -07:00
Evan Almloff d65f9a53c4 Fix hydration error suspense (#4640)
* Fix hydration of error boundaries

* add a regression test

* add more comments

* fix typos

* more typos

* fix clippy
2025-10-02 22:21:41 -07:00
Evan Almloff 5104644b34 Allow relative assets in rust > 1.88 (#4658)
* Allow relative assets in rust > 1.88 and assets outside of the crate in
binary crates

* undo changes to assets outside of the crate

* don't use relative assets in examples
2025-09-15 10:43:30 -07:00
Nico Burns ba64110adc Upgrade Blitz to v0.1.0 (#4619)
* Upgrade Blitz to v0.1.0

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

* Fix clicking on anonymous blocks

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

---------

Signed-off-by: Nico Burns <nico@nicoburns.com>
2025-08-29 22:59:47 +01:00
Jonathan Kelley 7618b2c762 move example-projects into examples 2025-08-20 11:17:26 -07:00
Jonathan Kelley 74163984be show panics in the toast in wasm (#4582) 2025-08-19 17:13:13 -07:00
Nico Burns 593945ecce Bump Blitz to 0.1.0-rc.3 (+dangerous_inner_html + style ns attrs) (#4538)
* Bump Blitz to 0.1.0-rc.3

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

* native: implement dangerous_inner_html

* native: implement style namespace attributes

* Fix clippy lints

---------

Signed-off-by: Nico Burns <nico@nicoburns.com>
2025-08-12 13:28:41 -07:00
Jonathan Kelley a8230d8ff0 Release 0.7.0-rc.0 2025-08-11 15:59:36 -07:00
Jonathan KelleyandEvan Almloff e43bf05b69 add basic crash analytics and very light telemetry to dioxus-cli (#4224)
* wip

* wip: basic telemetry

* fix merge

* keep errors for telemetry

* fix upload when queued events are empty

* add per session id and keep track of build timing

* keep track of what commands are run

* capture panics

* keep track of panics

* better path stripping

* better tracing error telemetry

* only sync every week and check settings before sending any telemetry

* keep track of the args passed to commands

* anonymize commands

* more error tolerant

* wip

* wip

* wip

* merge cnflict

* other merg conflict

* migrate everything from telemetry to logging

* update docs

* wip... about to merge trace controller

* lil bit more refactor to clean up tracer

* more performant log writer

* cleanup ci detecting

* wire up to posthog

* re-uploads work

* yoink out the anon from each file

* cleanup sig

* lil bit cleaner

* dont write empty files

* wip log handler

* fmt

* cleanup logging of backtraces

* add proper backtrace support

* use stable reporter

* adhere to posthog format

* fix stacktraces

* use anyhow for capturing backtraces

* I think we're done?

* cleanup logging

* properly collect!

* move out keycode handling

* she works

* typo

* add extra fields

* fix cargo doc

---------

Co-authored-by: Evan Almloff <evanalmloff@gmail.com>
2025-08-08 19:00:00 -07:00
Jonathan Kelley 79e7739bee Vendor OpenSSL on android with google prebuilt libs (#4511)
* vendor android openssl

* add fallback

* dont panic
2025-08-05 18:13:00 -07:00
Evan AlmloffandJonathan Kelley 58c41f8561 Stores: Externally tracked state and reactive collections (#4483)
* map signals mutably

* boxed signals

* remove mutable borrow type from boxed writable

* improve map mut example

* restore boxed_mut helper

* make boxed readable/writable types copy

* Move away from the ReadOnlySignal alias in examples

* automatically convert Write

* Fix some tests

* ReadSignal and WriteSignal

* move read only signal alias

* make maps copy

* store prototype

* implement derive macro

* Handle generics in the derive macro

* Make Selector boxable

* derive boxed conversion

* Get rid of store type

* Remove hardcoded type from derive macro

* selector -> store

* Refactor store implementation

* more vec methods

* todo mvc store example

* Implement Storable for HashMap

* fix write

* restore sorting logic in todomvc

* derive readable and writable

* improve todomvc store example

* Result store

* Option store

* collect dead subscribers

* fix clippy and formatting

* recognize some common foreign types automatically

* fix foreign stores in props

* slice and array selectors

* clean up store example

* writable is child owned

* box selector

* read and write to builtins

* re-use the proc macro in the derive macro

* Switch to a extension trait based approach

* switch to extension traits in the derive macro

* transposed method

* derive enums

* Expose Store::new

* remove stores from the prelude

* More consistent naming scheme for SelectorScope methods

* document hashmap methods

* document index extension

* document option ext

* document result ext

* document slice extension

* document the vec extension

* make more methods borrow the store mutably

* Move to impls to have higher priority over the builtin write extension traits

* fix deadlock

* finish stores documentation

* Document the store macro

* cleanup docs and organization

* finish derive docs

* fix typo

* fix clippy

* fix doc tests

* fix derive macro with generics

* fix clippy

* test and fix empty structs

* clean up todomvc store example

* default to a boxed store writer to make it easier to type when providing to the context api

* fix cargo doc

* fix clippy in store example

* relax generational box lifetime bounds

* relax bounds

* relax signal bounds

* fix compilation

* read store

* relax bounds on default store impls

* fix enum derive

* Convert to readsignal and writesignal automatically

* simplify type matching logic

* add write store

* unsized stores

* shrink the path vec type

* use more concrete types

* remove opaque types

* remove copy bounds

* use lens as generic name everywhere

* more consistent borrow semantics

* use a concrete type for the signal metadata and mention references in the map docs

* improve todomvc store docs

* document store derive macro internals

* refactor macro

* improve selector node documentation

* fix clippy

* add btreemap

* fix doc tests

* more option methods

* fix doc

* fix clippy

* add a bunch more result methods

* add a bunch of bounds to the iterators

* fix clippy

* remove option from subscribers

* add store macro to generate extension traits

* fix store example

* fix deadlock

* fix docs

* fix doc tests

* fix clippy

* add stores to public api

* add store macro, and then update todomvc_store example

---------

Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
2025-08-05 11:30:21 -07:00
Evan Almloff d8d11db403 Boxed and mapped signals preparing for stores (#4413)
This PR contains just the breaking changes required for the upcoming store implementation. It adds two new primitives:

Mutable mapped signals (without a different subscriber list). This lets you scope a writable value and pass it to a child component. It requires two closures to map the immutable and mutable references to the inner signal. With stores, these closures will be derived
Boxed readable and writable values (ReadSignal, and WriteSignal). Any readable or writable types can be converted to a read signal or write signal with the boxed method or built in types are automatically converted into the boxed variants when passing into props


* map signals mutably

* boxed signals

* remove mutable borrow type from boxed writable

* improve map mut example

* restore boxed_mut helper

* make boxed readable/writable types copy

* Move away from the ReadOnlySignal alias in examples

* automatically convert Write

* Fix some tests

* ReadSignal and WriteSignal

* move read only signal alias

* make maps copy

* store prototype

* implement derive macro

* Handle generics in the derive macro

* Make Selector boxable

* derive boxed conversion

* Get rid of store type

* Remove hardcoded type from derive macro

* selector -> store

* Refactor store implementation

* more vec methods

* todo mvc store example

* Implement Storable for HashMap

* fix write

* restore sorting logic in todomvc

* derive readable and writable

* improve todomvc store example

* Result store

* Option store

* collect dead subscribers

* fix clippy and formatting

* recognize some common foreign types automatically

* fix foreign stores in props

* slice and array selectors

* clean up store example

* remove stores

* writable is child owned

* fix typo

* fix clippy

* fix doc tests
2025-07-31 13:19:55 -07:00
Daniel Warloch 6919f72abc Downgrade chrono to 0.4.39 (#4473)
Certain packages do not yet support chrono 0.4.40
Examples:
arrow-arith which is used by influxdb3
2025-07-27 13:11:22 +01:00
Nico Burns e687a2548c Use Blitz 0.1.0-rc2 (#4462)
Signed-off-by: Nico Burns <nico@nicoburns.com>
2025-07-23 16:26:19 -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
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
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
Jonathan Kelley f9e7011e72 Release 0.7.0-alpha.3 2025-07-16 17:42:14 -07:00
Jonathan Kelley f2c6fb2616 relax versions 2025-07-14 19:10:02 -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
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
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
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
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
Jonathan Kelley d5bc480f6f Publish 0.7.0-alpha.2 2025-07-02 01:36:52 -07:00
Jonathan Kelley ff762cec84 tweaks to the LastWindowClose to make it more imperative 2025-07-01 19:58:41 -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
Jonathan Kelley dd53ce72a7 add --offline, --locked, remove dioxus branding if dioxus is not being used explicitly (#4155)
* wip: add some spin logging

* wipe dioxus branding if not being used by dioxus

* add --locked, --offline, --frozen

* properly git init with `dx new` and `dx init`

* dont panic in verbosity

* Move build-assets to "tools"

* change ui for dx new offline

* pin tauri-bundle

* pin tauri

* run tailwind once
2025-06-24 18:21:25 -07:00
Moritz HedtkeandJonathan Kelley 2be2333ef4 Add initial version of hash history (#4311)
* Add initial version of hash history

* wip...

* more cleanups

* cleanup the web history impl and then add a playwright test

---------

Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
2025-06-24 11:50:03 -07:00
Marc EspinandJonathan Kelley db3ce07030 feat: Opt-out html in dioxus-router (#4217)
* feat: Opt-out `html` in `dioxus-router`

* typo: Enable html by default

* Fix cargo doc on html

---------

Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
2025-06-18 16:40:07 -07:00
Juan VásquezandJonathan Kelley 1d3168dc4a Allows desktop apps to open mailto links (#4282)
* Allows desktop apps to open mailto links

* Drop webbrowser, use `open` only

* switch to that_detached

* use workspace `open`

---------

Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
2025-06-18 16:14:54 -07:00
Nico Burns 6fcb496fd5 Upgrade Blitz to 0.1.0-alpha.3 and add wgpu-texture example (#4286)
* Use Blitz 0.1.0-alpha.3

* Add wgpu-texture example

* Native: Support configuring wgpu Features and Limits
2025-06-17 18:06:32 -07:00
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
Jonathan Kelley 662cf0d902 Release dioxus 0.7.0-alpha.1 2025-06-01 00:27:47 +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
René Kijewski 3a5b68e56d chore(ssr): update askama_escape dependency (#4215) 2025-05-29 09:44:08 +02: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 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 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 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