Sign inSign up
rust-desktop logo

stden/rust-desktop

By stden

•Updated 1 day ago

Build and test Rust desktop applications that use GTK 3 and X11.

Image
Languages & frameworks
Developer tools
0

1.1K

stden/rust-desktop repository overview

⁠stden/rust-desktop

Build and test Rust desktop applications that use GTK 3 and X11.

⁠What you learn

You learn to use rust-desktop in a Docker container.

⁠Overview

This image contains the current stable Rust toolchain and desktop build libraries. It includes Cargo, rustfmt, Clippy, LLVM tools, sccache, Tarpaulin, and cargo-binstall. To add a prebuilt Cargo tool in a child image, run cargo binstall --no-confirm <crate>.

GTK 3, X11, XCB, libxdo, and OpenSSL headers support native builds. Xvfb and xauth give a virtual display for tests. The default working directory is /workspace. The default command is Bash.

⁠Tags

TagMeaningPlatform
latestLatest successful build from mainlinux/amd64

The latest tag changes after a new build passes its tests. See all tags and digests⁠.

⁠Use

docker pull stden/rust-desktop:latest
docker run --rm -v "$PWD":/workspace stden/rust-desktop:latest xvfb-run -a cargo test
docker run --rm -v "$PWD":/workspace stden/rust-desktop:latest \
  xvfb-run -a cargo tarpaulin --engine llvm --out Html

Run these commands from a project directory that contains Cargo.toml. The virtual display does not open a window on your host screen.

Cargo downloads your project dependencies when necessary. The image does not contain them. If your application uses extra native libraries, add them in a child image. Build output and coverage reports stay in the mounted project directory. Files that the container creates belong to root.

⁠Checks

The smoke test runs Rust tests, rustfmt, Clippy, and Tarpaulin with its LLVM engine. It compiles a GTK program and opens its window under Xvfb.

⁠Source

Tag summary

Content type

Image

Digest

sha256:9558f21d5…

Size

794 MB

Last updated

1 day ago

docker pull stden/rust-desktop