Skip to content

Reflector/rust - #20

Merged
Aalivexy merged 4 commits into
mainfrom
reflector/rust
Jul 19, 2026
Merged

Reflector/rust#20
Aalivexy merged 4 commits into
mainfrom
reflector/rust

Conversation

@Aalivexy

Copy link
Copy Markdown
Member

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 .gz support).
  • Adds native /translate batch 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.

Comment thread src/inference.rs Outdated
Comment thread src/endpoint.rs
@Aalivexy
Aalivexy merged commit 19276b4 into main Jul 19, 2026
1 check passed
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.

2 participants