Skip to content

Components and Dependencies

ComponentDirectoryLanguage and buildDeployment
fcitx5 frontendfrontends/fcitx5/C++, CMake, links gRPC C++. A separate directory, outside the Cargo workspaceNative, not containerised; built and tested inside a podman container
Gatewaygateway/Rust, tonic and prostContainer
Fake enginebackends/fake/Rust, can inject delays and failures, used by all automated testsContainer
Doubao enginebackends/doubao/Rust, one container that declares both pinyin and voiceContainer, with the Wine-hosted Doubao engine inside
Generated protocol codecrates/pinshuo-proto/Rust, generated from protocol/Library, built with the Gateway and the engines
Latency probetools/probe/RustDevelopment tool
Deployment filesdeploy/Container images, compose examples, Gateway configuration example

The Windows (TSF) and macOS frontends are planned and not part of this phase.

WhoDepends onThrough
FrontendGatewayprotocol/client/ (gRPC)
GatewayEnginesprotocol/engine/ (gRPC); an engine declares in its capabilities whether it offers pinyin or voice
GatewayA future Reducerprotocol/ingest/ (reserved, one-way, asynchronous)
Gateway and enginespinshuo-protoThe same code generated from the .proto files
Doubao engineThe Wine-hosted Doubao engineA bridge subprocess in one container; the engine is exclusive, so only one session uses it at a time
  • The frontend talks only to the Gateway, never directly to an engine.
  • An engine talks to the Gateway only through protocol/engine/. A new engine is a new container plus an entry in the Gateway configuration.
  • Capabilities are what the engine declares. The Gateway routes by declared capability only, never by directory or container name.
  • In this phase each capability is routed to exactly one engine. If two engines declare the same capability, the Gateway fails at start with a conflict instead of silently picking one.
  • Contracts come before code: a change to a contract under protocol/ updates the components and notes that use it in the same commit.

The Rust parts share one Cargo workspace and one Cargo.lock. The workspace uses protoc-bin-vendored to provide protoc, so neither a developer machine nor a container needs a separate protoc.