{"id":16166345,"url":"https://github.com/alswl/librime-remote","last_synced_at":"2026-07-19T01:36:42.887Z","repository":{"id":142007523,"uuid":"194414459","full_name":"alswl/librime-remote","owner":"alswl","description":null,"archived":false,"fork":false,"pushed_at":"2019-06-29T14:28:51.000Z","size":8,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-03-29T17:27:17.622Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alswl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2019-06-29T14:28:36.000Z","updated_at":"2024-01-26T16:50:01.000Z","dependencies_parsed_at":null,"dependency_job_id":"38ae7b8b-f677-4506-93b3-85416800ce7d","html_url":"https://github.com/alswl/librime-remote","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/alswl/librime-remote","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alswl%2Flibrime-remote","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alswl%2Flibrime-remote/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alswl%2Flibrime-remote/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alswl%2Flibrime-remote/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alswl","download_url":"https://codeload.github.com/alswl/librime-remote/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alswl%2Flibrime-remote/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35637763,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-18T02:00:07.223Z","response_time":61,"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":[],"created_at":"2024-10-10T02:53:57.318Z","updated_at":"2026-07-19T01:36:42.871Z","avatar_url":"https://github.com/alswl.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# A sample Rime plugin module\n\nThis directory offers a Rime plugin named `rime-sample`.\n\n## Overview\n\nHere's how a Rime plugin works:\n\nA *plugin* can either be linked to librime or be a separate shared library,\ncorresponding to the `BUILD_MERGED_PLUGINS` cmake option.\n\nWhen the shared library is loaded, it registers itself as *module* `sample`.\nIf otherwise it's built-in, the module will be automatically loaded by default.\n\nWhen Rime `initialize`s via API, it loads its default modules or modules\nspecified by the caller in `RimeTraits::modules`.\n\nModules can also be loaded on demand using C++ API `rime::LoadModules()`.\n\nWhen the module is loaded, the `rime_sample_initialize()` function is run,\nwhich registers a *component* `trivial_translator`.\n\nThat component is now available for prescription in Rime schema.\nIt works with the Rime engine in the same way as the built-in translators.\n\n## Build the sample plugin library\n\n``` shell\ncd librime\ncmake . -Bbuild -DBUILD_SAMPLE=ON -DBUILD_SEPARATE_LIBS=ON\ncmake --build build --target rime-sample\n```\n\nThis outputs shared library: `build/sample/lib/rime-sample.so`\n\nThe `BUILD_SEPARATE_LIBS=ON` option is not required but builds faster because\n`rime-sample` only depends on the core module of librime.\n\n## Run unit tests\n\n``` shell\ncmake --build build --target sample_test\n\n# run tests\nbuild/sample/test/sample_test\n```\n\n## Play with sample_console\n\n`trivial_translator` converts pinyin to Chinese numbers.\nA sample Rime schema is set up in `build/bin/sample.schema.yaml` to utilize\nthe translator.\n\nBuild the console app and try it with a random number in pinyin:\n\n``` shell\ncmake --build build --target sample_console\n\ncd build/sample/bin\necho \"yibaiershisanwansiqianlingwushiliu\" | ./sample_console\n```\n\n## Build as standard Rime plugin\n\nUnlike the sample, which is built after specific rules in librime's cmake\nscript, standard Rime plugins are separate projects that automatically\nintegrate into librime's build system, without having to modify any source code\nand build script.\n\nTo build the sample plugin as standard Rime plugin, link or copy the source code\ndirectory to `plugins/sample` and turn off cmake flag `BUILD_SAMPLE=OFF`.\n\nhttps://github.com/rime/librime-sample is the same sample plugin in its separate\nGitHub repository. You can checkout plugins (a list of slugs) with this command:\n\n``` shell\ncd librime\nbash install-plugins.sh rime/librime-sample # ...\n```\n\nThe cmake option `BUILD_MERGED_PLUGINS` merges all detected plugins into the\nbuilt `rime` library. Set the option off to build each plugin as a standalone\n(shared) library. In the latter case, the user needs to explicitly load the\n`rime-sample` library and load the `sample` module when `initialize`-ing.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falswl%2Flibrime-remote","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falswl%2Flibrime-remote","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falswl%2Flibrime-remote/lists"}