Skip to content

Contributing

Memospot contributor’s guide.

DeepWiki

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.

This project is available in multiple languages. You can join the Crowdin platform to help make it accessible to a broader audience! Crowdin

The recommended code editors are Zed and Visual Studio Code. The project has a pre-configured workspace, which will prompt you to install the recommended extensions.

  • Try your best to 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.

It’s possible to build the app for Linux and Windows (NSIS installer only) using Docker Bake. It just needs a working Docker installation.

This bypasses the need to setup the tooling on the host OS.

How to

Available actions:

  • CI
    • lint
    • test
  • Release
    • linux
    • windows
  • Release (no-bundle)
    • linux-no-bundle
    • windows-no-bundle
Terminal window
just bake [action]

or

Terminal window
docker buildx bake [action]

See docker-bake.hcl for all available targets.

Terminal window
just bake prune

or

Terminal window
docker builder du && docker builder prune -a
  • A package manager: Homebrew or winget.
  • A system WebView (Edge WebView2, Safari, or WebKitGTK).
  • A modern computer, with at least 8 GB of RAM and a decent CPU.
  • 20 GB of free disk space, for Rust artifacts.

See also: Tauri Prerequisites

Terminal window
sudo apt update -y &&
sudo apt install --no-install-recommends -qq \
autoconf \
autotools-dev \
build-essential \
ca-certificates \
curl \
file \
patchelf \
wget \
git \
unzip \
nsis \
clang \
lld \
llvm \
libayatana-appindicator3-dev \
libgtk-3-dev \
librsvg2-dev \
libssl-dev \
libwebkit2gtk-4.1-dev \
libxdo-dev \
jq \
-y

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.

Terminal window
brew install oven-sh/bun/bun

jq is a lightweight and flexible command-line JSON processor.

Terminal window
brew install jq

Rustup | Website

Terminal window
brew install rustup-init
rustup-init -y
source "$HOME/.cargo/env"
Terminal window
rustup default stable
rustup component add clippy rust-analyzer

Binstall is a tool for installing pre-built Rust binaries.

Terminal window
brew install cargo-binstall
  • 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.
Terminal window
cargo binstall \
--disable-telemetry \
--locked \
--force \
--targets=$(rustc -vV | sed -n 's|host: ||p') \
cargo-cache@0.8.3 \
cargo-edit@0.13.8 \
cargo-xwin@0.20.2 \
dprint@0.50.2 \
just@1.45.0 \
tauri-cli@2.9.5 \
-y

Memos server is built separately on the repository memos-builds.

A pre-build hook script will automatically download the latest release from the companion repository and put it in the server-dist folder, with the appropriate name.

Downloaded files will be reused on subsequent builds.

Manual server build

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
Terminal window
git clone https://github.com/memospot/memospot.git
cd memospot

At this point, everything should be ready to go.

This project’s workflow is heavily based on Just, a modern alternative to Makefiles and scripts.

A justfile is available with several pre-configured recipes for this project. Just installation is covered under the Cargo binstall section.

just devRun the app in development mode
just buildBuild the app
just fmtRun all code formatters
just lintRun all code checkers/linters
just testRun all available tests
just cleanRemove build artifacts and caches
Terminal window
just --list

Should you experience an error regarding soup3-sys, set PKG_CONFIG_PATH manually:

Terminal window
export PKG_CONFIG_PATH="/usr/lib/x86_64-linux-gnu/pkgconfig/:/usr/share/pkgconfig"

You can make this permanent by adding that line to your shell profile (~/.bashrc, ~/.zshrc, etc).

Should you experience issues with cargo-tauri, like bad CPU type in executable, try building it manually:

Terminal window
cargo install --locked --force --target=$(rustc -vV | sed -n 's|host: ||p') tauri-cli