Reflector/rust - #20
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR migrates the server’s translation execution path to a new pure-Rust LinguaSpark inference engine, updates model discovery/loading accordingly, and adds batch translation support across compatible endpoints.
Changes:
- Replaces the previous translator integration with a new
InferenceEngine(executor pool + model asset discovery, including.gzsupport). - Adds native
/translatebatch support (string or array payload shape) and refactors translation utilities for normalization/source-language resolution. - Updates server configuration/runtime behavior (NUM_WORKERS auto-tuning, protected-route auth scoping) and refreshes docs/container build workflows.
Reviewed changes
Copilot reviewed 10 out of 11 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/translation.rs | Refactors language parsing/detection and introduces batch translation helper using the inference engine. |
| src/main.rs | Wires in InferenceEngine, adjusts worker/IP parsing, and scopes auth middleware to protected routes. |
| src/inference.rs | Adds new inference engine implementation, model scanning, asset loading, and executor pooling. |
| src/endpoint.rs | Extends native translate API to accept batch inputs and shifts immersive endpoint to batch translation. |
| README.md | Updates documentation to reflect LinguaSpark inference and new model layout + batch API. |
| README_ZH.md | Same as README.md, in Chinese. |
| Dockerfile.enzh | Updates model copy layout and removes explicit NUM_WORKERS. |
| Dockerfile | Builds locked release binary and simplifies runtime image (no extra .so copying). |
| Cargo.toml | Adds flate2, bumps tower-http, and pins linguaspark git dependency. |
| Cargo.lock | Updates dependency graph for the new inference engine + compression support. |
| .cnb.yml | Updates model download layout and Docker build context for the en-zh image workflow. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.