Skip to content

feat: Add Tauri as an Alternative Build Option for Jan #4844

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 61 commits into
base: dev
Choose a base branch
from

Conversation

louis-menlo
Copy link
Contributor

@louis-menlo louis-menlo commented Mar 26, 2025

This PR introduces Tauri as an alternative build option to Electron, providing a more lightweight and efficient architecture while maintaining full feature parity.

🏗 Architecture Decision

We add Tauri build option to enhance Jan’s performance and cross-platform compatibility. Unlike Electron, which bundles Chromium, Tauri leverages the system’s native webview, resulting in:
✅ Smaller app size (MBs vs. Electron’s hundreds of MBs)
✅ Lower memory & CPU usage for better efficiency
✅ Tauri has many security features built-in by default
✅ Broader platform support (Windows, macOS, Linux, and mobile)

The app logic remains in the Next.js frontend (this can be changed later on), while native functionalities are handled by Tauri’s Rust backend. Cortex is shipped as a sidecar binary, ensuring seamless integration with both Electron and Tauri builds.

CleanShot 2025-03-26 at 19 00 44@2x

📸 Screenshots
CleanShot 2025-03-27 at 21 34 48

✅ Completed

  • Set up the Tauri project
  • Implemented native API handlers for app-native communication
  • Shipped Cortex as a sidecar binary
  • Achieved feature parity:
    • Threads & Chat
    • Model management & Hub
    • Engine management
    • Hardware management
    • App extensions
    • Themes
    • Proxy server
    • App Updater

🚧 In Progress

  • Relocate app data folder
  • Code signing

🛫 To Run with Tauri

make dev-tauri

🎫 Issues
#4485
#4861
#4860

Copy link
Contributor

github-actions bot commented Mar 26, 2025

Barecheck - Code coverage report

Total: 66.99%

Your code coverage diff: -0.57% ▾

Uncovered files and lines
FileLines
core/src/browser/core.ts17-19, 87, 98, 105, 114
core/src/browser/extension.ts93, 101-102, 113-114, 124, 126-128, 134, 169, 171-175, 177-178
core/src/browser/extensions/engines/OAIEngine.ts46, 61, 73, 111, 141-143, 174
core/src/node/api/processors/app.ts70, 77, 85-86, 95-96, 100
core/src/node/api/processors/fs.ts19, 26-28, 30-31, 34, 38-39, 41-42, 54-56, 59, 61-64, 66, 77-79, 82, 84-87, 89
core/src/node/extension/extension.ts93, 126-127, 164-168, 171, 179-182, 192-194, 196
core/src/node/helper/config.ts21-23, 26-27, 30, 32-33, 48, 50-51
web/containers/Layout/BottomPanel/SystemMonitor/index.tsx55, 94, 102, 108, 115-116, 153, 155, 159
web/containers/ModalTroubleShoot/CortexLogs.tsx14-16, 18-22, 30, 44, 57, 80
web/containers/ServerLogs/index.tsx22-29, 31, 33-36, 44-46, 50-51, 54-55, 59, 62, 64, 66-67, 69-70, 72-74, 76-77, 81-83, 85, 88-91, 106, 119, 153
web/extension/ExtensionManager.ts127-128, 131, 134, 138, 172-173, 175-180, 192
web/hooks/useFactoryReset.ts33, 43
web/hooks/useLoadTheme.ts27-30, 32-34, 42-46, 77
web/hooks/useModels.ts47, 51, 61, 63, 67, 88-89
web/hooks/usePath.ts14-15, 19, 21, 24-25, 31, 33-36, 41, 43-47
web/hooks/useSendChatMessage.ts113-114, 116-117, 121-122, 125-126, 134, 136-138, 141-143, 146-147, 149-150, 152, 154-156, 158, 160, 162, 166, 169-170, 176-177, 181, 190, 201, 204, 208, 211, 219, 221, 226, 229, 231, 234, 239, 241-242, 245-249, 252, 254-256, 261-263, 265, 274-275, 297, 300, 303-306, 326-327, 331-333, 335, 357-359, 363, 369, 375-376
web/screens/Settings/Advanced/index.tsx59, 74-76, 79, 151, 174, 179, 199
web/screens/Settings/Privacy/index.tsx26, 94-95, 97-98, 100, 128
web/services/extensionService.ts16-17, 20-23, 25, 27, 31-33
web/utils/messageRequestBuilder.ts40-41, 49, 59-62, 64, 71, 76-77, 84, 89, 104-105, 110, 126-127, 131-132, 137, 140, 146-150, 152, 154, 156, 164, 167, 171

…or-search-or-enter-hf-url-text-field

fix: added border for search textfield
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

4 participants