slint
slint copied to clipboard
Ability to import Rust and C++ struct as .slint struct
Something like (in slint)
import { MyNamespace::MyStruct as MyStruct } form "../include/some_file.h";
import { crate::foo::bar::SomeOtherStruct as SomeStruct } from "../some/module/foo.rs";
The slint compiler would use the syn crate to parse the rust file, or some simple C++ parser to parse the header file.
The struct themselves needs to be Clone, Default, Eq (and equivalent in C++) and only have public fields of type that are understood by Slint (without typedef or use or stuff, as the parser will stay simple)