Skip to content

Conversation

black-desk
Copy link
Contributor

No description provided.

Copy link

Summary of Changes

Hello @black-desk, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces the librime package, the foundational library for the Rime Input Method Engine, into the package management system. This addition enables the integration and management of librime as a dependency for other projects, streamlining its build and deployment processes by defining its source, dependencies, and installation procedures.

Highlights

  • New Package Introduction: The librime package, which is the core library for the Rime Input Method Engine, has been added to the repository.
  • Build Configuration: The package uses CMake for its build system, supporting both shared/static library builds and debug/release configurations.
  • Dependencies Declared: Key dependencies such as glog, leveldb, marisa, opencc, yaml-cpp, and boost (with regex and container configurations) are specified for librime.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@black-desk black-desk marked this pull request as draft September 25, 2025 02:51
Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds a new package for librime. The package definition is well-structured. I have a couple of suggestions to improve it. First, to speed up builds, it's better to disable building tests and samples via CMake flags. Second, for better portability on Linux and BSD, explicitly linking pthread is recommended, following the pattern of other packages in this repository.

@Casinius
Copy link

Could NOT find GTest (missing: GTEST_LIBRARY GTEST_INCLUDE_DIR GTEST_MAIN_LIBRARY)

need gtest

@black-desk black-desk force-pushed the add-librime branch 2 times, most recently from fa8c862 to 1602fa3 Compare September 25, 2025 06:11
@star-hengxing
Copy link
Contributor

Could NOT find GTest (missing: GTEST_LIBRARY GTEST_INCLUDE_DIR GTEST_MAIN_LIBRARY)

need gtest

if(BUILD_TEST)
  find_package(GTest REQUIRED)
  if(GTEST_FOUND)
    enable_testing()
    include_directories(${GTEST_INCLUDE_DIRS})
  endif()
endif()

just -DBUILD_TEST=OFF😈

@black-desk
Copy link
Contributor Author

  1. The build error on MacOS seems to be a network issue. How should I retry it?
  2. I don't have a Windows environment, and I failed to reveal the issue by directly looking at the glog build error location. Do any of you have a windows machine to take a look? @Casinius @star-hengxing

table.insert(configs, "-DENABLE_ASAN=" .. (package:config("asan") and "ON" or "OFF"))
import("package.tools.cmake").install(package, configs)
-- Can't use `extern "C"` in c code
if package:config("shared") then
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we sent this change to upstream?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@star-hengxing star-hengxing marked this pull request as ready for review September 25, 2025 11:53
-- end
-- Can't use `extern "C"` in c code
if package:config("shared") then
io.replace(path.join(package:installdir("include"), "rime_api.h"), [[extern "C" RIME_DLL]], "RIME_DLL", {plain = true})
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will there be any issues when including with C++? Or is it okay because there's extern "C" {} outside?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only c++ support the extern "C" syntax.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants