{"id":26231276,"url":"https://github.com/vexide/vexide-slint","last_synced_at":"2025-06-19T01:39:28.834Z","repository":{"id":280238613,"uuid":"941385967","full_name":"vexide/vexide-slint","owner":"vexide","description":"Slint platform implementation for the VEX V5 Brain.","archived":false,"fork":false,"pushed_at":"2025-03-06T03:44:51.000Z","size":81,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-16T16:18:47.581Z","etag":null,"topics":["embedded","embedded-rust","graphics","robotics","rust","slint","ui","vex","vex-v5"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vexide.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-03-02T06:47:05.000Z","updated_at":"2025-03-06T03:44:55.000Z","dependencies_parsed_at":"2025-03-02T14:31:20.211Z","dependency_job_id":"7afea51e-7360-41a1-aca7-be889d67a766","html_url":"https://github.com/vexide/vexide-slint","commit_stats":null,"previous_names":["vexide/vexide-slint"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/vexide/vexide-slint","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vexide%2Fvexide-slint","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vexide%2Fvexide-slint/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vexide%2Fvexide-slint/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vexide%2Fvexide-slint/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vexide","download_url":"https://codeload.github.com/vexide/vexide-slint/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vexide%2Fvexide-slint/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260665240,"owners_count":23044272,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["embedded","embedded-rust","graphics","robotics","rust","slint","ui","vex","vex-v5"],"created_at":"2025-03-12T23:19:47.933Z","updated_at":"2025-06-19T01:39:23.818Z","avatar_url":"https://github.com/vexide.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Slint for vexide\n\nThis crate exists to allow for the use of Slint-based UIs in [vexide]. It\nprovides an implementation of the Slint `Platform` trait that uses the V5 brain\nto render the UI.\n\n[vexide]: https://vexide.dev\n\n## Usage\n\nTo use this crate, add it to your `Cargo.toml`:\n\n```toml\n[dependencies]\nslint-vexide = \"0.1.0\"\n```\n\nThen, you must call `slint_vexide::initialize_slint_platform()` before creating\nand running your Slint widget. This will set up Slint for software-rendering\nyour UI on the brain's display.\n\n## Example\n\n```rust\n// Include the modules generated by Slint for your UI files.\n// You will need to configure your `build.rs` to do this; see below.\nslint::include_modules!();\n\n#[vexide::main]\nasync fn main(peripherals: vexide::prelude::Peripherals) {\n    let robot = Robot {\n        // ...\n    };\n\n    // Since running the Slint UI is a blocking operation, we need to spawn the\n    // competition task as a separate task that will run concurrently.\n    // The Slint runtime internally polls all spawned futures.\n    vexide::task::spawn(robot.compete()).detach();\n\n    // Initialize the Slint platform with the V5 display-backed implementation.\n    vexide_slint::initialize_slint_platform(peripherals.display);\n    // Create and run the application. For more information on this, see the\n    // Slint documentation.\n    MyApplication::new()\n        .expect(\"Failed to create application\")\n        .run()\n        .expect(\"Failed to run application\");\n    // Since MyApplication::run() could return if the application is closed\n    // programmatically, we need to convince the compiler that the return type\n    // is `!` (never).\n    vexide::program::exit();\n}\n```\n\nYou'll need to compile your UI code separately from your main application code\nusing a custom build script. Add the `slint-build` crate to your `Cargo.toml`:\n\n```toml\n[build-dependencies]\nslint-build = \"1.10.0\"\n```\n\nThen, create a `build.rs` file in your project root with the following content:\n\n```rust\nfn main() {\n    // Compile the Slint UI file with the appropriate configuration.\n    slint_build::compile_with_config(\n        \"ui/YourFile.slint\", // Path to your Slint UI file.\n        slint_build::CompilerConfiguration::new()\n            // Make sure to enable this configuration flag.\n            .embed_resources(slint_build::EmbedResourcesKind::EmbedForSoftwareRenderer)\n            // Optionally, you can specify a style to use for the UI.\n            // Check the Slint documentation for more information.\n            .with_style(\"style-name\".into()),\n    )\n    .expect(\"Slint build failed\");\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvexide%2Fvexide-slint","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvexide%2Fvexide-slint","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvexide%2Fvexide-slint/lists"}