Function vivi_ui::import_paths
source · pub fn import_paths() -> HashMap<String, PathBuf>Expand description
Provides the vivi library paths used by slint-build to make them accessible through @vivi in Slint.
ⓘ
fn main() {
slint_build::compile_with_config(
"ui/index.slint",
slint_build::CompilerConfiguration::new().with_library_paths(vivi::import_paths()),
)
.unwrap();
}Import vivi library in ui/main.slint
import { FilledButton } from "@vivi/magic.slint";