moodist icon indicating copy to clipboard operation
moodist copied to clipboard

feat(tauri): Replace Node with Bun & Add Tauri Integration for Cross-Platform Desktop/Mobile Builds

Open imsakg opened this issue 9 months ago • 4 comments

This pull request introduces Tauri integration into the project, replacing the previous Node.js-based commands with Bun and adding necessary configurations and dependencies for building cross-platform desktop and mobile applications. Key changes include updates to the README.md file, new dependencies in package.json, and the addition of Tauri-specific files and configurations.

Tauri Integration

  • README.md: Updated commands to use Bun instead of npm and added Tauri-specific commands for development and building applications across platforms.
  • package.json: Added @tauri-apps/cli as a dependency to enable Tauri integration.
  • src-tauri/Cargo.toml: Added a Rust configuration file for the Tauri app, specifying dependencies like tauri, serde, and log.
  • src-tauri/tauri.conf.json: Added Tauri configuration for app details, build commands, and bundling options, including support for all platforms.

Tauri Project Setup

  • src-tauri/.gitignore: Added entries to ignore compiled files and schemas generated by Cargo.
  • src-tauri/build.rs: Added a build script to configure the Tauri application build process.
  • src-tauri/src/lib.rs: Implemented the main logic for running the Tauri application, including plugin setup for logging in debug mode.
  • src-tauri/src/main.rs: Created the entry point for the Tauri application, linking to the library's run function.
  • src-tauri/capabilities/default.json: Defined default permissions and capabilities for the Tauri application.

imsakg avatar Jul 07 '25 11:07 imsakg

This PR could have missing or wrong parts. So, before merging it let's discuss on it.

  • We should change icons under src-tauri/icons/
  • Maybe we can hide window decorators and make app draggable from it's body.
  • I checked bun run tauri dev and bun run tauri build. Both working awesome but we need to check ios and android targets.

imsakg avatar Jul 07 '25 11:07 imsakg

Why bun?

ASafaeirad avatar Aug 02 '25 20:08 ASafaeirad

It is fast.

imsakg avatar Aug 02 '25 20:08 imsakg

Amazing reason, let's port it to Rust to make it even faster :)

ASafaeirad avatar Aug 08 '25 23:08 ASafaeirad