my build.rs
fn main(){ slint_build::compile("ui/App.slint").unwrap(); }
my App.slint
import { HorizontalBox, VerticalBox } from "std-widgets.slint";
import { IButton } from "components/IBotton.slint";
import { Home } from "Home.slint";
import { Data,Css,Rule,Env } from "gloabl.slint";
component App inherits Wndow{
。。。
}
my main.rs
slint::include_modules!(); pub fn main() { App::new().unwrap().run().unwrap(); }
when i running main.rs ,i always get error like this
Caused by:
process didn't exit successfully: E:\xxx\target\debug\build\hook_ui-bcfd62e356ff13eb\build-script-build (exit code: 101)
--- stderr
error: Parse error: expected a top-level item such as a component, a struct, or a global
--> E:\project_space\rust\hook\hook_ui\ui/App.slint:1:1
|
1 | import { HorizontalBox, VerticalBox } from "std-widgets.slint";
| ^
thread 'main' panicked at 'called Result::unwrap() on an Err value: CompileError(["E:\project_space\rust\hook\hook_ui\ui/App.slint:1: Parse error: expected a top-level item such as a component, a struct, or a global"])', build.rs:2:42
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace
i tried other slint version,but it didnt work either
my cargo.toml
my build.rs
fn main(){ slint_build::compile("ui/App.slint").unwrap(); }
my App.slint
my main.rs
slint::include_modules!(); pub fn main() { App::new().unwrap().run().unwrap(); }
when i running main.rs ,i always get error like this
i tried other slint version,but it didnt work either