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.
This commit is contained in:
Jonathan Kelley authored and GitHub committed 2025-10-03 18:26:19 -07:00
1 parent 8421c3aef0
commit f2b1c6d97f
424 files changed
+17284 -6624

No files matched your search

+10 -6
View File
@@ -1191,6 +1191,8 @@ pub fn prepare_wasm_base_module(bytes: &[u8]) -> Result<Vec<u8>> {
})
.collect::<HashMap<_, _>>();
let mut exported = HashSet::new();
// Wasm-bindgen will synthesize imports to satisfy its external calls. This facilitates things
// like inline-js, snippets, and literally the `#[wasm_bindgen]` macro. All calls to JS are
// just `extern "wbg"` blocks!
@@ -1227,9 +1229,10 @@ pub fn prepare_wasm_base_module(bytes: &[u8]) -> Result<Vec<u8>> {
let new_func_id = module.funcs.add_local(builder.local_func(locals));
module
.exports
.add(&format!("__saved_wbg_{}", import.name), new_func_id);
let saved_name = format!("__saved_wbg_{}", import.name);
if exported.insert(saved_name.clone()) {
module.exports.add(&saved_name, new_func_id);
}
make_indirect.push(new_func_id);
}
@@ -1254,9 +1257,10 @@ pub fn prepare_wasm_base_module(bytes: &[u8]) -> Result<Vec<u8>> {
//
// https://github.com/rustwasm/wasm-bindgen/blob/c35cc9369d5e0dc418986f7811a0dd702fb33ef9/crates/cli-support/src/wit/mod.rs#L1505
if name.starts_with("__wbindgen") {
module
.exports
.add(&format!("__saved_wbg_{name}"), func.id());
let saved_name = format!("__saved_wbg_{}", name);
if exported.insert(saved_name.clone()) {
module.exports.add(&saved_name, func.id());
}
}
// This is basically `--export-all` but designed to work around wasm-bindgen not properly gc-ing