Skip to content

Commit

Permalink
feat: Initialization from examples
Browse files Browse the repository at this point in the history
Rust code taken from matrix-rust-sdk's 'getting started' example. See Permalink [0]

Other boilerplate code taken from my other project `cmprss`.

[0] https://github.com/matrix-org/matrix-rust-sdk/tree/b2c96b72b02ac63741678895dbeda2eda4237319/examples/getting_started
  • Loading branch information
arcuru committed Mar 18, 2024
0 parents commit 78e1860
Show file tree
Hide file tree
Showing 12 changed files with 3,977 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/nix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Nix

on:
push:
branches: ["main"]
pull_request:
branches: ["main"]

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@main
- name: Nix Cache
uses: DeterminateSystems/magic-nix-cache-action@main

- name: Check
# Run 1 at a time and print all the log files
run: nix flake check --max-jobs 1 -L

- name: Build
run: nix build
39 changes: 39 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Rust

on:
push:
branches: ["main"]
pull_request:
branches: ["main"]

env:
CARGO_TERM_COLOR: always

jobs:
# Build/Test/Check everything Rust
build:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt

- name: Rust Cache
uses: Swatinem/rust-cache@v2

- name: Build
run: cargo build

- name: Test
run: cargo test

- name: Format
run: cargo fmt -- --check

- name: Clippy
run: cargo clippy -- -D warnings
18 changes: 18 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Cargo
# will have compiled files and executables
/target

# These are backup files generated by rustfmt
**/*.rs.bk

# Nix build files
/result

# direnv files
/.direnv

# task files for tracking already run commands
/.task

# Local cache files for testing
/.cache
Loading

0 comments on commit 78e1860

Please sign in to comment.