Skip to content

Apply seonbi-rs native binding#381

Draft
moreal wants to merge 8 commits intofedify-dev:mainfrom
moreal:seonbi-native
Draft

Apply seonbi-rs native binding#381
moreal wants to merge 8 commits intofedify-dev:mainfrom
moreal:seonbi-native

Conversation

@moreal
Copy link

@moreal moreal commented Feb 27, 2026

This pull request is an experimental PR to see if seonbi-rs, a Rust port of Seonbi, can be applied. This allows for the conversion of mixed Korean and Hanja text without having to run an additional Seonbi API server.

It can be activated via the SEONBI_NATIVE=true environment variable. The priority order is SEONBI_NATIVE -> SEONBI_URL -> nothing.

Screenshots

漢字 變換 테스트 中 was transformed like the following screenshot in my local environment (phanpy):

image

moreal and others added 8 commits February 24, 2026 22:36
Separate Seonbi API call logic (fetch, request body, response parsing,
error handling) into a dedicated function for better testability and
reusability.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Allow using SEONBI_NATIVE=true to perform Seonbi transformations
locally via napi-rs bindings instead of requiring an external HTTP
API (SEONBI_URL). Falls back to SEONBI_URL if native is unavailable.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Separate language detection and transformer selection logic from
formatPostContent() into a dedicated getPostContentTransformer()
function and a PostContentTransformer type alias.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Clarify that this function uses the Seonbi HTTP API, distinguishing it
from transformWithSeonbiNative which uses the native binding.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

1 participant