{"id":22957046,"url":"https://github.com/openharmony-rs/ohos-sys","last_synced_at":"2025-08-02T01:34:32.615Z","repository":{"id":230954123,"uuid":"777223644","full_name":"openharmony-rs/ohos-sys","owner":"openharmony-rs","description":"FFI-Bindings for OpenHarmony","archived":false,"fork":false,"pushed_at":"2025-07-31T11:49:39.000Z","size":1170,"stargazers_count":14,"open_issues_count":7,"forks_count":4,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-31T13:55:11.425Z","etag":null,"topics":["ffi","ohos","openharmony","rust"],"latest_commit_sha":null,"homepage":"https://docs.rs/ohos-sys/","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/openharmony-rs.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":"2024-03-25T12:54:51.000Z","updated_at":"2025-07-31T11:49:42.000Z","dependencies_parsed_at":"2024-07-23T09:06:15.789Z","dependency_job_id":"85bbae65-932f-472c-87ae-d8ee1e92b6b7","html_url":"https://github.com/openharmony-rs/ohos-sys","commit_stats":null,"previous_names":["jschwe/ohos-sys"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/openharmony-rs/ohos-sys","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openharmony-rs%2Fohos-sys","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openharmony-rs%2Fohos-sys/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openharmony-rs%2Fohos-sys/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openharmony-rs%2Fohos-sys/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/openharmony-rs","download_url":"https://codeload.github.com/openharmony-rs/ohos-sys/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openharmony-rs%2Fohos-sys/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268326278,"owners_count":24232464,"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","status":"online","status_checked_at":"2025-08-01T02:00:08.611Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["ffi","ohos","openharmony","rust"],"created_at":"2024-12-14T17:15:02.596Z","updated_at":"2025-08-02T01:34:32.605Z","avatar_url":"https://github.com/openharmony-rs.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ohos-sys\n\nFFI-bindings for the native API of [OpenHarmony OS]. See the [documentation] for a list of supported components.\nThis crate is under active development, and not officially affiliated with OpenHarmony OS.\n\n## Status of the bindings\n\nHere is an overview of the available C header directories in the OpenHarmony sysroot, and for which of them\nthis crate already provides bindings. The API-level column denotes up to which api level the bindings have\nalready been generated.\n\n| API name                                | status | API-level |\n|-----------------------------------------|--------|-----------|\n| AbilityKit                              | ✅      | 18        |\n| BasicServicesKit                        |        |           |\n| Background Process Manager              |        |           |\n| ConnectivityKit                         |        |           |\n| CryptoArchitectureKit                   |        |           |\n| DataProtectionKit                       |        |           |\n| IPCKit                                  |        |           |\n| LocationKit                             |        |           |\n| NotificationKit                         |        |           |\n| accesstoken                             |        |           |\n| ace/xcomponent                          | ✅      | 18        |\n| ark_runtime                             |        |           |\n| arkui                                   | ✅      | 18        |\n| asset                                   |        |           |\n| bundle                                  |        |           |\n| database                                |        |           |\n| ddk                                     |        |           |\n| ffrt                                    |        |           |\n| filemanagement                          |        |           |\n| hiappevent                              |        |           |\n| hicollie                                |        |           |\n| hid                                     |        |           |\n| hidebug                                 |        |           |\n| hilog                                   | ✅      | 18        |\n| hitrace                                 | ✅      | 18        |\n| huks                                    |        |           |\n| info                                    |        |           |\n| inputmethod                             | ✅      | 18        |\n| mindspore                               |        |           |\n| multimedia                              |        |           |\n| multimodalinput                         | ✅      | 18        |\n| napi                                    | ✅      | 18        |\n| native_buffer                           | ✅      | 18        |\n| native_color_space_manager              |        |           |\n| native_display_soloist                  |        |           |\n| native_drawing                          | ✅      | 18        |\n| native_effect                           |        |           |\n| native_image                            | ✅      | 18        |\n| native_vsync                            | ✅      | 18        |\n| native_window                           | ✅      | 18        |\n| network                                 |        |           |\n| neural_network_runtime                  |        |           |\n| ohaudio                                 |        |           |\n| ohcamera                                |        |           |\n| Pasteboard                              | ✅      | 18        |\n| purgeable_memory                        |        |           |\n| qos                                     |        |           |\n| rawfile                                 | ✅      | 18        |\n| resourcemanager                         |        |           |\n| sensors                                 |        |           |\n| SCSI Peripherals                        |        |           |\n| telephony                               |        |           |\n| transient_task                          |        |           |\n| Unified Data Management Framework(UDMF) | ✅      | 18        |\n| usb                                     |        |           |\n| usb serial                              |        |           |\n| web                                     |        |           |\n| window_manager                          | ✅      | 18        |\n\n## Development\n\nThe current bindings are generated with `bindgen` using `scripts/generate_bindings.sh`.\nBindings are currently generated with the OpenHarmony SDK API level 18, but with items\nadded after API level 10 feature guarded behind `api-XX` features. this is handled\nautomatically by the tool based on the documentation comments in the C header files.\n\n# Contributing\n\nThere are still quite a few OpenHarmony APIs missing. Feel free to contribute missing APIs, but be sure to adapt\nthe script, so your bindings are reproducible!\nThe OpenHarmony SDK can be downloaded from the release notes of the respective release, e.g. the\n[5.0.0 release notes](https://docs.openharmony.cn/pages/v5.0/en/release-notes/OpenHarmony-v5.0.0-release.md).\nNavigate to the `Acquiring Source Code from Mirrors` section, select the `Public SDK package for the standard system`\nfor your host Operating System (Windows / Linux / Mac) click download and optionally verify the SHA-256 checksum\nof the downloaded archive.\nExtract the archive to a suitable location. Please note that the \u003cos_name\u003e subfolder contains more archives.\nFor the purpose of generating the bindings extracting the `native` archive is sufficient.\n\nOnce you have setup your local SDK, you should set the environment variable `OHOS_SDK_NATIVE` to\n`/path/to/ohos-sdk/\u003cyour_host_os\u003e/native`. Afterwards you can run the script to generate the bindings\nand adapt it to incorporate new modules.\n\nPlease also check the following:\n\n- Preferably generate the bindings with libclang in `C` mode. However, if a header file is not C-compliant\n  due to an issue of the OpenHarmony SDK, then setting `libclang` to C++ mode is fine.\n- Be sure to guard the new component behind a cargo feature and document the feature in Cargo.toml.\n\n\n## License\n\nThis crate is licensed under the Apache-2.0 license, matching the OpenHarmony OS SDK.\n\n[OpenHarmony OS]: https://docs.openharmony.cn/pages/v5.0/en/OpenHarmony-Overview.md\n[documentation]: https://docs.rs/ohos-sys/latest/ohos_sys/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenharmony-rs%2Fohos-sys","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenharmony-rs%2Fohos-sys","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenharmony-rs%2Fohos-sys/lists"}