-
-
Notifications
You must be signed in to change notification settings - Fork 726
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hotreloading of for/if/body
, formatted strings, literals, component props, nested rsx, binary patching
#2258
base: main
Are you sure you want to change the base?
Conversation
…t and dynamic map
for
loopsfor
loops and if
chains
for
loops and if
chainsfor/if/body
I have since expanded the scope of this PR to include anything that seems feasibly hotreloadable. This includes literals anywhere we can find them in components and global signals. So you could in theory hotreload the majority of basic stuff: #[component]
fn comp() {
// Hot reload the value of x
let x = 0;
// Hot reload the value of 0
if x == 0 {
return rsx! {
div { "Hello" }
}
}
rsx! {
// Or hot reload the iterator start and end
for i in 0..10 {
div { "World" }
}
}
} My ultimate goal with all this work is to slap a little UI designer frontend on top that we can plug into devtools. This would let you do storybooks and UI construction without ever recompiling. Drag-and-drop UI builder, app route reloading, integration with gen AI etc. Eventually eventually, get cranelift JIT up and running and then hotreload components themselves. With the eventual cranelift work, we basically have Dart's hotreload engine and then can probably start to strip out the manual template-based hotreloading. I don't want to get too crazy with hotreloading now since that work will probably make most of this work moot, but the timelines there are much longer. |
for/if/body
for/if/body
, formatted strings, literals, and component props
for/if/body
, formatted strings, literals, and component propsfor/if/body
, formatted strings, literals, component props, nested rsx
Will this include hot reloading for workspaces? Would massively speed up components in combo with a manganis issue fixed. |
for/if/body
, formatted strings, literals, component props, nested rsxfor/if/body
, formatted strings, literals, component props, nested rsx, rust
for/if/body
, formatted strings, literals, component props, nested rsx, rustfor/if/body
, formatted strings, literals, component props, nested rsx, binary patching
Hotreload the contents of for loops, if chains, component bodies, props, and any literals discovered in rsx! or under the
#[component]
macro.This is breaking since we need to open a bunch of APIs making this no longer compatible with all the support crates in 0.5. Anyways, plan is to ship by end of april so it's fine that we keep this PR out here for a while.
Also brings in binary patching for components for *nix targets under an experimental flag.
Specifics/todos:
Demo:
hotreload_strings.mov
props_reloaded_too.mov