Skip to content

Commit

Permalink
Merge pull request containers#282 from cgwalters/rust-crate
Browse files Browse the repository at this point in the history
Add a composefs Rust crate
  • Loading branch information
alexlarsson authored May 28, 2024
2 parents e286a48 + 9729b45 commit 9fd6910
Show file tree
Hide file tree
Showing 7 changed files with 703 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Inspired by https://github.com/rust-analyzer/rust-analyzer/blob/master/.github/workflows/ci.yaml
# but tweaked in several ways. If you make changes here, consider doing so across other
# repositories in e.g. ostreedev etc.
name: Rust

permissions:
actions: read

on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch: {}

env:
CARGO_TERM_COLOR: always

jobs:
tests:
runs-on: ubuntu-latest
container: quay.io/coreos-assembler/fcos-buildroot:testing-devel
steps:
- uses: actions/checkout@v3
# xref containers/containers-image-proxy-rs
- name: Cache Dependencies
uses: Swatinem/rust-cache@v2
with:
key: "tests"
- name: cargo fmt (check)
run: cargo fmt -- --check -l
- name: Build
run: cargo test --no-run
- name: Run tests
run: cargo test -- --nocapture --quiet
cargo-deny:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: EmbarkStudios/cargo-deny-action@v1
with:
log-level: warn
command: check bans sources licenses
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,5 @@ composefs.spec
libtool
ltmain.sh
missing
target/
Cargo.lock
27 changes: 27 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
[package]
name = "composefs"
version = "0.1.0"
edition = "2021"
description = "Rust composefs"
keywords = ["composefs", "oci", "opencontainers", "docker", "podman"]
license = "MIT"
repository = "https://github.com/containers/composefs"
rust-version = "1.70.0"

include = [
"/COPYING",
"/README.md",
"/rust/**",
]

[lib]
name = "composefs"
path = "rust/src/lib.rs"

[dependencies]
anyhow = "1.0"
libc = "0.2"

[dev-dependencies]
tar = "0.4.38"
tempfile = "3.2.0"
10 changes: 10 additions & 0 deletions deny.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[licenses]
unlicensed = "deny"
allow = ["Apache-2.0", "Apache-2.0 WITH LLVM-exception", "MIT", "BSD-3-Clause", "BSD-2-Clause", "Unicode-DFS-2016"]

[bans]

[sources]
unknown-registry = "deny"
unknown-git = "deny"
allow-git = []
Loading

0 comments on commit 9fd6910

Please sign in to comment.