Skip to content

ProCraft for Android: An Android native painting app written in Rust

Rust
README

ProCraft's app icon: a paintbrush in a warm-to-cool blend on a black tile

ProCraft for Android

An Android native open-source painting app for tablets, with its own Rust engine and GPU renderer under a Kotlin/Jetpack Compose UI.
Pressure-sensitive brushes, layers with blend modes, adjustments, selection and transform, animation and 3D painting, written from scratch.

Get it on GitHub Get it on Obtainium

Rust engine GPU renderer: wgpu Kotlin and Jetpack Compose Minimum: Android 10 (API 29) Target: Android 16 (API 36) License: MIT OR Apache-2.0 Status: beta

Painting · Layers & colour · Adjustments & transform · Actions · Planned features · Building


Dusk painted in ProCraft from a blank canvas, at a person's pace: the Soft Airbrush picked in the brush library and its size set; colours picked on the Classic square; the sky filled indigo by dragging the colour onto the canvas and airbrushed in bands of purple, magenta, orange and gold; a new layer for a glow and one for the sun, a circle that snaps round and is filled; two ranges of hills outlined and filled; pines and birds inked; stars airbrushed and made to glow with Bloom; the Layers panel opened on its seven layers
Dusk, painted from a blank canvas on a Lenovo Legion Tab: the brush library, the colour picker, the layers, a sun snapped round and filled, hills filled the same way, pines, stars with Bloom. About 1:20; the full video (MP4, 2:21) shows every menu at close to real speed. Every stroke is a pen stroke with pressure, eased in and out, played by the demo script.


The finished Dusk on the canvas: a sky from deep indigo through purple, magenta and orange to gold, a pale sun with a soft glow, birds, two ranges of purple hills with dark pines, and stars; the top bar with Gallery and the tools, and the sidebar with the size and opacity sliders, undo and redo
The canvas: the tools along the top, size and opacity in the sidebar, the whole screen for the painting.


Painting

The Brush library over Dusk: the sets Sketching, Inking, Drawing, Painting (chosen), Watercolour, Calligraphy, Airbrushing, Spray Paint, Charcoals, Textures and Abstract, each with its icon, and the Painting set's brushes with a preview stroke each
The brush library: eleven sets of our own brushes, each previewed with a stroke.
The Brush Studio on Round Brush: the tabs from Stroke path to About this brush, the Shape tab with its shape source and input style, and the Drawing Pad with a pressure scribble
The Brush Studio: stroke path, stabilization, taper, shape, grain, rendering, wet mix, colour dynamics and more, tried out on the drawing pad.

Layers and colour

The Layers panel over Dusk: seven layers, each with its thumbnail (stars, pines, the near and far hills, the sun, its glow and the sky), their blend mode letters and visibility boxes, and the background colour
Layers with blend modes, opacity, alpha lock, clipping masks, masks and groups. Layers past what the GPU holds are kept compressed, so artworks with hundreds of layers open and paint smoothly.
The Colors panel on its Disc tab: a hue ring around a saturation and brightness disc, the current and previous colours, and the Classic, Harmony, Value and Palettes tabs
Colour: disc, classic, harmony, value (with hex) and palettes.

Adjustments and transform

Hue, Saturation, Brightness on Dusk's sky: the hue moved to 40 percent turns the sky blue at the top and pink at the horizon, with the Hue, Saturation and Brightness sliders below
Hue, saturation, brightness on the sky layer, live. Also colour balance, curves, gradient map, blurs, noise, sharpen, bloom, glitch, halftone, chromatic aberration, liquify and clone, on the layer or painted on.
Transform in Warp on the sun layer: a mesh with corner handles over the sun, and the toolbar with Freeform, Uniform, Distort and Warp, then Advanced Mesh, Flip Horizontal, Flip Vertical, Rotate 45, Fit to Canvas, Bilinear and Reset
Transform: freeform, uniform, distort and warp, with snapping. Selection: automatic, freehand, rectangle and ellipse, with feather.

Actions

The Actions panel on its Canvas tab over Dusk: Crop and Resize, the Animation Assist, Page Assist, Drawing Guide and Reference switches, Edit Drawing Guide, Flip horizontal, Flip vertical and Canvas information, under the Add, Canvas, Share, Video, Prefs and Help tabs
Actions: add files, photos and text; the canvas, its guides and assists; share as PNG, JPEG, PSD, PDF, TIFF, GIF or MP4; a time-lapse of every artwork; preferences and gesture controls.


Planned features

ProCraft for Android is in beta.

Area Status
Canvas: the top bar, the sidebar (size, opacity, modify, undo, redo), full screen, gestures (pinch, rotate, quick fit, two- and three-finger taps, scrub to clear) ✅
Brush engine: shape and grain sources, stroke path, stabilization, taper, rendering and glazes, wet mix, colour dynamics, pen pressure and tilt; the library and the Brush Studio ✅
Layers: blend modes, opacity, alpha lock, clipping masks, masks, groups, merge, the reference layer; large artworks kept compressed off the GPU ✅
Colour: disc, classic, harmony, value and palettes; history; eyedropper; filling by dragging the colour onto the canvas ✅
Adjustments, each with its toolbar, on the layer or painted on ✅
Selection (automatic, freehand, shapes, feather) and transform (freeform, uniform, distort, warp, snapping) ✅
Shapes that snap clean, drawing guides and drawing assist (2D, isometric, perspective, symmetry), text ✅
Animation and page assists, the reference window ✅
Gallery: stacks, new-canvas presets, import and share (PNG, JPEG, PSD, PDF, TIFF, GIF, MP4), time-lapse 🚧 nearly done
3D painting: OBJ and USDZ models, texture sets, painting on the mesh, lights and environments 🚧
Phone layout ⬜

✅ works today · 🚧 in progress · ⬜ not started · 🚫 not planned


Building Instructions

One Gradle command builds the whole app: it compiles the Rust engine with cargo-ndk and generates the Kotlin bindings.

  • Clone this repository
  • Make sure you have at least 6 GB of free disk space
  • enter apps/procraft-android/android and run ./gradlew assembleRelease -Pprocraft.abis=arm64-v8a, or open that folder in Android Studio and press Run.

Build time dependencies:

required tools
    rustup, with the aarch64-linux-android and x86_64-linux-android targets
    cargo install cargo-ndk --version "^4" --locked
    Android SDK (API 37) and NDK 29.0.14206865
    JDK 17 or newer

cargo test --workspace runs the engine's and the renderer's tests on the desktop.

Path What
crates/engine document, brushes, stroke geometry, canvas view (no GPU)
crates/gpu wgpu renderer: layers, strokes, compositing, display
apps/procraft-android the native library for Android (UniFFI bindings)
apps/procraft-android/android the Android app (Gradle)

Builds are only tested on Windows 11.


License

MIT OR Apache-2.0, at your option.

  • Third-party material: the Inter font, Lucide icons and the light panoramas the app bundles, and the libraries it's built with, are listed in NOTICE.
  • Every asset, with its author, source and licence, is in ATTRIBUTION.md.
  • Icons drawn using vector outlines (tools/icons/draw_icons.py, to the style guide).
  • The demo painting, Dusk, is our own, made in the app.

Misc info for myself

Try to use semantic commit messages. Use feat: / fix: / chore: / docs: / etc.