Contributing
Memospot contributor's guide.
The recommended code editor is Visual Studio Code. The project has a pre-configured workspace, which will prompt you to install the recommended extensions.
Container build
It's possible to easily build the app for Linux and Windows (NSIS only) using Docker or Podman, via Earthly. This bypasses the need to set up the base OS and other dependencies.
Listing the additional recipes available in the Earthfile
:
Pre-requisites
A system WebView (Edge WebView2, Safari, or WebkitGTK), for Tauri to work.
A modern computer, with at least 8 GB of RAM and a decent CPU. Rust compilation is very CPU-intensive. Also,
rust-analyzer
(language server) utilizes circa 2GB of RAM.20 GB of free disk space, for Rust artifacts.
OS-specific dependencies
See also: Tauri Prerequisites
Linux
macOS
Windows
Build Tools for Visual Studio 2022
Bun
Bun is a fast JavaScript/TypeScript runtime, bundler, test runner, and package manager. It's used to bundle the front end and to run build scripts.
Homebrew
brew install oven-sh/bun/bunWinget
winget install --id Oven-sh.Bun
Node JS
Node is a JavaScript runtime built on Chrome's V8 JavaScript engine.
Homebrew
brew install node@22Winget
winget install --id OpenJS.NodeJS.LTS
UPX (optional; Linux-only)
UPX is a packer for executable files.
Homebrew
brew install upx
Rust
Homebrew
brew install rustup-init rustup-init -y source "$HOME/.cargo/env"Winget
winget install --id Rustlang.Rustup
Rust toolchain
Cargo binstall
Binstall is a tool for installing pre-built Rust binaries.
Homebrew
Powershell
Cargo (build from source)
Rust tools
cargo-cache: Utility to manage
cargo
cache.cargo-edit: Utility to manage
cargo
dependencies.cargo-xwin: Cross compile Cargo projects to Windows.
dprint: A pluggable code formatter.
just: A command runner.
Bash
Powershell
Memos server build
Memos server is built separately on the repository memos-builds.
A pre-build hook will automatically download the latest release from the companion repository and put it in the server-dist
folder. Downloaded files will be reused on subsequent builds.
Sample valid server binary names:
Windows:
memos-x86_64-pc-windows-msvc.exe
Linux:
memos-x86_64-unknown-linux-gnu
macOS:
memos-x86_64-apple-darwin
/memos-aarch64-apple-darwin
Cloning the repository
Changing into the project directory
Using Just
At this point, everything should be ready to go.
Listing all available Just recipes:
Common recipes
just dev
: Run the app in development mode.just build
: Build the app.just fmt
: Run all code formatters.just lint
: Run all code checkers/linters.just test
: Run all available tests.just clean
: Remove build artifacts and caches.
Coding style
Try your best match the existing code style.
Run
just pre-commit
on the repository before submitting a pull request. This will run all the code formatters, linters and tests.
License
By contributing, you agree that all your contributions will be licensed under the MIT License.
In short, when you submit code changes, your submissions are understood to be under the same MIT License that covers the project. Feel free to contact the maintainer if that's a concern.