Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fcitx5 対応 #170

Open
tokuhirom opened this issue Jan 17, 2023 · 6 comments
Open

fcitx5 対応 #170

tokuhirom opened this issue Jan 17, 2023 · 6 comments

Comments

@tokuhirom
Copy link
Collaborator

fcitx5 でやったほうがうまくいくケースがあるかもしれないので、fcitx5 にも対応させたい。
が、fcitx5 対応するためには C++ でバインディング書かないといけないので、libakaza を extern "C" でシンボルを expose する C ライブラリにして、、とかやらないと難しそう。

fcitx5 のエンジンは cmake + c++ でやるのが正しい。と思う。

@omasanori
Copy link
Contributor

fcitx5-cskkがまさにRustで書かれたSKK実装を使うC++で書かれたFcitx5インプットメソッドプラグインですね。

Rust - C++ interopも https://cxx.rs/ というのがあります。

@tokuhirom
Copy link
Collaborator Author

あー、fcitx5-cskk が、イメージしてるものに近いですね。

@tokuhirom
Copy link
Collaborator Author

Rust - C++ interopも https://cxx.rs/ というのがあります。

C++ ABI をダイレクトで出すのは茨の道な気がしていて、libakaza の C API を出して、それを利用する形で fcitx5-akaza を実装するのが良い気がしています。

@omasanori
Copy link
Contributor

C++ ABI をダイレクトで出すのは茨の道な気がしていて、libakaza の C API を出して、それを利用する形で fcitx5-akaza を実装するのが良い気がしています。

cxx.rsも内部ではC ABIでやり取りしていて、RustとC++それぞれのバインディングを生成するツールです。(libakazaのC API開発に反対しているわけではありません。)

@tokuhirom
Copy link
Collaborator Author

一週間前と違って rust 力が高まってるので、fcitx5 バインディングを rust でもりもり実装するのも頑張ればできるような気がしないでもない。

@tokuhirom
Copy link
Collaborator Author

tokuhirom commented Jan 24, 2023

https://github.com/eqrion/cbindgen
cskk はこれで C ABI を生成しているっぽい

https://github.com/naokiri/cskk/blob/master/cbindgen.toml

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

No branches or pull requests

2 participants