UNPKG

generator-oxy-gen

Version:

Yeoman generator for Electron app with React and Rust (WASM).

49 lines (42 loc) 1.27 kB
# <%= projectName %> This project was generated by [OXY-GEN](https://github.com/ASteinheiser/generator-oxy-gen), an open-source cli tool that helps developers quickly create native desktop apps using React and Rust! It uses Electron to build the native app, create-react-app for the React side, and uses Web Assembly to bind the Rust functions. OXY-GEN includes a recursive fibonacci algorithm written in Node.js and Rust. It uses Web Workers to run both languages in parallel to showcase the speed difference. <img src="https://raw.githubusercontent.com/ASteinheiser/generator-oxy-gen/master/OXY-GEN%20Demo%20Screenshot.png" alt="OXY-GEN Demo Screenshot" width="600"/> # First Time Setup ## Install Yarn ``` npm install -g yarn ``` ## Rust Toolchain ### Install Rustup ``` curl https://sh.rustup.rs -sSf | sh source $HOME/.cargo/env ``` ### Select Nightly Version (for WASM support) ``` rustup default nightly ``` ### Install WASM bindgen and add target ``` rustup target add wasm32-unknown-unknown cargo install wasm-bindgen-cli ``` # Usage ## Install Dependencies: ``` yarn install ``` ## Build Rust(WASM) and React App: ``` yarn build ``` ## Run Dev Electron App: ``` yarn dev ``` ## Build Distribution for Mac, Linux and Windows ``` yarn electron-pack ```