# tool_timestamp **Repository Path**: seekdome/tool_timestamp ## Basic Information - **Project Name**: tool_timestamp - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-05-21 - **Last Updated**: 2026-05-21 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Timestamp Converter 时间戳与格式化日期时间互转工具,基于 **Rust WASM** + **React TypeScript**。 ## 功能 - **时间 → 戳**: 输入 `2026-05-21 10:48:52` → 输出 `1747798132` - **戳 → 时间**: 输入 `1747798132` → 输出 `2026-05-21 10:48:52` - 支持自定义 `strftime` 格式模板(默认 `%Y-%m-%d %H:%M:%S`) - 一键填入当前时间/时间戳 - 所有时间转换基于本地时区 ## 技术栈 | 层 | 技术 | |---|---| | 语言 | Rust → WASM, TypeScript | | WASM 绑定 | wasm-bindgen + chrono (wasmbind) | | 前端框架 | React 19 + Vite | | 构建 | wasm-pack + Vite | ## 项目结构 ``` timestamp/ ├── wasm-timestamp/ # Rust WASM 库 │ ├── Cargo.toml │ └── src/lib.rs # 导出 now, string_to_timestamp, timestamp_to_string ├── frontend/ # React TS 前端 │ ├── src/App.tsx # 主组件 │ ├── src/App.css │ └── vite.config.ts └── README.md ``` ## 开发 ```bash # 构建 WASM cd wasm-timestamp && wasm-pack build --target web # 启动前端 cd frontend && npm install && npm run dev ``` 访问 `http://localhost:5173/tool/timestamp/` ## 构建 ```bash cd wasm-timestamp && wasm-pack build --target web cd frontend && npm run build ``` 产物在 `frontend/dist/`。