Commit Graph
600 Commits
Author SHA1 Message Date
Evan AlmloffandJonathan Kelley c56bac04f4 Look for strip settings in inherited profiles and global configs (#4645)
* Look for strip settings in inherited profiles and global configs

* fix clippy

* use cargo home env var if it exists

* fix cargo home config path

* small stylistic changes

---------

Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
2025-10-03 21:11:05 -07:00
Omar Mohamed Khallaf d8a6c265ab fix: save cli config as a toml file (#4652)
Signed-off-by: Omar Mohamed <mohamed.omar67492@gmail.com>
2025-10-03 19:46:37 -07:00
Kristoffer SøholmandJonathan Kelley 8d26a5d22e Fix splitting logic for serve args (#4695)
Using .split(' ') for cli arguments causes extra whitespace to become extra
arguments, and "".split(' ') returns the empty string instead of nothing.
Using split_whitespace() fixes both of these problems.

Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
2025-10-03 18:33:45 -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
Jonathan Kelley 6cfe64209a fix: hot-patching wasm reference types due to changes in wbg-2.104 2025-10-03 01:11:34 -07:00
Evan Almloff ad40f81607 Fix the root error boundary during suspense in ssr (#4710)
* Fix the root error boundary during suspense in ssr

* fix some typos
2025-10-01 17:10:28 -07:00
Moritz Hedtke 10912f4750 Don't rely on window (#4697) 2025-09-26 13:44:25 +01:00
Evan Almloff ed285c9604 Pin serde in the CLI (#4663) 2025-09-15 10:49:29 -07:00
Jonathan Kelley 969ad1d6bb fix windows arm tailwind 2025-08-21 20:40:02 -07:00
Jonathan Kelley 083e04bb6c feat: add dx print command, drive hotpatching engine directly. (#4602)
* feat: add dx print command

* small tweak to how client_target is handled

* hotpatching engine wired up!

* small cleanups

* lighter diff

* little bit more light cleanups

* remove changes to manganis

* fix wrong dir error

* move session_cache fixing to prebuild step
2025-08-21 20:29:49 -07:00
Jonathan Kelley d899afaf4a fix android minsdk in two places 2025-08-20 14:35:00 -07:00
Jonathan Kelley 9ec474962b fix lints on rust 1.89 (#4587) 2025-08-19 19:34:13 -07:00
Jonathan Kelley 27bae6fbb7 revert changes to tailwind serve 2025-08-19 19:18:04 -07:00
Jonathan Kelley 2f92619a28 bump minsdk up a bit (#4585) 2025-08-19 18:24:59 -07:00
Jonathan Kelley 893543faa9 throw warning for wasm-split (#4584) 2025-08-19 18:14:17 -07:00
Jonathan Kelley 23908b9d49 fix: automatic rebuilds, num_threads for localpools (#4583)
* fix: automatic rebuilds

* Fix concurrency for locapoolhandle
2025-08-19 17:50:16 -07:00
Evan AlmloffandJonathan Kelley 165447a647 Fix the server extension on windows server bundles (#4555)
* fix the server extension on windows server bundles

* fix formatting

* retry extracting assets if windows antivirus is holding the lock

* fix exe hash with extension

* add a timeout

* wip, make async

* use async methods

---------

Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
2025-08-19 16:42:34 -07:00
Jonathan Kelley a7805b8e2a fix: select best match from --device (#4581)
* feat: add codesigning to ios

* add search for android too

* install toolchains for every target

* install toolchains automatically
2025-08-19 16:23:19 -07:00
Alexandr Priezzhev 8a07a24704 Fix integration of SSL libs into non-ARM64 Android builds. (#4563)
* Fix integration of SSL libs into non-ARM64 Android builds.

* Fix formatting in request.rs.
2025-08-18 16:03:26 -07:00
Evan Almloff 418b747cb1 Don't output escape codes for the cursor when the tui isn't active (#4556)
* Don't output escape codes for the cursor when the tui isn't active

* reset the cursor if we are running in a terminal even if tui active is false

* don't clone tui_active
2025-08-15 11:40:49 -07:00
Rhaskia 2a0f328c42 Allow specifying min_sdk_version in dioxus config for Android. (#4549)
* allow specifying min_sdk_version inside dioxus config

* rustfmt
2025-08-14 20:05:26 -07:00
Jonathan Kelley a519fba7dc fix platform unification (#4536)
* fix platform unification

* fix doc
2025-08-12 01:31:45 -07:00
Jonathan Kelley 82f3778558 Add a few more events to the structured logger 2025-08-11 15:32:43 -07:00
Jonathan Kelley 9a98abe5ad allow customizing entitlements (#4533)
* allow customizing entitlements

* fix printing issues
2025-08-11 15:18:14 -07:00
Sebastijan Kelnerič b72b142b53 Move ctrl-c handler to non-conditional match (#4532) 2025-08-11 11:36:34 -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
Andrew VoynovandJonathan Kelley 89834bc1b3 Use data dir instead of home dir for dioxus-related data (#4445)
* Use data dir instead of home dir for dioxus-related data

* merge dx dir

* make windows match the pshell

---------

Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
2025-08-05 12:05:19 -07:00
Himmelschmidt 5591070e92 Fix rustc wrapper to read command files for linking detection (#4481)
* Fix rustc wrapper to read command files for linking detection

* fix formatting for cargo fmt check
2025-08-05 10:24:28 -07:00
Ryo Hirayama 7fcdee0266 Allow user to specify =false for default true flags (#4467) 2025-07-24 12:04:37 -07:00
Evan Almloff 15d369f10f Fix asset location for linux bundles (#4460)
* fix linux bundle

* fix release mode

* fix resource path

* only use asset dir if it exists

* add comment about directory structure

* don't unwrap parent
2025-07-23 17:47:41 -07:00
Jonathan Kelley 66c2dac38f better logs, don't run codesign if no assets are found (#4464) 2025-07-23 17:41:04 -07:00
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
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 57dba1949c Capture the rustc environment and project it into run (#4421) 2025-07-15 14:27:04 -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
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 2dec6205c8 fix: only link c++_shared, don't link c++ always 2025-07-14 15:47:46 -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
rennanpo 1a494d1f5e fix(bundle): add serde defaults to prevent deserialization errors (#4398) 2025-07-08 17:52:48 -04: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
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 cd920d2b6b Pass android linker to cargo (#4332) 2025-06-30 17:41:19 -07:00