Skip to content

Commit

Permalink
Added repo-specific files.
Browse files Browse the repository at this point in the history
In order to make `rive-rs` public, we need to add user-facing docs and checks. This is my attempt at providing these.

Diffs=
691079edb Added repo-specific files. (#6105)

Co-authored-by: Dragoș Tiselice <[email protected]>
  • Loading branch information
dragostis and dragostis committed Oct 18, 2023
1 parent 53af0a7 commit 065c164
Show file tree
Hide file tree
Showing 5 changed files with 167 additions and 13 deletions.
91 changes: 91 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
name: Continuous integration

on:
push:

jobs:
check:
name: Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: dtolnay/[email protected]
- uses: Swatinem/rust-cache@v2
- run: cargo check --all --no-default-features
- run: cargo check --all --all-features

build-clang:
name: Build (clang)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: dtolnay/[email protected]
- uses: Swatinem/rust-cache@v2
- name: Install clang
run: |
sudo apt update
sudo apt install clang
- run: CC="clang" CXX="clang++" cargo build --all --no-default-features
- run: CC="clang" CXX="clang++" cargo build --all --all-features

build-gcc:
name: Build (GCC)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: dtolnay/[email protected]
- uses: Swatinem/rust-cache@v2
- run: CC="gcc" CXX="g++" cargo build --all --no-default-features
- run: CC="gcc" CXX="g++" cargo build --all --all-features

test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: dtolnay/[email protected]
- uses: Swatinem/rust-cache@v2
- name: Install clang
run: |
sudo apt update
sudo apt install clang
- run: cargo test --all --no-default-features
- run: cargo test --all --all-features

fmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: dtolnay/[email protected]
with:
components: rustfmt
- run: cargo fmt --all -- --check

clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: dtolnay/[email protected]
with:
components: clippy
- uses: Swatinem/rust-cache@v2
- name: Install clang
run: |
sudo apt update
sudo apt install clang
- run: cargo clippy --all --no-default-features -- -D warnings
- run: cargo clippy --all --all-features -- -D warnings
2 changes: 1 addition & 1 deletion .rive_head
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7227975fb1afd53cbb9d5c6c3149db17606a606f
691079edb8de39819ae3867ce18c31b33ee05a60
4 changes: 4 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Contributing

We love contributions! If you want to run the project locally to test out changes, run the examples,
or just see how things work under the hood, read on below.
71 changes: 71 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
![CI](https://github.com/rive-app/rive-rs/actions/workflows/ci.yml/badge.svg)
[![crates.io](https://img.shields.io/crates/v/rive-rs.svg)](https://crates.io/crates/rive-rs)
[![docs.rs](https://img.shields.io/docsrs/rive-rs)](https://docs.rs/rive-rs)
![Discord badge](https://img.shields.io/discord/532365473602600965)
![Twitter handle](https://img.shields.io/twitter/follow/rive_app.svg?style=social&label=Follow)

# rive-rs

![Rive hero image](https://cdn.rive.app/rive_logo_dark_bg.png)

A Rust runtime library for [Rive](https://rive.app).

## Table of contents

- ⭐️ [Rive Overview](#rive-overview)
- 🚀 [Getting Started](#getting-started)
- 👨‍💻 [Contributing](#contributing)
-[Issues](#issues)

## Rive Overview

[Rive](https://rive.app) is a real-time interactive design and animation tool that helps teams
create and run interactive animations anywhere. Designers and developers use our collaborative
editor to create motion graphics that respond to different states and user inputs. Our lightweight
open-source runtime libraries allow them to load their animations into apps, games, and websites.

🏡 [Homepage](https://rive.app/)

📘 [General help docs](https://help.rive.app/)

🛠 [Learning Rive](https://rive.app/learn-rive/)

## Getting Started

You will need a Rust toolchain and a C compiler to build. You can can install
the Rust toolchain using [rustup].

To open the included viewer, run:

```bash
$ cargo run --release
```

Then, drop any `.riv` file into the window to open it. Scroll to control the size of
the grid of copies.

[rustup]: https://rustup.rs

### Awesome Rive

For even more examples and resources on using Rive at runtime or in other tools, checkout the [awesome-rive](https://github.com/rive-app/awesome-rive) repo.

## Contributing

We love contributions! Check out our [contributing docs](./CONTRIBUTING.md) to get more details into
how to run this project, the examples, and more all locally.

## Issues

Have an issue with using the runtime, or want to suggest a feature/API to help make your development
life better? Log an issue in our [issues](https://github.com/rive-app/rive-rs/issues) tab! You
can also browse older issues and discussion threads there to see solutions that may have worked for
common problems.

### Known Issues

The current [Vello] render back-end does not render image meshes correctly and may start
rendering incorrectly when rendering a very large number of animations.

[Vello]: https://github.com/linebender/vello

12 changes: 0 additions & 12 deletions examples/viewer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,6 @@
Small application for viewing `.riv` files rendered with Vello. It uses [winit]
for creating the window and [image] to decode images.

## Build

You will need clang, Cargo, and the Rust compiler to build. You can can install
Cargo and rustc using [rustup].

To use the application, run:

```bash
$ cargo run --release
```

## Usage

Drop any `.riv` file into the window to open it. Scroll to control the size of
Expand All @@ -28,4 +17,3 @@ Only tested on macOS for the time being.

[winit]: https://github.com/rust-windowing/winit
[image]: https://github.com/image-rs/image
[rustup]: https://rustup.rs

0 comments on commit 065c164

Please sign in to comment.