데스크톱 애플리케이션을 만들기 위한 프레임워크다.
Tauri 2.0
The cross-platform app building toolkit
v2.tauri.app
Backend : Rust
Frontend : webview를 통해 HTML, CSS, JS -> React.js, Next.js 등등 사용 가능
장점
- 매우 작은 바이너리 크기 (Electron 대비 1/10 ~ 1/20 수준)
- 높은 성능과 낮은 메모리 사용량
- Rust의 안전성과 성능 이점
- 강력한 보안 기능 내장
- 크로스 플랫폼 지원 (Windows, macOS, Linux)
개발자 관점에서의 장점
- npm 생태계 활용 가능
- 웹 개발 경험을 데스크톱 앱 개발에 활용
- 시스템 API에 대한 안전한 접근 제공
- 커스텀 플러그인 개발 가능
고려사항
- Rust 학습 곡선이 있을 수 있음
- Electron에 비해 생태계가 상대적으로 작음(gpt/claude 도 모름)
- OS 네이티브 기능 사용 시 추가 개발 필요(Rust로)
설치
1. rust 설치
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
2. project
npx create-next-app@latest --use-npm
3. tsconfig.json or jsconfig.json
"exclude": [
"node_modules",
"src-tauri"
]
4. next.config.js
/** @type {import('next').NextConfig} */
const nextConfig = {
output: 'export',
}
module.exports = nextConfig
5. npm library
npm install --save-dev @tauri-apps/cli@">1.0.0"
npm install @tauri-apps/api@1
6. package.json
"scripts": {
"tauri": "tauri"
}
7. tarui init
npm run tauri init
8. main.rs
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
fn main() {
tauri::Builder::default()
.run(tauri::generate_context!())
.expect("error while running tauri application");
}
대충 세팅을 이렇게하고 Next.js로 기존 front 방식으로 개발하면된다.
build하면 설치 프로그램도 자동으로 생성된다.
the-tarui 가 설치됨.
클릭하면 어플리케이션이 뜬다.
ui는 대충 그냥.
tray icon 적용 방법은 공식 홈페이지에 잘 기술되어있다.
향후, 해당 어플리케이션(AI) 이 사용자 컴퓨터의 내장 GPU 나 NPU를 사용하여(On-device)
LLM을 활용한 여러가지 에이전트를 이용할 수 있도록하는 방향으로.
내장 npu 로 모델 학습 또는 llm 구동하는 내용은 이전 글에 작성
intel npu acceleration library - window
먼저 window ai boost driver를 설치하고 적용해야한다. Intel® NPU Driver - Windows*This download installs Intel® NPU Driver - Windows* 32.0.100.3104 for Intel® Core™ Ultra processors.www.intel.com인텔 NPU 드라이버 설치/업데이트
x2bee.tistory.com