Commit Graph
6691 Commits
Author SHA1 Message Date
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
Antony David d948ac23af fix(ci): out of disk space (#4090) 2025-05-14 08:29:45 +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
Hannes e47d0aa868 Replace magic-nix-cache-action (#4096) 2025-05-11 00:34:24 -07: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
Evan AlmloffandJonathan Kelley ad63d529fd Merge static and dynamic styles (#3950)
* Merge static and dynamic styles

---------

Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
2025-05-07 14:15:15 -07:00
Jonathan Kelley 68c7b903d5 fix cargo lock 2025-05-07 14:04:46 -07:00
Arvid Fahlström MyrmanandEvan Almloff 8ca8b042af Fix dx serve proxying of websocket connections established from the browser (#3895)
* better ws request detection

* proxy ws connections

* improve naming

* perform case-insensitive header comparison

* preserve request headers when proxying websocket connection

* avoid side effects in conversion function

* fix websocket proxying for axum 0.8

* remove redundant conversions

---------

Co-authored-by: Evan Almloff <evanalmloff@gmail.com>
2025-05-07 13:59:15 -07:00
Gerald E ButlerandJonathan Kelley f9d89b0ac1 adhoc: Fix Clippy lints in const-serialize etc. (#3880)
* adhox: Fix Clippy lints in const-serialize etc.

Fix the clippy lints that were preventing building:

   * const-serialize/src/lib.rs
   * core/src/nodes.rs
   * fullstack/src/serve_config.rs

* adhoc: Change the way to satisfy the lint for 1.85

The lint for pointer comparison is only in 1.85. The solution
uses a mechanism that was only stabilized with 1.85. Instead
of using that solution, will just allow the lint on this
function for now. Once the MSRV of Dioxus is updated to 1.85
or above, this can be changed to use the recommeneded solution.

* adhoc: Fix the 'cargo make test' tests

There were a number of tests failing to compile and/or run.
Fixed those that could be meaningfully fixed. Those that were
incomplete examples that could not be fixed are marked as
'ignore'.

* adhoc: GitIgnore test results in playwright tests

* fix wry rollback

---------

Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
2025-05-07 13:58:37 -07:00
Evan AlmloffandJonathan Kelley be01cf1485 Fix the base path in desktop builds (#3949)
* Fix the base path in desktop builds

---------

Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
2025-05-07 13:52:56 -07:00
pandarrr 0c0f0e96df Use SuperInto and correct Owner for props defaults (#3959) 2025-05-07 13:34:05 -07:00
Evan Almloff 04b14c5abc Fix clearing error boundaries (#4041) 2025-05-07 13:31:47 -07:00
Clouds 28a85ab614 call_with_explicit_closure support closure in block (#4031)
* call_with_explicit_closure support closure in block

* fix test
2025-05-07 13:30:46 -07:00
Christian IversenandJonathan Kelley 7392d7882b fix: dx bundle progress output off-by-one in log lines (#4014)
* fix: dx bundle progress output off-by-one in log lines

* fix: Emit the name of the last compiled unit (feedback from @DogeDark)

* fix: Log "Compiled" instead of "Compiling", since the log refers to completed units, not in-progress ones

---------

Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
2025-05-07 13:21:58 -07:00
Nico Burns f002cef2e1 Add "native" flag to examples (#4050) 2025-05-07 13:16:04 -07:00
Otger RoglaandJonathan Kelley 28d38307a2 Support scrollIntoView alignment options (#3952)
Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
2025-05-07 13:09:17 -07:00
Youn MéloisandJonathan Kelley 85b373deff feat(html): add scroll method to MountedData (#3722)
* feat(html): add `scroll` method to MountedData

* feat(desktop): implement `scroll` method for DesktopElement

* feat(liveview): implement `scroll` method for LiveviewElement

* feat(web): implement `scroll` method for web_sys::Element

* docs(examples): add new example for `scroll` method

* fix(web): remove unncecessary f64 cast (clippy)

* fix(interpreter): return missing boolean from js

* docs(example): unwrap result instead of discarding its error

* docs(examples): create scroll restoring example on routing

* fix clippy

---------

Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
2025-05-07 12:45:47 -07:00
Seb. Vandsebdotv 60c1b0ead6 Update dx serve output: remove wrap in right-side paragraphs (#4055)
* update dx serve output: remove wrap from "Platform", "App features" and "Serving at" paragraphs

ratatui's Wrap system causes text to disappear into an invisible 2nd line when paragraph content exceeds available space, which might confuse new users when terminal width is small.
This PR removes wrapping entirely, using ratatui default behavior (truncation) instead, which is not optimal either but possibly less confusing.

---------

Co-authored-by: sebdotv <sebdotv@gmail.com>
2025-05-07 12:25:35 -07:00
Mahmoud cefb9ec640 fix: add missing img attrs (#4073) 2025-05-07 11:58:16 -07:00
Henry c9ca9f32ad Add Missing Fields From Scroll Event (#4022)
* Add onscroll field data

* Add bun 1.2.10 generated file changes

* Improve error messaging when bun is not installed
2025-05-07 11:57:32 -07:00
Jonathan Kelley d00636ca31 fix: interaction between both hot-reload engines (#4083)
* fix: interaction between both hot-reload engines

* correct comment
2025-05-07 11:35:25 -07:00
Jonathan Kelley b2ec1d957b Cleanup: remove debug log 2025-05-07 01:59:30 -07:00
Jonathan Kelley d976ca184a Binary patching rust hot-reloading, sub-second rebuilds, independent server/client hot-reload (#3797)
Enable runtime rust hot patching.

* roll back wry to 0.45

* cleanup rustc

* wip

* wip: fix client/server

* get the subsecond cli thing working again

* back to list of builds but with accessors

* migrate some methods to workspace, clean up impl a bit

* pass mode through build context

* use a build context, similar to cargo/rustc

* merge BuildUpdate and HandleUpdate into BuilderUpdate

* Move more resolution of args into runner

* migrate some methods to runner

* hoist out fullstack

* fix build request resolver

* yay request is cleaned up

* fixup resolution a bit

* spawn off the build!

* re-wire android autodetection

* re-wire android autodetection

* wire back up a few more things

* re-wire tooling verification

* I think it's mostly in the right condition for regular app

* add depinfo parser

* yay okay works with regular apps again

* full rebuilds are back

* rewire file wtcher

* wire patch!

* yayyyyyy patching works and is really fast

* yay android works

* clean up stdout piping

* yayyy memap on android so we don't need root

* create a static wasm jump table

* wip: global offset table for wasm

* wip... thinking about making the patches relocatable

* wip: customized relocation

* YESSSSSS RELOCATABLE WASM

* clean up impl a bit

* lil bit more cleanup

* lil bit more

* lil bit more cleanup

* lil bit more cleanup, support 32 bit platforms

* sick, wasm is completely pic

* hmmmm not quite working yet

* woooo, patches loading from rust+wasm

* integrated into the cli 😎

* condense a bit

* cleaned up request a bit

* bust fingerprints

* Make the file diffing logic a bit more sensible

* still working through a few issues, server launches but is acting weird

* fix merge conflict

* more merge issues

* remove stuff we don't want anymore

* revert name change

* wip: server not working anymore :(

* split apart "dioxus fullstack" into "dioxus server" and "dioxus web"

* fixup a few more compile errors

* grrr opening server

* simultaneous frontend and backend patching

* use rustc wrapper

* wip: passing assets to jumptable

* migrate project-like examples

* patchy  patchy server fns!

* rollback some random changes

* unwind the js files

* rollback hash

* no need for patch

* more cleanups

* lil bit more cleanup, remove some old cruft

* allow patching when wasm webpage is closed

* tiny bit more robust

* lil bit of clean up

* clean up ws code

* bit more clean ups

* condense

* undo file moves

* move back other project

* move other project

* migrate out harness and janky CLI

* fix compile

* anonymize some files, heavily document others

* lots more documentation, for posterity!

* ton more docs

* clean up the cli a bit more

* more ws cleanup

* more cleanup

* migrate build id to cli-config

* add command file handling

* random small cleanups

* wip....

* wip....

* fix: use workspace for krate discovery

* fix panic logging on serve by placing it *after* the logs

* reorder logging to be sensible on success

* bring back swc

* ws cruft

* small patches to relocs in loader

* bump krates

* hoist main funcs into the ifunc table, fixing wasm

* fix tui output for long lines

* add more linker logging

* wow, incredible, we build fat binaries, holy heckkkkk

* fix args for frontend/backend

* small cleanups

* properly send along build IDs to clients

* fix workspace compiles

* clean up jump table work a bit

* clean up logging a bit

* open existing

* fixup some commands

* open existing browser integration

* wire up the new dx serve client/server syntax

* fixup `dx run` command

* bring back some old functionality

* fix serverfn feature sets

* remove toast animation and simplify its code a bit

* less intrusive toast

* dont change build status when patching on web

* add proper cache busting to vcomponent

* clean up the patch file a bit

* more lints/checks cleaned up

* go back to TargetArgs but a BuildTargets resolved struct

* clean up more nits

* use an atomicptr for jumptable

* fix interaction with initial web load + suspense

* don't run asset system on wasm/bindgen js in dev

* reduce blast radius of PR

* use profile to determine if we're in release

* cleanup prod html template

* cleanup profiles

* fix feature resolution of fullstack

* if fullstack is explicitly false, don't use it

* light cleanups

* drop carg config2

* pass along linker args properly

* make workspace examples compile with dx again

* fewer unwraps and better error loggign

* bit more error handlign

* small cleanup

* drive-by cleanups

* use queries instead of initialize for aslr stuff

* fix hotpatch with higher opt level

* fix aslr bug from multiple clients

* fix merge conflict

* fix typos

* clippy

* fix miscompile

* fix doctest

* properly rollback wry to 0.45

* fix markdown path issues, other test issues

* fix test in router

* fix release mode test

* fix some more tests, clean up a few more items

* use fnptr instead of typeid

* clean up memozation via subsecond in core

* use "main" as sentinel

* fix imports and re-exports

* get off __rust_alloc for aslr offset detection

* wip

* wip... fixing unoptimized web

* hmmmm mmmm

* close,ish, still missing the wasmbindgen dynaimc imports

* aha! full wasm works now

- disable externref when compilng patch modules
- manually link wasm instrinsics
- displace the __wbindgen_placeholder__ table with the synthesized wbg imports

what an awful pain.

There might be a few items missing, so will test against the docsite shortly

* remove failing test

* hmmmm things aren't perfect

* from what I can tell, relocatable wasm just doesn't work with wasm-bindgen

sad

https://github.com/rustwasm/wasm-bindgen/issues/1420

* AI IS LITERALLY THE WORST

* preserve wasm snippets across compiles

* IT HOTPATCHES THE DOCSITE, WE ARE LIVING IN THE FUTURE

* remove the macos cfg-out

* fix: need to allocate 1 more page

* fix url issue

* properly span props

* properly fill in extra symbols

* light cleanups and good docs

* delete cruft, better docs

* More cleanups and simplifications

* clippy, typos

* remove harnesses

* wasm-bindgen error logging

* clean up deps

* remove cruft

* proper priv/pub

* use ifuncs for all env imports

* cruft

* use par_iter, better output

* implement a cache for the base module

* delete custom sections

* cache the main native module too

* add par iter in a few more places

* clippy, map ident

* better logging and status bars

* wip: some small windows support

* wip more windowss

* fix weird regression

* implement windows jump table

* small fixes for windows

* better windows support

* windows support pt2

* rust lld is not msvc

* whole archive the rlibs

* ignore windows and sys crates

* logging

* ohhhhhh, pop out dlls

* dedupe

* thANK GOD FAT LINKING WORKS ON WINDOWS

* hoist caching

* implement patch based on cache

* fix location for pdb

* pass data symbols, correct object

* add all symbol for windows

* add log

* treat none rva as undefined

* whoops

* handle windows calling convention

* dont use relocated arm64 stub windows

* not all are text?

* WINDOWS FUNCTION PATCHING WORKS

but issue with statics?

* use our own entry

* handle windows imp symbols

* add log

* jump to the real symbol not the layout

* whoops

* hotpatching windows works completely holy heck yay

* drop linker args crate

* disable ssg playwright for now

* light cleanups

* some cleanups / preps:
- bump to serverfn 0.8.2
- fix playwright test
- fix clippy

* use fix from #4042

* bring in other fix for liveview

* hoist some configuration

* use __aslr_reference instead of aslr_reference

* add better errors to patcherror

* fix android

* panic if patching fails

* clean up tomls

* wip: fixing wasm compile for server

* fullstack wasm again

* fix cfg

* fixup feature detection

* fix issue with features

* fix playwright!

* add barebones template test harness

* fix compatibility between the two hotreload engines

* fix preldue of server

* fix check for wasm-opt

* small fixes
2025-05-06 23:08:59 -07:00
Juan Vásquez 71d85e6dd5 Fix parsing of braced expressions followed by a method (#4035)
* Fix parsing of braced expressions followed by a method

* Improves the logic for parsing braced expressions

* Fix hot-reload issue

* Added cases for braced expressions followed by identifiers or string literals
2025-05-02 08:31:27 -05:00
Kyle Nweeia f43a8c69fa Fix typo (#4069) 2025-05-02 08:19:19 -05:00
Seb. Vandsebdotv 741eb0a5e6 fix js deprecation warning in wasm init (#4054)
wasm-bindgen now expects an object as parameter, otherwise it issues a warning

Co-authored-by: sebdotv <sebdotv@gmail.com>
2025-04-29 08:35:09 -05:00
silentvoid 74789c4b13 fix: dx check now respects files to ignore (e.g. .gitignore) (#4038)
closes #3751
2025-04-25 08:37:39 -05:00
Clouds 6733e43cc2 fix FormData::valid (#4027) 2025-04-22 18:01:23 -07:00
Evan Almloff d857629115 remove signal write warnings (#4024) 2025-04-22 00:32:57 -07:00
Rhaskia 1ac57f1a36 fix: add lock to asset handler handle request on android (#4006) 2025-04-22 00:32:45 -07:00
Miles Murgaw 5f1df68e0d fix: toast fouc (#4012) 2025-04-21 13:58:34 -07:00
Christian Wyglendowski a9468429d7 Fix the wgpu child window example (#3989) 2025-04-16 08:40:56 -07:00
Jonathan Kelley 1001d78c7f fix: collectFormValues should be retrieveFormValues, export WeakDioxusChannel (#3993)
* fix: collectFormValues should be retrieveFormValues

* fix: export weakDioxusChannel
2025-04-15 23:03:56 -07:00
Russians tortured my 18yo friend Ivan bc of ukr flag in mobile phone 68188f1d7b feat: update flake.lock (#3994) 2025-04-15 20:11:42 -07:00
Jonathan Kelley 30864292ce Fix: cargo fmt merge conflict 2025-04-15 15:00:44 -07:00
Carlos Diaz-Padron 1a3df9d863 add some CLI docs for stdin file input to fmt command (#3934) 2025-04-15 14:53:53 -07:00
Brian MayandJonathan Kelley 5109a4b745 feat: add cli support to build assets from executable (#3429)
* feat: add cli support to build assets from executable

See https://github.com/DioxusLabs/dioxus/discussions/3402#discussioncomment-11632372

* fix: store relative paths in executable

* bring back deprecation warning

---------

Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
2025-04-15 14:51:04 -07:00
Brian May 2c5de0a713 fix(fullstack): Allow configuration of the public_path (#3419) 2025-04-15 14:50:22 -07:00
Miles MurgawandJonathan Kelley e96550c48c Manganis CSS Modules Support (#3578)
* feat: type safe css selectors

* feat: css modules support

---------

Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
2025-04-15 14:44:22 -07:00
Evan Almloff bcc1dc020c Fix javascript asset bundling errors and fallback (#3935) 2025-04-15 14:38:11 -07:00
Varun V 487fa25dc8 fix: Use as_value() to properly serialize form values in login example (#3835)
The login form example was trying to directly use FormValue in reqwest's form method, which doesn't implement Serialize. This change extracts the actual string values using as_value() before sending them to the server.
2025-04-15 14:34:20 -07:00
Youn Mélois fd65c12bf5 fix(rsx): formatted attribute merging (#3719)
* test(rsx): add better tests for attributes merging

* fix(rsx): zero-lengthed source with non-empty segments is non-trivial

* refactor(rsx): use `is_empty` instead of `len() == 0` (clippy)

* fix(rsx): different asserts whether in release or not
2025-04-15 14:28:14 -07:00
_Robertas c58d7303b8 default the storage to UnSyncStorage in ReadSignal type (#3879) 2025-04-15 14:23:26 -07:00
Leon Wimbes 5f01d79907 Update and improve dev container: (#3977)
- Replace deprecated `crates` extension with `dependi`
- Add Playwright extension
- Simplify Dockerfile
- Add dependencies as specified in the Dioxus documentation
- Pre-install Playwright dependencies
- Adjust README.md
2025-04-15 14:22:40 -07:00
Henry 93a557c322 Env logger feature (#3775)
* feat: Expose and configure tracing env-filter

* doc: Add env-filter doc part

* chore: Remove conditional import

* Move logger env-filter feature out of feature flag

* Update logger env filtering

* Add RUST_LOG to the process from the cli

* Typo

* fix clippy

* clippy
2025-04-15 14:21:28 -07:00