Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 76 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: Rust

on:
push:
branches:
- master
paths:
- ".github/workflows/rust.yml"
- "rust/**"
- "include/**"
- "src/**"
pull_request:
paths:
- ".github/workflows/rust.yml"
- "rust/**"
- "include/**"
- "src/**"

env:
RUSTFLAGS: "-D warnings"

jobs:
test:
name: cargo:test
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v4
- name: Install Rust tools
run: |
rustup update --no-self-update stable
rustup default stable
- uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
rust/target
key: ${{ runner.os }}-cargo-${{ hashFiles('rust/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
- name: Run tests
run: |
cd rust
cargo test --verbose

lint:
name: cargo:lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust tools
run: |
rustup update --no-self-update stable
rustup default stable
rustup component add --toolchain stable clippy rustfmt
- uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
rust/target
key: ${{ runner.os }}-cargo-${{ hashFiles('rust/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
- name: Check formatting
run: |
cd rust
cargo fmt --check
- name: Run clippy
run: |
cd rust
cargo clippy
1 change: 1 addition & 0 deletions rust/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/target/
296 changes: 296 additions & 0 deletions rust/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions rust/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[workspace]
members = [
"ruby-rbs-sys",
]

resolver = "3"
11 changes: 11 additions & 0 deletions rust/ruby-rbs-sys/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[package]
name = "ruby-rbs-sys"
version = "0.1.0"
edition = "2024"

[lib]
doctest = false

[build-dependencies]
bindgen = "0.72.0"
cc = "1.2.29"
Loading