Go to file
jess 24054058ad Let's try something else (wayland) 2026-04-25 13:49:11 -07:00
.cargo These might come in handy ;D whoops 2026-04-25 04:00:29 -07:00
include OKAY, FUCK C#, FUCK DOT NET - IM DONE. DIFFERENT APPROACH 2026-04-23 08:01:04 -07:00
resources Cleanup, reorganize scripts. 2026-04-25 00:34:35 -07:00
scripts These might come in handy ;D whoops 2026-04-25 04:00:29 -07:00
src Let's try something else (wayland) 2026-04-25 13:49:11 -07:00
xtask These might come in handy ;D whoops 2026-04-25 04:00:29 -07:00
.gitignore OKAY, FUCK C#, FUCK DOT NET - IM DONE. DIFFERENT APPROACH 2026-04-23 08:06:12 -07:00
Cargo.toml Wayland 2026-04-25 13:38:48 -07:00
Info.plist Init 2026-04-22 15:40:20 -07:00
LICENCE Init 2026-04-22 15:40:20 -07:00
README.md These might come in handy ;D whoops 2026-04-25 04:00:29 -07:00
plugin.json.in Windows - dot net for shell 2026-04-22 17:58:58 -07:00

README.md

Layers

An image maniplulation program-style logical-layer panel for KiCad 10.

You can add or subtract your selection to and from the layer, or to and from the board. You can hide and unhide each layer cleanly. You can rename/colour/lock/annotate, sort and organize the layers, a layer can also have childen.

There are also boolean operations (merge/subtract/intersect) between layers (logical), snap to grid, and more to come. Operations are all composed together as one commit and can easily be undone with Edit->Undo or equivalent.

Rendering of in-panel board previews is powered by Siphon, a pure-Rust KiCad-board-to-vectors crate. You would not technically need KiCad installed to produce the vectors, it is a completely isolated utility which makes no calls at all to kicad-cli.

Install

Every platform installs into KiCad 10's 10.0/plugins directory (on Linux it'll also drop into 11.0, 12.0, etc. if you've already got those, native or flatpak, both). I'm 90% sure that's where they are supposed to go.

cargo xtask install picks the right script and runs it. cargo xtask build stages without installing. install-linux / install-macos / install-windows force a specific platform if you ever need that.

Close KiCad completely prior to running the install script or KiCad might crash, and you might lose work. Close KiCad completely when you update the plugin too. Turns out there's a lot of differences between python and Rust plugins, though maybe the better distiction is IPC plugins in general. I am yet to make a python IPC plugin though, so I can't say for certain.

macOS

Requires Xcode Command-Line Tools, Rust (rustup), and rsvg-convert (optional; only used to regenerate icons from resources/Layers.svg).

git clone https://git.else-if.org/jess/Layers
cd Layers
cargo xtask install

Installs to ~/Documents/KiCad/10.0/plugins/com.jesshunter.layers/

Windows (10 / 11, ARM64 or x86_64)

Grrr. It works. I'm still too tickled to talk about it. It did some real spiteful shit to me. I refused to install visual studio on my VM, and it never forgave me for that.

1. Install MSYS2

Download and run the installer from https://www.msys2.org. Accept the defaults (C:\msys64). When it finishes, launch the MSYS2 shell it drops on your Start menu.

2. Install the toolchain for your CPU

In the MSYS2 shell:

# ARM64 (Apple M[x], Snapdragon X, Surface Pro 11, etc.)
pacman -Syu
pacman -S --needed \
    mingw-w64-clang-aarch64-toolchain \
    mingw-w64-clang-aarch64-cmake \
    mingw-w64-clang-aarch64-ninja \
    mingw-w64-clang-aarch64-librsvg \
    git

# x86_64 (Intel / AMD)
pacman -Syu
pacman -S --needed \
    mingw-w64-ucrt-x86_64-toolchain \
    mingw-w64-ucrt-x86_64-cmake \
    mingw-w64-ucrt-x86_64-ninja \
    mingw-w64-ucrt-x86_64-librsvg \
    git

(You can close + reopen the shell after the first pacman -Syu if it asks you to.)

3. Install Rust + the GNU target

In PowerShell (not MSYS2):

# Install rustup
winget install --id Rustlang.Rustup
# or: irm https://win.rustup.rs/x86_64 | iex

# After rustup finishes, add the matching GNU target:
#   ARM64:
rustup target add aarch64-pc-windows-gnullvm
#   x86_64:
rustup target add x86_64-pc-windows-gnu

4. Add MinGW to your user PATH

Rust's GNU target calls out to the MinGW linker, so that directory needs to be on PATH. Run this once in PowerShell (elevated shell not required):

# ARM64
[Environment]::SetEnvironmentVariable(
  "Path",
  [Environment]::GetEnvironmentVariable("Path", "User") + ";C:\msys64\clangarm64\bin",
  "User"
)

# x86_64
[Environment]::SetEnvironmentVariable(
  "Path",
  [Environment]::GetEnvironmentVariable("Path", "User") + ";C:\msys64\ucrt64\bin",
  "User"
)

Close and reopen every PowerShell / cmd window after this so they pick up the change.

5. Build + install

git clone https://git.else-if.org/jess/Layers
cd Layers
cargo xtask install

Installs to %USERPROFILE%\Documents\KiCad\10.0\plugins\com.jesshunter.layers\ (or the OneDrive-redirected equivalent).

Linux — Debian / Ubuntu / Pop!_OS (apt)

sudo apt update
sudo apt install -y \
    build-essential pkg-config curl git \
    libgtk-3-dev libxkbcommon-dev libwayland-dev \
    libvulkan-dev mesa-vulkan-drivers \
    librsvg2-bin
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
source "$HOME/.cargo/env"

git clone https://git.else-if.org/jess/Layers
cd Layers
cargo xtask install

Installs to ~/.local/share/kicad/10.0/plugins/com.jesshunter.layers/

Linux — Arch / Manjaro (pacman)

sudo pacman -Syu --needed \
    base-devel pkgconf curl git \
    gtk3 libxkbcommon wayland \
    vulkan-icd-loader vulkan-headers \
    librsvg
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
source "$HOME/.cargo/env"

git clone https://git.else-if.org/jess/Layers
cd Layers
cargo xtask install

Installs to ~/.local/share/kicad/10.0/plugins/com.jesshunter.layers/

In both cases, it checks both the standard directory and the Flatpak directory. If you for some reason have both, it places it in both. If for some reason you have both but only want it in one of them, you can just delete it from the one you don't want it in.

The Flatpak plugins dir is ~/.var/app/org.kicad.KiCad/data/kicad/10.0/plugins/com.jesshunter.layers/

Configuration

resources/colors.toml in the installed plugin directory controls every UI colour and the window-fade alphas. Edit to taste and restart the plugin to pick up the change.

The plugin writes settings and state to:

Platform Path
macOS ~/Library/Application Support/com.jesshunter.layers/
Linux $XDG_DATA_HOME/com.jesshunter.layers/ (typically ~/.local/share/com.jesshunter.layers/)
Windows %APPDATA%\com.jesshunter.layers\

Licence

Unlicensed — see LICENCE.

Written by pszsh.