{"id":32595210,"url":"https://github.com/skygenesisenterprise/oblivion-sdk","last_synced_at":"2026-04-13T09:31:38.114Z","repository":{"id":320231467,"uuid":"1081305392","full_name":"skygenesisenterprise/oblivion-sdk","owner":"skygenesisenterprise","description":"A Rust Framework SDK for Oblivion OS Distro Project Environment Application","archived":false,"fork":false,"pushed_at":"2025-10-22T17:58:56.000Z","size":73,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-05T20:39:54.097Z","etag":null,"topics":["docker","docker-compose","framework","interface","interface-design","rso","rust","rust-sdk","ui-components"],"latest_commit_sha":null,"homepage":"https://skygenesisenterprise.com","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/skygenesisenterprise.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-22T15:39:16.000Z","updated_at":"2025-10-22T17:58:59.000Z","dependencies_parsed_at":"2025-10-22T18:21:06.031Z","dependency_job_id":"773bd30f-379a-4ca6-bb67-ab3f68a80bd3","html_url":"https://github.com/skygenesisenterprise/oblivion-sdk","commit_stats":null,"previous_names":["skygenesisenterprise/oblivion-sdk"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/skygenesisenterprise/oblivion-sdk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skygenesisenterprise%2Foblivion-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skygenesisenterprise%2Foblivion-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skygenesisenterprise%2Foblivion-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skygenesisenterprise%2Foblivion-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/skygenesisenterprise","download_url":"https://codeload.github.com/skygenesisenterprise/oblivion-sdk/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skygenesisenterprise%2Foblivion-sdk/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31746294,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-13T09:16:15.125Z","status":"ssl_error","status_checked_at":"2026-04-13T09:16:05.023Z","response_time":93,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["docker","docker-compose","framework","interface","interface-design","rso","rust","rust-sdk","ui-components"],"created_at":"2025-10-30T03:33:52.156Z","updated_at":"2026-04-13T09:31:38.109Z","avatar_url":"https://github.com/skygenesisenterprise.png","language":"Rust","readme":"# Oblivion UI SDK\n\nA SwiftUI-inspired Rust SDK for building native user interfaces on OblivionOS, a Debian-based Linux distribution inspired by macOS.\n\n## Overview\n\nOblivion UI provides a declarative, component-based framework for creating native applications with a SwiftUI-like API. It supports reactive state management, event handling, and rendering via SDL2.\n\n## Features\n\n- **Declarative Components**: Window, VStack, HStack, Grid, Panel, Button, Label, Toggle, Input\n- **Reactive State**: @State and @Binding for automatic UI updates\n- **Event Handling**: Click, hover, keyboard, drag events\n- **Theming**: Customizable themes with colors and fonts\n- **Layout**: Spacing, padding, borders for flexible layouts\n- **Rendering**: SDL2-based native rendering with OpenGL/Vulkan support\n- **Cross-Platform**: Designed for Desktop and ARM architectures\n\n## Architecture\n\nThe SDK is structured as a Cargo workspace:\n\n```\noblivion-sdk/\n├── oblivion_ui/          # Core library crate\n│   ├── src/\n│   │   ├── lib.rs        # Main library entry\n│   │   ├── components.rs # UI components\n│   │   ├── state.rs      # State management\n│   │   ├── rendering.rs  # SDL2 rendering engine\n│   │   └── themes.rs     # Theme definitions\n│   └── Cargo.toml\n├── examples/             # Example applications\n│   └── simple_app/\n└── Cargo.toml            # Workspace configuration\n```\n\n## Getting Started\n\n### Prerequisites\n\n- Rust 1.70+\n- SDL2 development libraries\n- SDL2_ttf for text rendering\n\nOn Ubuntu/Debian:\n```bash\nsudo apt-get install libsdl2-dev libsdl2-ttf-dev\n```\n\n### Adding to Your Project\n\nAdd to your `Cargo.toml`:\n```toml\n[dependencies]\noblivion_ui = { path = \"../oblivion_ui\" }\n```\n\n### Basic Example\n\n```rust\nuse oblivion_ui::components::{Window, VStack, Button, Label};\nuse oblivion_ui::state::State;\nuse oblivion_ui::rendering::SDLEngine;\nuse oblivion_ui::themes::Theme;\n\nfn main() -\u003e Result\u003c(), String\u003e {\n    let counter = State::new(\"0\".to_string());\n\n    let mut window = Window::new(\"My App\".to_string(), 800, 600);\n    let mut vstack = VStack::new(10.0).padding(20.0);\n\n    let label = Label::new(counter.binding());\n    vstack.add_child(Box::new(label));\n\n    let button = Button::new(\"Increment\".to_string())\n        .on_click(move || {\n            let current: i32 = counter.get().parse().unwrap_or(0);\n            counter.set((current + 1).to_string());\n        });\n    vstack.add_child(Box::new(button));\n\n    window.add_child(Box::new(vstack));\n\n    let theme = Theme::default();\n    let mut engine = SDLEngine::new(\"My App\", 800, 600)?;\n    engine.run(Box::new(window), \u0026theme)\n}\n```\n\n## Components\n\n### Window\n\nThe root container for your application.\n\n```rust\nlet window = Window::new(\"Title\".to_string(), width, height);\n```\n\n### Layout Components\n\n#### VStack\nVertical stack of components.\n\n```rust\nlet mut vstack = VStack::new(spacing)\n    .padding(10.0)\n    .border(2.0);\nvstack.add_child(Box::new(component));\n```\n\n#### HStack\nHorizontal stack of components.\n\n```rust\nlet mut hstack = HStack::new(spacing)\n    .padding(10.0)\n    .border(2.0);\nhstack.add_child(Box::new(component));\n```\n\n#### Grid\n2D grid layout.\n\n```rust\nlet mut grid = Grid::new(rows, cols, spacing);\ngrid.set_child(row, col, Box::new(component));\n```\n\n#### Panel\nContainer with optional border and padding.\n\n```rust\nlet panel = Panel::new(border_width, padding)\n    .child(Box::new(component));\n```\n\n### Interactive Components\n\n#### Button\nClickable button with label.\n\n```rust\nlet button = Button::new(\"Click me\".to_string())\n    .padding(5.0)\n    .border(1.0)\n    .on_click(|| println!(\"Clicked!\"));\n```\n\n#### Label\nDisplays text, bound to reactive state.\n\n```rust\nlet label = Label::new(state.binding())\n    .padding(5.0);\n```\n\n#### Toggle\nOn/off switch.\n\n```rust\nlet toggle = Toggle::new(state.binding())\n    .on_toggle(|is_on| println!(\"Toggled: {}\", is_on));\n```\n\n#### Input\nText input field.\n\n```rust\nlet input = Input::new(text_binding, \"Placeholder\".to_string());\n```\n\n## State Management\n\n### @State\nLocal reactive state.\n\n```rust\nlet count = State::new(0);\ncount.set(count.get() + 1); // Triggers redraw\n```\n\n### @Binding\nShared state between components.\n\n```rust\nlet binding = state.binding();\nlet value = binding.get();\nbinding.set(new_value);\n```\n\n## Theming\n\nCustomize appearance with themes.\n\n```rust\nlet theme = Theme {\n    primary_color: (255, 0, 0),\n    background_color: (255, 255, 255),\n    text_color: (0, 0, 0),\n    font_size: 14,\n};\n```\n\n## Events\n\nComponents receive events through the `handle_event` method.\n\nSupported events:\n- `Click { x, y }`: Mouse click\n- `Hover { x, y }`: Mouse hover\n- `KeyPress(char)`: Keyboard input\n- `Drag { dx, dy }`: Drag motion\n\n## Rendering\n\nThe SDK uses SDL2 for rendering. The `SDLEngine` manages the event loop and canvas.\n\n```rust\nlet mut engine = SDLEngine::new(title, width, height)?;\nengine.run(root_component, \u0026theme)?;\n```\n\n## Implementing Custom Components\n\nTo create a custom component:\n\n1. Implement the `Component` trait:\n\n```rust\nuse crate::components::{Component, Renderer, Event};\nuse crate::themes::Theme;\n\npub struct MyComponent {\n    // fields\n}\n\nimpl Component for MyComponent {\n    fn render(\u0026self, renderer: \u0026mut dyn Renderer, theme: \u0026Theme) {\n        // Draw your component\n    }\n\n    fn handle_event(\u0026mut self, event: \u0026Event) {\n        // Handle events\n    }\n}\n```\n\n2. Add to your layout:\n\n```rust\nlet my_component = Box::new(MyComponent::new());\nvstack.add_child(my_component);\n```\n\n## Extending the SDK\n\n### Adding New Components\n\nAdd new structs and implementations in `components.rs`.\n\n### Custom Rendering\n\nExtend the `Renderer` trait for different backends.\n\n### System Services\n\nAdd services in a new `services.rs` module:\n\n```rust\npub mod services {\n    pub struct Auth;\n    pub struct Store;\n    // etc.\n}\n```\n\n## Examples\n\nSee `examples/simple_app/` for a complete application.\n\n## Building and Running\n\n```bash\n# Build the SDK\ncargo build\n\n# Run an example\ncargo run -p simple_app\n\n# Build for ARM\ncargo build --target aarch64-unknown-linux-gnu\n```\n\n## API Reference\n\n### Components\n\n#### Trait Component\n```rust\npub trait Component {\n    fn render(\u0026self, renderer: \u0026mut dyn Renderer, theme: \u0026Theme);\n    fn handle_event(\u0026mut self, event: \u0026Event);\n}\n```\n\n#### Struct Window\n- `new(title: String, width: u32, height: u32) -\u003e Self`\n- `add_child(\u0026mut self, child: Box\u003cdyn Component\u003e)`\n\n#### Struct VStack\n- `new(spacing: f32) -\u003e Self`\n- `padding(self, padding: f32) -\u003e Self`\n- `border(self, border: f32) -\u003e Self`\n- `add_child(\u0026mut self, child: Box\u003cdyn Component\u003e)`\n\n#### Struct HStack\n- Similar to VStack\n\n#### Struct Grid\n- `new(rows: usize, cols: usize, spacing: f32) -\u003e Self`\n- `set_child(\u0026mut self, row: usize, col: usize, child: Box\u003cdyn Component\u003e)`\n\n#### Struct Panel\n- `new(border_width: f32, padding: f32) -\u003e Self`\n- `child(self, child: Box\u003cdyn Component\u003e) -\u003e Self`\n\n#### Struct Button\n- `new(label: String) -\u003e Self`\n- `on_click\u003cF\u003e(self, f: F) -\u003e Self where F: FnMut() + 'static`\n- `padding(self, padding: f32) -\u003e Self`\n- `border(self, border: f32) -\u003e Self`\n\n#### Struct Label\n- `new(text: Binding\u003cString\u003e) -\u003e Self`\n- `padding(self, padding: f32) -\u003e Self`\n\n#### Struct Toggle\n- `new(is_on: Binding\u003cbool\u003e) -\u003e Self`\n- `on_toggle\u003cF\u003e(self, f: F) -\u003e Self where F: FnMut(bool) + 'static`\n\n#### Struct Input\n- `new(text: Binding\u003cString\u003e, placeholder: String) -\u003e Self`\n\n### State\n\n#### Struct State\u003cT\u003e\n- `new(initial: T) -\u003e Self`\n- `get(\u0026self) -\u003e T where T: Clone`\n- `set(\u0026self, new_value: T)`\n- `binding(\u0026self) -\u003e Binding\u003cT\u003e`\n\n#### Struct Binding\u003cT\u003e\n- `get(\u0026self) -\u003e T where T: Clone`\n- `set(\u0026self, new_value: T)`\n\n### Rendering\n\n#### Trait Renderer\n- `draw_text(\u0026mut self, text: \u0026str, x: f32, y: f32)`\n- `draw_rect(\u0026mut self, x: f32, y: f32, w: f32, h: f32)`\n\n#### Struct SDLEngine\n- `new(title: \u0026str, width: u32, height: u32) -\u003e Result\u003cSelf, String\u003e`\n- `run(\u0026mut self, root_component: Box\u003cdyn Component\u003e, theme: \u0026Theme) -\u003e Result\u003c(), String\u003e`\n\n### Themes\n\n#### Struct Theme\n- `primary_color: (u8, u8, u8)`\n- `secondary_color: (u8, u8, u8)`\n- `background_color: (u8, u8, u8)`\n- `text_color: (u8, u8, u8)`\n- `font_size: u32`\n\n## Contributing\n\n1. Fork the repository\n2. Create a feature branch\n3. Add tests for new functionality\n4. Submit a pull request\n\n## License\n\nThis project is licensed under the MIT License.\n\n## Roadmap\n\n- [ ] Animation system\n- [ ] System services (Auth, Store, Settings, Notifications)\n- [ ] WebView integration\n- [ ] Vulkan renderer\n- [ ] More components (List, ScrollView, etc.)\n- [ ] Accessibility support\n- [ ] Internationalization\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskygenesisenterprise%2Foblivion-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fskygenesisenterprise%2Foblivion-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskygenesisenterprise%2Foblivion-sdk/lists"}