{"id":13637183,"url":"https://github.com/emoon/rust_minifb","last_synced_at":"2025-05-13T15:12:31.833Z","repository":{"id":40273136,"uuid":"46672317","full_name":"emoon/rust_minifb","owner":"emoon","description":"Cross platfrom window and framebuffer crate for Rust","archived":false,"fork":false,"pushed_at":"2025-04-13T11:17:12.000Z","size":1393,"stargazers_count":1091,"open_issues_count":42,"forks_count":101,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-04-23T18:59:04.952Z","etag":null,"topics":["framebuffer","rust","rust-crate","window"],"latest_commit_sha":null,"homepage":"","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/emoon.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2015-11-22T17:54:25.000Z","updated_at":"2025-04-18T17:24:14.000Z","dependencies_parsed_at":"2023-01-31T06:31:00.471Z","dependency_job_id":"55355d9c-ca83-4575-a0e1-2ccf8f71cc19","html_url":"https://github.com/emoon/rust_minifb","commit_stats":{"total_commits":365,"total_committers":64,"mean_commits":5.703125,"dds":0.2849315068493151,"last_synced_commit":"9df8b59940c6ebe2858a571b666786aa8cb81858"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emoon%2Frust_minifb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emoon%2Frust_minifb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emoon%2Frust_minifb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emoon%2Frust_minifb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/emoon","download_url":"https://codeload.github.com/emoon/rust_minifb/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253969266,"owners_count":21992264,"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":["framebuffer","rust","rust-crate","window"],"created_at":"2024-08-02T00:01:12.154Z","updated_at":"2025-05-13T15:12:26.804Z","avatar_url":"https://github.com/emoon.png","language":"Rust","readme":"[![Build Status](https://github.com/emoon/rust_minifb/workflows/CI/badge.svg)](https://github.com/emoon/rust_minifb/actions?workflow=CI)\n[![Crates.io](https://img.shields.io/crates/v/minifb.svg)](https://crates.io/crates/minifb)\n[![Documentation](https://docs.rs/minifb/badge.svg)](https://docs.rs/minifb)\n\nminifb is a cross platform library written in [Rust](https://www.rust-lang.org) and that makes it easy to setup a window and to (optional) display a 32-bit pixel buffer.  It also makes it easy to get input from keyboard and mouse. Notice that minifb is primary designed for prototyping and may not include all the features found in full window handling libraries.\nAn example is the best way to show how it works:\n\n[Changelog](https://github.com/emoon/rust_minifb/blob/master/CHANGELOG.md)\n\nUsage\n-----\n\n```toml\n# Cargo.toml\n[dependencies]\nminifb = \"0.28\"\n```\n\nExample\n-------\n\n```rust\nuse minifb::{Key, Window, WindowOptions};\n\nconst WIDTH: usize = 640;\nconst HEIGHT: usize = 360;\n\nfn main() {\n    let mut buffer: Vec\u003cu32\u003e = vec![0; WIDTH * HEIGHT];\n\n    let mut window = Window::new(\n        \"Test - ESC to exit\",\n        WIDTH,\n        HEIGHT,\n        WindowOptions::default(),\n    )\n    .unwrap_or_else(|e| {\n        panic!(\"{}\", e);\n    });\n\n    // Limit to max ~60 fps update rate\n    window.set_target_fps(60);\n\n    while window.is_open() \u0026\u0026 !window.is_key_down(Key::Escape) {\n        for i in buffer.iter_mut() {\n            *i = 0; // write something more funny here!\n        }\n\n        // We unwrap here as we want this code to exit if it fails. Real applications may want to handle this in a different way\n        window\n            .update_with_buffer(\u0026buffer, WIDTH, HEIGHT)\n            .unwrap();\n    }\n}\n```\n\nStatus\n------\nCurrently macOS, Linux and Windows (64-bit and 32-bit) are the current supported platforms. X11 (Linux/FreeBSD/etc) support has been tested on Ubuntu (x64). Linux Wayland support is also available. Bug report(s) for other OSes/CPUs are welcome!\nNotice: That after 0.13 Redox hasn't been updated and some work is required to get that working again. PR are welcome.\n\nBuild instructions\n------------------\n\nOn Linux you may need to install these dependencies first:\n\n```\nsudo apt install libxkbcommon-dev libwayland-cursor0 libwayland-dev\n```\n\n```\ncargo build\ncargo run --example noise\n```\n\nThis will run the [noise example](https://github.com/emoon/rust_minifb/blob/master/examples/noise.rs)\n\n## License\n\nLicensed under either of\n\n * Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)\n * MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)\n\nat your option.\n\n### Contribution\n\nUnless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.\n","funding_links":[],"categories":["Libraries","Rust","库 Libraries"],"sub_categories":["GUI","GUI GUI"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femoon%2Frust_minifb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Femoon%2Frust_minifb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femoon%2Frust_minifb/lists"}