Skip to content

fix: OpenFst compatibility + add C++ runtime CI (#359)#360

Merged
pengzhendong merged 4 commits into
masterfrom
fix/openfst-tokentype
Jun 10, 2026
Merged

fix: OpenFst compatibility + add C++ runtime CI (#359)#360
pengzhendong merged 4 commits into
masterfrom
fix/openfst-tokentype

Conversation

@pengzhendong

@pengzhendong pengzhendong commented Jun 10, 2026

Copy link
Copy Markdown
Member

Summary

  • Fix TokenType compilation error by omitting the explicit TokenType::BYTE argument — both StringCompiler and StringPrinter default to BYTE mode, so this works with both the csukuangfj/openfst fork (fst::TokenType) and official OpenFst 1.8+ (fst::StringTokenType)
  • Add runtime.yml CI workflow to build C++ runtime on runtime/** changes

Fixes #359

Test plan

  • CI: C++ runtime builds on ubuntu and macos

Trigger on runtime/** changes. Builds on ubuntu and macos.
The project uses csukuangfj/openfst v1.8.5 which keeps the original
fst::TokenType enum. The previous commit incorrectly renamed it to
StringTokenType (which is used in official OpenFst releases).
Both StringCompiler and StringPrinter default to BYTE mode, so the
argument can be omitted entirely. This avoids the TokenType vs
StringTokenType naming difference between the csukuangfj fork and
official OpenFst releases.
@pengzhendong pengzhendong changed the title fix: use StringTokenType for OpenFst 1.8+ compatibility fix: OpenFst compatibility + add C++ runtime CI (#359) Jun 10, 2026
@pengzhendong pengzhendong merged commit 0ca3110 into master Jun 10, 2026
3 checks passed
@pengzhendong pengzhendong deleted the fix/openfst-tokentype branch June 10, 2026 02:45
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.

‘TokenType’ has not been declared

1 participant