* fix: Use Rc for lifecycle management
* Try to unwrap the Rc instead of using both rc and option
* Add a test for use drop
* fix test name
---------
Co-authored-by: Evan Almloff <evanalmloff@gmail.com>
* 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>
* 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>
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
* 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
* 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>
* 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>
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
* 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>
* 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>
* 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>
* 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>
* 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
* 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>