Demonthos
daeffd4149
pass clippy ( #575 )
2022-10-02 14:12:24 -07:00
Demonthos
047ed1e553
Subtree memorization / reactive templates ( #488 )
...
This commit adds subtree memoization to Dioxus.
Subtree memoization is basically a compile-time step that drastically
reduces the amount of work the diffing engine needs to do at runtime by
extracting non-changing nodes out into a static "template." Templates
are then understood by the various renderers in the ecosystem as a
faster way of rendering the same items.
For example, in the web, templates are simply a set of DOM Nodes created
once and then cloned later. This is the same pattern frameworks like Lithtml
and SolidJS use to achieve near-perfect performance.
Subtree memoization adds an additional level of complexity to Dioxus. The RSX
macro needs to be much smarter to identify changing/nonchanging nodes and
generate a mapping between the Template and its runtime counterparts.
This commit represents a working starter point for this work, adding support
for templates for the web, desktop, liveview, ssr, and native-core renderers.
In the future we will try to shrink code generation, generally improve
performance, and simplify our implementation.
2022-09-30 12:03:06 -07:00
Jon Kelley
28fba42e7e
feat: add an unhygenic render macro ( #556 )
...
* feat: add an unhygenic render macro
* chore: use render instead of rsx!(cx,
2022-09-25 01:05:16 -07:00
Demonthos
baf1807338
allow duplicate idents in format_args_f ( #515 )
2022-08-10 22:45:56 -07:00
Jon Kelley
d9546d9504
Renderers are now packages, not features. ( #387 )
...
* feat: use synchronous router design
* feat: function to get router out of dom
* chore: restructure workspace to use renderers as packages, not features
2022-07-09 15:15:20 -04:00
Demonthos
4a5ae758ee
Allow Multiple dependencies for states in the RealDom (native core) ( #412 )
...
* WIP multable deps
* WIP: refactor and genralize state macro
* add traversable trait
* update tui to use elementid to index dom
2022-07-07 00:50:22 -04:00
Jonathan Kelley
2884d72b08
chore: make clippy happy
2022-07-02 23:45:32 -04:00
Evan Almloff
7730401288
fix escape sequences in ifmt
2022-06-28 12:19:07 -05:00
YuKun Liu
0af69f83f2
Rename hot_reload
to hot-reload
2022-06-26 14:23:19 +08:00
Evan Almloff
dd335cda59
use line!, col!, and row! instead of panic location
2022-06-20 15:44:10 -05:00
Evan Almloff
9e7e5b0859
Merge remote-tracking branch 'upstream/master' into jk/rsx-refactor
2022-06-16 09:17:36 -05:00
Demonthos
df4ea20bb8
create serde compatible parse error
2022-06-15 12:58:08 -05:00
Evan Almloff
2a6d9ed075
handle rsx!{cx, ...}
2022-06-05 07:38:05 -05:00
Evan Almloff
8c6fceb0c7
finish desktop implementation
2022-06-04 14:26:37 -05:00
Evan Almloff
2bcaa2e43e
refactor interperting macro into function and don't rely on cx being in scope
2022-06-04 12:20:56 -05:00
Muhannad Alrusayni
dded91a589
doc: put docs in once place instead of two
2022-06-04 13:40:50 +03:00
Muhannad Alrusayni
252f9343b8
fix: Support Div ()
as component
...
previously I from some reason I thought this not allowed syntax. Some test
failed because of my misunderstood, so now I fix this :D
2022-06-04 13:40:50 +03:00
Muhannad Alrusayni
03a14f4a86
fix: element start with lowercase letter again :D
2022-06-04 13:40:50 +03:00
Muhannad Alrusayni
062f986841
refactor: Remove unused types from scope
2022-06-04 13:40:50 +03:00
Muhannad Alrusayni
37f7fe2ac6
fix: Element must be of lowercase letters only
2022-06-04 13:40:50 +03:00
Muhannad Alrusayni
690efade88
fix: Support Input::<..>
style to for generic components
...
before that, we accepted this style `Input<..>` but to be consistent
with Rust syntax this is dropped now.
> For reference, the two ways of specifying explicit type parameters in
> Rust are:
> // for functions
> let _ = foo::<MyType>();
>
> // for structs
> let _ = Foo::<MyType> { ... };
>
> by @jkelleyrtp
2022-06-04 13:40:50 +03:00
Muhannad Alrusayni
5b079075d7
refactor: clean up commented code.
2022-06-04 13:40:50 +03:00
Muhannad Alrusayni
0b5b7f09db
feat: Support generic component with inline_props
with some limitation
2022-06-04 13:40:50 +03:00
Muhannad Alrusayni
a55b56b403
feat: Support generic components in rsx!()
macro
2022-06-04 13:40:50 +03:00
Evan Almloff
0079f7d18b
WIP: expose pipe for desktop
2022-06-02 13:33:08 -05:00
Evan Almloff
3b2ac82e8d
fix spelling of interpreter
2022-05-31 12:18:22 -05:00
Evan Almloff
b921dc4eec
call error handler when error occurs
2022-05-31 12:06:53 -05:00
Evan Almloff
51b87dafcc
derive serde for Errors and Location, and add error handler
2022-05-31 12:03:04 -05:00
Evan Almloff
94448ea4aa
handle formatting options
2022-05-30 18:32:57 -05:00
Evan Almloff
2183ecf3fb
better error handling
2022-05-29 08:04:08 -05:00
Evan Almloff
06390b9be5
allow rsx to be used outside of a proc_macro context
2022-05-28 12:10:32 -05:00
Evan Almloff
f9713b2fe9
Merge remote-tracking branch 'origin/master' into jk/rsx-refactor
2022-05-27 17:56:50 -05:00
Evan Almloff
94169083f5
use __varibles
2022-05-27 13:09:29 -05:00
Evan Almloff
3c7db0631b
handle iterators and nested rsx calls
2022-05-27 12:21:12 -05:00
Evan Almloff
a0c7e4d78a
add component support
2022-05-27 09:47:44 -05:00
Evan Almloff
5b0a60c294
handle expressions in attributes
2022-05-26 19:16:51 -05:00
Evan Almloff
62cca95905
update interperter to use CapuredContext
2022-05-26 17:02:36 -05:00
Evan Almloff
871f51f91b
It compiles
2022-05-25 14:08:59 -05:00
Evan Almloff
ca10d89670
add RsxTextIndex
2022-05-25 11:20:07 -05:00
Evan Almloff
c7c84da8ab
WIP hot reload
2022-05-25 08:58:59 -05:00
Evan Almloff
db1866090a
fix broken doc links
2022-05-22 20:44:32 -05:00
Jonathan Kelley
3febd42588
Release dioxus-core v0.2.1, dioxus-core-macro v0.2.1, dioxus-html v0.2.1, dioxus-interpreter-js v0.2.1, dioxus-desktop v0.2.3, dioxus-hooks v0.2.1, dioxus-liveview v0.1.0, dioxus-native-core v0.2.0, dioxus-native-core-macro v0.2.0, dioxus-router v0.2.3, dioxus-ssr v0.2.1, dioxus-tui v0.2.2, dioxus-web v0.2.1, fermi v0.2.1, dioxus v0.2.4
2022-05-02 23:57:20 -04:00
Jonathan Kelley
2a1970b3a9
feat: add prettyplease vendored and get basic test working
2022-04-24 02:55:20 -04:00
Jonathan Kelley
794f43ffee
concept: move rsx out to its own crate
2022-04-24 02:35:52 -04:00
Jonathan Kelley
24bca45612
fix: inline props should look for attributes
2022-04-09 19:41:29 -04:00
Jon Kelley
4edaeb0aae
Merge pull request #324 from overlisted/inlineprops-generics
...
`#[inline_props]` generics
2022-03-20 20:28:06 -04:00
Jon Kelley
d3ac3db296
Merge pull request #315 from Synphonyte/master
...
Option<...> props are optional by default.
2022-03-20 19:59:35 -04:00
Ilya Maximov
46b7f3b623
feat: basic generic support
2022-03-20 20:59:30 +01:00
Ilya Maximov
334936b276
fix: typos
2022-03-19 21:04:48 +01:00
Ilya Maximov
86159d0b55
fix: wrong type of error
2022-03-19 20:48:54 +01:00
Ilya Maximov
1f065acb4c
refactor: simplify and organize the errors
2022-03-19 20:37:25 +01:00
Ilya Maximov
0be88d20ee
docs: remove capitals and periods from errors
2022-03-19 19:29:57 +01:00
Maccesch
5818da5f70
auto detect optional props
2022-03-15 16:52:45 +00:00
Jonathan Kelley
e7505188d6
release: make a new 0.2.0 release of Dioxus
2022-03-09 14:24:05 -05:00
Jonathan Kelley
56517ef5de
fix: merge conflicts
2022-02-26 17:35:23 -05:00
Jonathan Kelley
03feaa446a
fix: make clippy happy
2022-02-23 11:37:28 -05:00
Jonathan Kelley
45231651dd
fix: quick patch
2022-02-22 16:34:06 -05:00
Jonathan Kelley
185902f935
fix: macro compiles
2022-02-18 23:14:17 -05:00
Jonathan Kelley
b93487282d
feat: move files around
2022-02-18 20:54:30 -05:00
Jonathan Kelley
b2472e3cfe
Merge branch 'master' into jk/partialexpansion
2022-02-18 15:31:49 -05:00
Jonathan Kelley
3873cd1a60
fix: remove unused depds
2022-02-16 14:40:45 -05:00
Jonathan Kelley
ca7ce46cdb
Merge branch 'master' into jk/partialexpansion
2022-02-13 12:36:02 -05:00
Jonathan Kelley
4a3680ee1b
chore: remove all warnings
2022-02-10 21:00:15 -05:00
Jonathan Kelley
0820e18d3d
feat: make component name accessible
2022-01-31 02:49:37 -05:00
Jonathan Kelley
1b2a0053ef
Release dioxus-core-macro v0.1.7
2022-01-29 10:35:54 -05:00
Jonathan Kelley
56f3002aed
feat: add changelogs
2022-01-29 10:17:14 -05:00
Dave Rolsky
9e4ec43b1e
Fix various typos and grammar nits
...
I also removed all trailing whitespace from lines since I have Emacs
configured to highlight this.
2022-01-21 21:43:43 -06:00
Jonathan Kelley
174d287062
wip: extract to rsx module
2022-01-17 23:02:36 -05:00
Jonathan Kelley
abfac0d59b
wip: move macro lib out of proc macro crate
2022-01-17 16:37:44 -05:00
Jonathan Kelley
47bc4e4a44
feat: add "optional" flag for props
2022-01-16 15:27:41 -05:00
Jonathan Kelley
d2372717bd
feat: flatten props attrs
2022-01-10 02:57:03 -05:00
Jonathan Kelley
f4132d1874
Merge pull request #108 from DioxusLabs/jk/fstring-component-fields
...
Fix: string formatting detection in component fields
2022-01-10 01:20:58 -05:00
Jonathan Kelley
90abd9c9a0
fix: detection of f-string formatting in components
2022-01-10 01:20:03 -05:00
Alexandre Kirszenberg
b6903bf558
Enable clippy
2022-01-08 16:35:26 +01:00
Jonathan Kelley
db0a5bd6ec
Release dioxus-core-macro v0.1.6
2022-01-08 02:26:29 -05:00
Jonathan Kelley
40d1f85d0c
Release dioxus-core v0.1.7, dioxus-core-macro v0.1.6, dioxus-html v0.1.4, dioxus-desktop v0.1.5, dioxus-hooks v0.1.6, dioxus-mobile v0.0.3, dioxus-router v0.1.0, dioxus-ssr v0.1.2, dioxus-web v0.0.4, dioxus v0.1.7
2022-01-08 02:25:03 -05:00
Jonathan Kelley
c439b0ac7e
fix: component pass thru events
2022-01-07 11:51:25 -05:00
Dave Rolsky
51c177be9e
Fix typo "misisng" that occurred in several error messages
2022-01-06 16:18:10 -06:00
Dave Rolsky
706b0e21a5
Fix reference to "html!" macro in "rsx!" macro docs
2022-01-06 10:44:05 -06:00
Jonathan Kelley
bd341f5571
fix: tests
2022-01-05 17:30:12 -05:00
Jonathan Kelley
427b126bc1
feat: add prevent default attribute and upgrade router
2022-01-05 16:34:24 -05:00
Jonathan Kelley
cb2782b4bb
wip: memoize dom in the prescence of identical components
2022-01-05 00:27:22 -05:00
Jonathan Kelley
4ea5c990d7
publish: new versions of everything
2022-01-03 19:44:04 -05:00
Jonathan Kelley
2481cd05c2
fix: attempt to fix ice
2022-01-03 17:20:22 -05:00
Jonathan Kelley
f9b9bb9c0c
publish: update core, core-macro, and html
2022-01-03 02:13:14 -05:00
Jonathan Kelley
cafb7df736
docs: remove all usages of static closure syntax and update readme
2022-01-02 18:35:38 -05:00
Jonathan Kelley
d1560450ba
wip: remove runner on hook and then update docs
2022-01-02 02:15:04 -05:00
Jonathan Kelley
4c85bcfdc8
awesome: arbitrary expressions excepted without braces
2021-12-30 03:14:47 -05:00
Jonathan Kelley
14961023f9
wip: polish some more things
2021-12-29 21:28:28 -05:00
Jonathan Kelley
639f9f5322
publish: bump macro crate
2021-12-29 13:31:52 -05:00
Jonathan Kelley
3dc0e59876
fix: readme and examples syntax
2021-12-28 23:48:25 -05:00
Jonathan Kelley
a4f280d163
feat: more API updates
2021-12-28 23:20:01 -05:00
Jonathan Kelley
b3ac2ee3f7
wip: upgrade hooks
2021-12-27 15:03:43 -05:00
Jonathan Kelley
cda759c659
examples: upgrade to new version of dioxus core.
...
also add the inline_props macro
2021-12-25 17:18:05 -05:00
Jonathan Kelley
b997b8ebbb
feat: enable children properly
2021-12-21 00:46:10 -05:00
Jonathan Kelley
2b928372fb
Release dioxus-core v0.1.3, dioxus-core-macro v0.1.2, dioxus-html v0.1.0, dioxus-desktop v0.0.0, dioxus-hooks v0.1.3, dioxus-liveview v0.1.0, dioxus-mobile v0.0.0, dioxus-router v0.1.0, dioxus-ssr v0.1.0, dioxus-web v0.0.0, dioxus v0.1.1
2021-12-15 16:07:09 -05:00
Jonathan Kelley
0d480a4c43
Release dioxus-core v0.1.3, dioxus-core-macro v0.1.2, dioxus-html v0.1.0, dioxus-desktop v0.0.0, dioxus-hooks v0.1.3, dioxus-liveview v0.1.0, dioxus-mobile v0.0.0, dioxus-router v0.1.0, dioxus-ssr v0.1.0, dioxus-web v0.0.0, dioxus v0.1.0
2021-12-15 16:06:15 -05:00
Jonathan Kelley
868f6739d2
fix: keyword length
2021-12-15 16:06:13 -05:00
Jonathan Kelley
b32665d721
Release dioxus-core v0.1.3, dioxus-core-macro v0.1.2, dioxus-html v0.1.0, dioxus-desktop v0.0.0, dioxus-hooks v0.1.3, dioxus-liveview v0.1.0, dioxus-mobile v0.0.0, dioxus-router v0.1.0, dioxus-ssr v0.1.0, dioxus-web v0.0.0, dioxus v0.1.0
2021-12-15 16:05:20 -05:00
Jonathan Kelley
a33f7701fc
fix: tags
2021-12-15 16:05:18 -05:00
Jonathan Kelley
3a706ac416
Release dioxus-core v0.1.3, dioxus-core-macro v0.1.2, dioxus-html v0.1.0, dioxus-desktop v0.0.0, dioxus-hooks v0.1.3, dioxus-liveview v0.1.0, dioxus-mobile v0.0.0, dioxus-router v0.1.0, dioxus-ssr v0.1.0, dioxus-web v0.0.0, dioxus v0.1.0
2021-12-15 16:04:30 -05:00
Jonathan Kelley
e4c06ce8e8
docs: update cargo tomls
2021-12-15 16:04:27 -05:00
Jonathan Kelley
4de16c4779
docs: update local examples and docs to support new syntaxes
2021-12-15 15:56:53 -05:00
Jonathan Kelley
8814977eee
wip: docs
2021-11-30 22:48:05 -05:00
Jonathan Kelley
52c7154897
fix: really big bug around hooks
2021-11-29 11:10:40 -05:00
Jonathan Kelley
36d89beb34
wip: rename
2021-11-28 16:25:42 -05:00
Jonathan Kelley
bab21a0aa1
wip: updates to router
2021-11-22 15:22:42 -05:00
Jonathan Kelley
a5f05d73ac
wip: docs and router
2021-11-19 00:49:04 -05:00
Jonathan Kelley
8bf57dc21d
chore: polish
2021-11-16 13:09:41 -05:00
Jonathan Kelley
a21020ea57
wip: bubbling in progress
2021-11-11 21:34:20 -05:00
Jonathan Kelley
fd93ee89c1
feat: upgrade syntax
2021-11-10 17:09:52 -05:00
Jonathan Kelley
2933e4bc11
wip: major cleanups to scheduler
2021-11-06 23:11:17 -04:00
Jonathan Kelley
d298b626d3
wip: add router
2021-11-03 00:35:56 -04:00
Jonathan Kelley
2cf90b6903
feat: pull children out of component definition
2021-11-01 13:32:01 -04:00
Jonathan Kelley
27d891934a
fix: use annotation method from rust/58052 to fix closure lifetimes
2021-10-30 18:23:28 -04:00
Jonathan Kelley
9ee2bfb010
wip: worked backwards a bit and got it slightly figured out
2021-10-30 17:11:15 -04:00
Jonathan Kelley
ba9e1dbb8f
fix: messed up how lifetimes worked, need to render once per component
2021-10-29 21:43:21 -04:00
Jonathan Kelley
0e9d5fc530
wip: move everything over to a stack dst
2021-10-29 17:12:30 -04:00
Jonathan Kelley
e1c858dda5
chore: clippy happy on macro
2021-10-27 17:09:22 -04:00
Jonathan Kelley
339e450027
wip: fix some bugs around the rsx macro
2021-10-27 16:58:20 -04:00
Jonathan Kelley
9f7eb0f600
wip: remove HTML macro and add custom fields
2021-10-27 16:41:00 -04:00
Jonathan Kelley
84fd0c6162
feat: cleanuup
2021-10-20 01:26:52 -04:00
Jonathan Kelley
fcc6738f17
chore: remove bump
2021-10-19 22:40:43 -04:00
Jonathan Kelley
79503f15c5
feat: full html support
2021-10-19 22:39:27 -04:00
Jonathan Kelley
9726a065b0
feat: massage lifetimes
2021-10-16 17:37:28 -04:00
Jonathan Kelley
16dbf4a6f8
wip: book documentation
2021-10-16 17:04:28 -04:00
Jonathan Kelley
6587224deb
polish: remove warnings on core macero
2021-09-24 20:51:48 -04:00
Jonathan Kelley
098d3821ed
wip: changes to scheduler
2021-09-22 01:25:28 -04:00
Jonathan Kelley
b32e2611e3
polish: clean up warnings
2021-09-21 18:13:09 -04:00
Jonathan Kelley
a2c7d17b05
feat: mvoe away from compound context
2021-09-21 13:42:52 -04:00
Jonathan Kelley
9971ff215d
polish: change in cx to cx
2021-09-16 13:20:04 -04:00
Jonathan Kelley
c1afeba1ef
wip: groundwork for noderefs
2021-08-09 17:09:33 -04:00
Jonathan Kelley
fac42339c2
feat: mutations
2021-08-08 15:15:16 -04:00
Jonathan Kelley
f2334c17be
wip: bottom up dropping
2021-08-05 22:23:41 -04:00
Jonathan Kelley
0a0be95c3e
wip: get keyed diffing compiling
2021-07-30 10:35:47 -04:00
Jonathan Kelley
7dfe89c958
feat: wire up event delegator for webview
2021-07-24 02:52:05 -04:00
Jonathan Kelley
dfaf5adee1
Feat: solve some issues regarding listeners
2021-07-24 00:29:23 -04:00
Jonathan Kelley
f644d7c441
wip: move things into a "shared" object
2021-07-23 10:27:43 -04:00
Jonathan Kelley
22f894e6b9
wip: more upgades to html parser
2021-07-22 02:06:49 -04:00
Jonathan Kelley
160d86abbe
wip: serious refactor with const generics
2021-07-21 22:55:04 -04:00
Jonathan Kelley
6051b0ec86
wip: fill out the snippets
2021-07-20 19:03:49 -04:00
Jonathan Kelley
4a72b3140b
feat: amazingly awesome error handling
2021-07-18 12:39:32 -04:00
Jonathan Kelley
583fdfa561
docs: big updates to the reference
2021-07-16 16:11:25 -04:00
Jonathan Kelley
caf772cf24
wip: docs, html! macro, more
2021-07-16 00:27:06 -04:00
Jonathan Kelley
c52af221f7
wip: basic support for scheduled rendering
2021-07-14 18:19:51 -04:00
Jonathan Kelley
4091846934
feat: add aria
2021-07-13 00:56:39 -04:00
Jonathan Kelley
a85b8c4b6b
wip: apply formatting
2021-07-12 13:03:24 -04:00
Jonathan Kelley
68ed1c04e7
wip: ....sigh..... so the diffing algorithm is robust
...
but it's still not finished.
We need to re-enable the fancier keyed diffing versions some point (soon!).
2021-07-12 03:58:46 -04:00
Jonathan Kelley
304259d818
wip: move examples around
2021-07-11 18:39:45 -04:00
Jonathan Kelley
e4cdb645aa
feat: beaf up the use_state hook
2021-07-08 09:29:12 -04:00