Compiler Conf (gen_ui.toml)

gen_ui.toml is the configuration file of the GenUI project, which configures the compiler for specific project information and compiles the underlying and development plugins.

Configuration example

gen_ui.toml
1[compiler]
2target = "makepad"
3logo = true
4log_level = "info"
5excludes = ["Cargo.toml", "Cargo.lock", "target", ".gen_ui_cache", "gen_ui.toml", ".plugins"]
6
7[makepad]
8
9[makepad.root]
10path = "/Users/shengyifei/projects/gen_ui/made_with_GenUI/quickstart/start/views/root.gen"
11window = { height = "Fill", width = "Fill", flow = "Down", window_size = { inner_size = { x = 1080.0, y = 720.0 } } }
12
13[makepad.dependencies]
14makepad-widgets = { path = "/Users/shengyifei/projects/makepad/makepad/widgets" }
15
16[plugins]

Configuration description

keyvalue typedescription
compilerCompilerConfCompile basic configuration
underlayerCompileUnderlayerCompile underlying configuration (dynamic type)
pluginsOption<HashMap<String, PathBuf>>GenUI plugin

[compiler]

keyvalue typedescription
targetUnderlayerCompile the underlying layer
logoboolShow GenUI Logo
log_levelLogLevelLog level
excludesExcludesFiles and directories that need to be excluded by the compiler

Underlayer

makepad
None

[makepad]

keyvalue typedescription
entryOption<String>Entry file name
rootRootConfEntry configuration, including UI entry address and window properties
dependenciesOption<Vec<RustDependence>>Rust dependencies
wasmOption<WasmConf>wasm related configuration (compilation synchronization mode, not supported yet)

entry

  • Option<String>

[makepad.root]

keyvalue typedescription
pathPathBufaddress of ui root file
windowProp<WindowProps>the props of window

[makepad.dependencies]

Here use Option<Vec<RustDependence>>

[makepad.wasm]

keyvalue typedescription
freshboolneed to recompile after each update?
portOption<u16>port (default is 8010)

[plugins]

  • Option<HashMap<String, PathBuf>>: Development plugin entry

This configuration is usually automatically added by the ract add command, unless you need to use a local plugin developed by yourself. Its writing method is very uniform, pointing to the directory where the plugin's token.toml is located

plugin_name = ".plugins/plugin_name"