{"id":36983606,"url":"https://github.com/cey0225/kon","last_synced_at":"2026-02-15T08:21:29.870Z","repository":{"id":331939521,"uuid":"1128372873","full_name":"cey0225/kon","owner":"cey0225","description":"Kon: A modular 2D game engine for Rust, built with a focus on ECS performance and simplicity.","archived":false,"fork":false,"pushed_at":"2026-02-03T13:36:14.000Z","size":239,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-04T02:59:17.462Z","etag":null,"topics":["2d-game-engine","data-oriented","ecs","entity-component-system","game-engine","gamedev","performance","rust"],"latest_commit_sha":null,"homepage":"https://docs.rs/kon-engine","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cey0225.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-01-05T14:41:44.000Z","updated_at":"2026-02-03T13:36:19.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/cey0225/kon","commit_stats":null,"previous_names":["cey0225/kon"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/cey0225/kon","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cey0225%2Fkon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cey0225%2Fkon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cey0225%2Fkon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cey0225%2Fkon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cey0225","download_url":"https://codeload.github.com/cey0225/kon/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cey0225%2Fkon/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29193089,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-07T07:37:03.739Z","status":"ssl_error","status_checked_at":"2026-02-07T07:37:03.029Z","response_time":63,"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":["2d-game-engine","data-oriented","ecs","entity-component-system","game-engine","gamedev","performance","rust"],"created_at":"2026-01-13T22:58:04.674Z","updated_at":"2026-02-15T08:21:29.863Z","avatar_url":"https://github.com/cey0225.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"assets/kon_stacked.svg\" alt=\"Kon Engine\" width=\"210\"\u003e\n\u003c/p\u003e\n\nA modular 2D game engine in Rust with a custom SparseSet-based ECS. Built from scratch to learn how game engines actually work.\n\n\u003e ⚠️ **Heads up:** This is an experimental/educational project. I'm building this to understand engine internals, not to compete with existing engines.\n\n## What's Inside\n\nThe project is split into workspace crates:\n\n**Currently Working**\n- **`kon_core`** - App lifecycle, plugins, events\n- **`kon_ecs`** - Custom ECS\n- **`kon_macros`** - Proc macros for `#[system]` and `#[component]`\n- **`kon_window`** - Winit-based window management\n- **`kon_input`** - Input handling\n- **`kon_math`** - Math stuff with Glam integration\n- **`kon_renderer`** - WGPU-based 2D renderer\n\n**Still Cooking 🍳**\n- **`kon_scene`** - Scene management and hierarchies (WIP)\n- **`kon_ui`** - Immediate-mode UI toolkit (WIP)\n- **`kon_audio`** - Sound and music playback (Planned)\n- **`kon_animation`** - Sprite animation (Planned)\n- **`kon_physics`** - 2D physics (Planned)\n- **`kon_editor`** - Editor tools (Planned)\n\n## Features\n\n- [x] Plugin-based architecture\n- [x] Custom SparseSet ECS with O(1) component access\n- [x] Write systems as regular Rust functions\n- [x] Ergonomic query API\n- [x] Event system for decoupled communication\n- [x] Window context management\n- [x] Keyboard/mouse input\n- [x] Hardware-accelerated 2D rendering\n- [x] Texture loading and management\n- [x] Immediate-mode shape drawing\n- [ ] Scene hierarchies and parent-child transforms\n- [ ] Sprite animation and atlas support\n- [ ] UI system with common widgets\n- [ ] Audio playback\n- [ ] Collision detection and physics\n- [ ] Integrated editor\n\n## Quick Example\n\nHere's how you write a simple simulation:\n\n```rust\nuse kon::prelude::*;\n\n#[system]\nfn setup(ctx: \u0026mut Context) {\n    ctx.window().set_config(WindowConfig::default().with_title(\"Example\"));\n    \n    let texture = ctx.renderer().load_texture(\u0026[255, 0, 0, 255], 1, 1);\n\n    ctx.world()\n        .spawn()\n        .insert(Transform::from_xy(500.0, 500.0))\n        .insert(Sprite::new(texture).size(400.0, 100.0));\n}\n\n#[system]\nfn draw(ctx: \u0026mut Context) {\n    let h = ctx.window().size().height as f32;\n\n    ctx.renderer()\n        .draw_rect(10.0, h - 105.0, 100.0, 100.0, Color::TEAL);\n    ctx.renderer()\n        .draw_rounded_rect(120.0, h - 105.0, 100.0, 100.0, 10.0, Color::CYAN);\n    ctx.renderer()\n        .draw_circle(275.0, h - 55.0, 50.0, Color::TURQUOISE);\n}\n\n#[system]\nfn update(ctx: \u0026mut Context) {\n    if ctx.input().just_key_pressed(KeyCode::Escape) {\n        ctx.quit();\n    }\n\n    ctx.on::\u003cWindowCloseRequested\u003e(|_, context| {\n        context.quit();\n    });\n}\n\nfn main() {\n    Kon::new()\n        .add_plugin(DefaultPlugins)\n        .add_startup_system(setup)\n        .add_system(draw)\n        .add_system(update)\n        .run();\n}\n```\n\n## How to Use\n\n**As a dependency:**\n\n```bash\ncargo add kon-engine\n```\n\nOr in your `Cargo.toml`:\n\n```toml\n[dependencies]\nkon-engine = \"0.3.2\"\n```\n\n**From source:**\n\n```bash\ngit clone https://github.com/cey0225/kon.git\ncd kon\n\n# Run examples\n# Linux/macOS\n./kon.sh simple_demo\n\n# Windows\n./kon.ps1 simple_demo\n```\n\n## License\n\nDual-licensed under MIT or Apache 2.0, pick whichever works for you.\n\n- MIT: [LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT\n- Apache 2.0: [LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcey0225%2Fkon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcey0225%2Fkon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcey0225%2Fkon/lists"}