You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There's some values in the Dioxus.toml which aren't documented on the website or even the source code itself. I looked in the 0.3.0 book as well, and they don't seem to be there either. It seems strange to me that these would be undocumented, but I guess that's the case.
Additionally, it would be great if there was a way to generate an exampleDioxus.toml that would contain all possible values. This would allow us to replace the dioxuslabs.com configuring page with a link to the docs.rs, thus reducing the amount of documentation we need to maintain.
Implement Suggestion
Initially, I wanted to document them myself, but realized it's difficult seeing as I didn't write it, and I only have experience with the web configuration (which is documented). However, I've got some suggestions.
As for generating the example, we could use something like this:
// [dependencies]// serde = { version = "1.0.0", features = ["derive"] }// toml = "0.8.0"use serde::{Serialize,Deserialize};#[derive(Debug,Clone,Serialize,Deserialize,Default)]pubstructBundleConfig{// other fields...pubidentifier:Option<String>,// Why is "icon" a vector? Shouldn't it be "icons"?pubicon:Option<Vec<String>>,pubresources:Option<Vec<String>>,// other fields...}// Maybe in a post-build cargo-make?fnmain(){// I don't really know what these fields refer to, so these example values might be wronglet example_bundle = BundleConfig{identifier:Some("GitHub".to_string()),icon:Some(vec!["assets/favicon.ico".to_string()]),resources:Some(vec!["assets/*".to_string(), "octocat_images/*".to_string()]),};match toml::to_string_pretty(&example_bundle){Ok(toml_str) => println!("{toml_str}"),Err(_) => println!("Failed to generate example"),// Or panic}}
Bundler settings are copied from tauri-bundle (more docs here). (The only reason we don't use tauri's structs directly is because tauri's structs don't implement serialize and deserialize which we need to convert them to and from toml)
That explains it. I suppose linking the tauri docs would be sufficient then. Also, does the TUI use the tauri bundler, or only desktop and mobile? For the docsite.
That explains it. I suppose linking the tauri docs would be sufficient then. Also, does the TUI use the tauri bundler, or only desktop and mobile? For the docsite.
I think it should work for TUI, but I haven't tested it. Mobile cannot use dx bundle yet
Specific Demand
There's some values in the
Dioxus.toml
which aren't documented on the website or even the source code itself. I looked in the 0.3.0 book as well, and they don't seem to be there either. It seems strange to me that these would be undocumented, but I guess that's the case.Additionally, it would be great if there was a way to generate an example
Dioxus.toml
that would contain all possible values. This would allow us to replace the dioxuslabs.com configuring page with a link to the docs.rs, thus reducing the amount of documentation we need to maintain.Implement Suggestion
Initially, I wanted to document them myself, but realized it's difficult seeing as I didn't write it, and I only have experience with the web configuration (which is documented). However, I've got some suggestions.
The config structs are in cli/src/config.rs. The documentation for some of them is on the dioxuslabs.com configuring page, so that can be copied. Other documentation needs to be added though.
As for generating the example, we could use something like this:
Output:
The text was updated successfully, but these errors were encountered: