Miniquad

Github Actions Docs Crates.io version Discord chat Matrix

Miniquad is a manifestation of a dream in a world where we do not need a deep dependencies tree and thousands lines of code to draw things with a computer.

Miniquad aims to provide a graphics abstraction that works the same way on any platform with a GPU, being as light weight as possible while covering as many machines as possible.

Supported Platforms

Not Supported, but Desirable Platforms

Examples

Imgur

examples/quad.rs: web demo
examples/offscreen.rs: web demo

PonasKovas/miniquad-mandelbrot: web demo

Building examples

Linux

bash cargo run --example quad

On NixOS Linux you can use shell.nix to start a development environment where Miniquad can be built and run.

Windows

```bash

both MSVC and GNU target is supported:

rustup target add x86_64-pc-windows-msvc

or

rustup target add x86_64-pc-windows-gnu

cargo run --example quad ```

WASM

bash rustup target add wasm32-unknown-unknown cargo build --example quad --target wasm32-unknown-unknown

And then use the following .html to load .wasm:

index.html

```html

TITLE

```

One of the ways to server static .wasm and .html:

cargo install basic-http-server basic-http-server .

Android

Recommended way to build for android is using Docker.
miniquad uses slightly modifed version of cargo-apk

docker run --rm -v $(pwd)":/root/src" -w /root/src notfl3/cargo-apk cargo quad-apk build --example quad

APK file will be in target/android-artifacts/(debug|release)/apk

With "log-impl" enabled all log calls will be forwarded to adb console. No code modifications for Android required, everything should just works.

iOS

See miniquad iOS sample project.

Cross Compilation

```bash

windows target from linux host:

this is how windows builds are tested from linux machine:

rustup target add x8664-pc-windows-gnu cargo run --example quad --target x8664-pc-windows-gnu ```

Goals

Non-goals

Platinum sponsors

Miniquad is supported by: