Skip to content

Commit

Permalink
Update CI, FUNDING, gitignore, and editor settings
Browse files Browse the repository at this point in the history
  • Loading branch information
djkoloski committed Aug 10, 2024
1 parent cafccd0 commit d37319e
Show file tree
Hide file tree
Showing 10 changed files with 183 additions and 162 deletions.
4 changes: 4 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[build]
rustdocflags = ["--cfg", "docsrs"]

[env]
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github: rkyv
21 changes: 0 additions & 21 deletions .github/matchers/rust.json

This file was deleted.

149 changes: 149 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
name: CI

on:
push:
pull_request:
workflow_dispatch:
schedule:
- cron: "0 10 * * *"

permissions:
contents: read

env:
RUSTFLAGS: -Dwarnings

jobs:
features:
name: Features / ${{ matrix.std }} ${{ matrix.simdutf8 }} ${{ matrix.external }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
std:
- ''
- std
simdutf8:
- ''
- simdutf8
external:
- ''
- uuid

steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: cargo test --verbose --tests --no-default-features --features "${{ matrix.std }} ${{ matrix.simdutf8 }} ${{ matrix.external }}"

toolchain:
name: Toolchain / ${{ matrix.toolchain }} ${{ matrix.opt }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
toolchain:
- stable
- beta
- nightly
opt:
- ''
- --release

steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.toolchain }}
- run: cargo test --verbose ${{ matrix.opt }}

miri:
name: Miri / ${{ matrix.opt }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
opt:
- ''
- --release

steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@miri
- run: cargo miri setup
- run: cargo miri test ${{ matrix.opt }} --verbose
env:
MIRIFLAGS: -Zmiri-disable-stacked-borrows -Zmiri-tree-borrows

test:
name: Test / ${{ matrix.target }} ${{ matrix.opt }}
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
opt:
- ''
- --release
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
- os: macos-latest
target: aarch64-apple-darwin
- os: windows-latest
target: x86_64-pc-windows-msvc

steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: cargo test ${{ matrix.opt }}

cross:
name: Cross / ${{ matrix.target }}
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
target:
- i686-unknown-linux-gnu
- i586-unknown-linux-gnu
- armv7-unknown-linux-gnueabihf
- aarch64-unknown-linux-gnu
- thumbv6m-none-eabi

steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: cargo install cross
- run: cross build --no-default-features --features "simdutf8" --target ${{ matrix.target }} --verbose

format:
name: Format
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
with:
components: rustfmt
- run: cargo fmt --check

clippy:
name: Clippy
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
with:
components: clippy
- run: cargo clippy

doc:
name: Doc
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
- run: cargo doc
26 changes: 0 additions & 26 deletions .github/workflows/rust.yml

This file was deleted.

107 changes: 0 additions & 107 deletions .github/workflows/test.yml

This file was deleted.

16 changes: 14 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
# Ignore build artifacts, backup files, and lockfiles

target/
**.*.rs.bk
Cargo.lock
/target
/.vscode

# Changes to VS Code configs are ignored by default. We intentionally check in
# some settings when they're useful defaults.

.vscode

# Files ending in tildes are almost always temporary and not intended for
# checkin.

*~
5 changes: 5 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"rust-analyzer.cargo.features": [
"uuid",
]
}
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ documentation = "https://docs.rs/bytecheck"
repository = "https://github.com/rkyv/bytecheck"

[workspace.dependencies]
bytecheck = { version = "0.8.0-alpha.9", path = "bytecheck", default-feature = false }
bytecheck = { version = "0.8.0-alpha.9", path = "bytecheck", default-features = false }
bytecheck_derive = { version = "0.8.0-alpha.9", path = "bytecheck_derive", default-features = false }
proc-macro2 = { version = "1.0", default-features = false }
ptr_meta = { version = "0.3.0-alpha.2", default-features = false }
Expand Down
14 changes: 9 additions & 5 deletions bytecheck/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,16 @@
//! verifying that some bytes represent a valid type. Implementing it can be
//! done manually or automatically with the [derive macro](macro@CheckBytes).
//!
//! ## Note
//! ## Layout stability
//!
//! By default in-memory layout of a type may change between compiler versions or
//! different compilations (see <https://doc.rust-lang.org/reference/type-layout.html>).
//! In order to guarantee stable type layout between compilations `#[repr(C)]` attribute
//! can be used.
//! The layouts of types may change between compiler versions, or even different
//! compilations. To guarantee stable type layout between compilations, structs,
//! enums, and unions can be annotated with `#[repr(C)]`, and enums specifically
//! can be annotated with `#[repr(int)]` or `#[repr(C, int)]` as well.
//!
//! See [the reference's page on type layout][reference] for more details.
//!
//! [reference]: https://doc.rust-lang.org/reference/type-layout.html
//!
//! ## Examples
//!
Expand Down

0 comments on commit d37319e

Please sign in to comment.