{"id":17169196,"url":"https://github.com/samcrow/rust-x-plane-plugin","last_synced_at":"2025-04-13T16:05:33.275Z","repository":{"id":57672555,"uuid":"47959617","full_name":"samcrow/rust-x-plane-plugin","owner":"samcrow","description":"Types and a macro for easy creation of X-Plane plugins in Rust","archived":false,"fork":false,"pushed_at":"2016-01-10T22:19:58.000Z","size":8,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-05T21:00:10.035Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/samcrow.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}},"created_at":"2015-12-14T07:44:02.000Z","updated_at":"2024-02-19T17:16:33.000Z","dependencies_parsed_at":"2022-08-31T08:01:27.367Z","dependency_job_id":null,"html_url":"https://github.com/samcrow/rust-x-plane-plugin","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samcrow%2Frust-x-plane-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samcrow%2Frust-x-plane-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samcrow%2Frust-x-plane-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samcrow%2Frust-x-plane-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/samcrow","download_url":"https://codeload.github.com/samcrow/rust-x-plane-plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240100514,"owners_count":19747683,"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":[],"created_at":"2024-10-14T23:25:22.426Z","updated_at":"2025-02-23T16:33:10.202Z","avatar_url":"https://github.com/samcrow.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# X-Plane plugin macro for Rust\n\n## Purpose\n\nThis library provides a macro for easy creation of plugins for X-Plane.\n\nWith this library and the [xplm](https://crates.io/crates/xplm)\ncrate, X-Plane plugins can be easily developed in Rust.\n\n## Use\n\nTo import the macro, the crate must be imported like this:\n\n```\n#[macro_use]\nextern crate xplane_plugin;\n```\n\nCreating a plugin involves three steps:\n\n1. Create a struct for your plugin\n2. Implement `Plugin` for your plugin struct\n3. Place `xplane_plugin!(YourPluginStruct)` in a file, not in any function\n\n## Examples\n\n```\n#[macro_use]\nextern crate xplane_plugin;\nuse xplane_plugin::*;\nstruct TestPlugin;\nimpl Plugin for TestPlugin {\n    fn start() -\u003e Option\u003cSelf\u003e {\n        Some(TestPlugin)\n    }\n    fn enable(\u0026mut self) {\n\n    }\n    fn disable(\u0026mut self) {\n\n    }\n\n    fn stop(\u0026mut self) {\n\n    }\n    fn info\u003c'a, 'b, 'c\u003e(\u0026self) -\u003e PluginInfo\u003c'a, 'b, 'c\u003e {\n        PluginInfo {\n            name: \"Test Plugin\",\n            signature: \"org.samcrow.rustplugin.test\",\n            description: \"A plugin written in Rust\",\n        }\n    }\n}\n\nxplane_plugin!(TestPlugin);\n```\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\nfor inclusion in the work by you shall be dual licensed as above, without any\nadditional terms or conditions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamcrow%2Frust-x-plane-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamcrow%2Frust-x-plane-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamcrow%2Frust-x-plane-plugin/lists"}