Skip to content

Instantly share code, notes, and snippets.

@w1th0utnam3
Last active January 29, 2024 23:17
Show Gist options
  • Save w1th0utnam3/7700ad795df92eb1c10aed5710d4b344 to your computer and use it in GitHub Desktop.
Save w1th0utnam3/7700ad795df92eb1c10aed5710d4b344 to your computer and use it in GitHub Desktop.
Building a Rust/Electron app

Links

Workflow:

React and TypeScript:

Electron:

Apps

Rust communication

Rust and NodeJs/Electron:

Efficient transfer between main and worker:

Rendering:

Frameworks:

UI component libs for React:

Setting up projects / Example workflows

  • Install latest node.js
  • Install yarn: npm install -g yarn@berry

Installing node on Linux

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.2/install.sh | bash

Restart terminal source new enviornment

nvm install 6.14.4  # or latest version number
nvm use node

Create React/Typescript app

yarn create react-app my-app --template typescript
cd my-app
yarn upgrade
yarn start

with yarn2:

yarn dlx create-react-app my-app --template typescript
cd my-app
yarn install
yarn up
yarn start

Create Electron/React app

git clone --depth 1 --single-branch --branch master https://github.com/electron-react-boilerplate/electron-react-boilerplate.git your-project-name
cd your-project-name
yarn upgrade
yarn dev
@w1th0utnam3
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment