Coder Social home page Coder Social logo

tauri-app-builder's Introduction

Tauri app builder

This Dockerfile is designed to allow cross-compilation of Rust projects for Windows from a Linux or macOS host. It includes the Rust toolchain and a GNU C/C++ cross-compiler for Windows, as well as a shared volume for the source code.

And also this repo demonstrates how to locally compile lightweight Tauri applications to Windows executable (win64) using example Tauri application project tauri-app-builder and tauri-app-vanilla.

Prerequisites

Getting started

  1. Clone the repository:

    git clone --recursive https://github.com/afanasjev82/tauri-app-builder.git
    cd ./tauri-app-builder
  2. Build the image:

    docker build -t tauri-app-builder .

    This will create a Docker image named tauri-app-builder that includes the necessary tools for cross-compiling Rust projects for Windows.

  3. Usage:

    To use the tauri-app-builder image, you'll need to mount a volume containing your Rust project's source code. You can do this by running the following command:

    docker run --rm -v /path/to/tauri/project:/app tauri-app-builder

    This command will run a container using the rust-cross-compile image and mount the /path/to/tauri/project directory as a volume inside the container. The src-tauri directory inside your project will be set as the working directory, and the cargo build command will be executed with the --release flag and the target set to x86_64-pc-windows-gnu. The resulting binary will be placed in the /path/to/tauri/project/build directory, which is also mounted as a volume.

Example

To compile example Tauri project tauri-app-vanilla using tauri-app-builder image, please do the following:

  1. (optional) If repo was cloned without --recursive, initialize repo's submodules

    git submodule update --init

    This will clone tauri-app-vanilla example Tauri application source into ./tauri-app-vanilla. If not successfull (I sometime encounter that issue) clone example repo manually by running following command in the root of this repository:

    git clone https://github.com/afanasjev82/tauri-app-vanilla.git
  2. Build tauri-app-vanilla Windows executable using our tauri-app-builder:

    docker run --rm -v ./tauri-app-vanilla:/app tauri-app-builder

    And then you compiled executable will wait you in the ./tauri-app-vanilla/build/x86_64-pc-windows-gnu/release/tauri-app-vanilla.exe folder.

Recommended IDE Setup

tauri-app-builder's People

Contributors

afanasjev82 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.