Skip to content

Commit 56f8120

Browse files
committed
initial commit
0 parents  commit 56f8120

23 files changed

+2077
-0
lines changed

.cargo/config.toml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
[target.riscv32imc-unknown-none-elf]
2+
runner = "espflash flash --monitor"
3+
4+
[env]
5+
ESP_LOG="INFO"
6+
7+
[build]
8+
rustflags = [
9+
# Required to obtain backtraces (e.g. when using the "esp-backtrace" crate.)
10+
# NOTE: May negatively impact performance of produced code
11+
"-C", "force-frame-pointers",
12+
]
13+
14+
target = "riscv32imc-unknown-none-elf"
15+
16+
[unstable]
17+
build-std = ["alloc", "core"]

.github/workflows/rust_ci.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Continuous Integration
2+
3+
on:
4+
push:
5+
paths-ignore:
6+
- "**/README.md"
7+
pull_request:
8+
workflow_dispatch:
9+
10+
env:
11+
CARGO_TERM_COLOR: always
12+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
13+
14+
jobs:
15+
rust-checks:
16+
name: Rust Checks
17+
runs-on: ubuntu-latest
18+
strategy:
19+
fail-fast: false
20+
matrix:
21+
action:
22+
- command: build
23+
args: --release
24+
- command: fmt
25+
args: --all -- --check --color always
26+
- command: clippy
27+
args: --all-features --workspace -- -D warnings
28+
steps:
29+
- name: Checkout repository
30+
uses: actions/checkout@v4
31+
- name: Setup Rust
32+
uses: dtolnay/rust-toolchain@v1
33+
with:
34+
target: riscv32imc-unknown-none-elf
35+
toolchain: stable
36+
components: rust-src, rustfmt, clippy
37+
- name: Enable caching
38+
uses: Swatinem/rust-cache@v2
39+
- name: Run command
40+
run: cargo ${{ matrix.action.command }} ${{ matrix.action.args }}

.gitignore

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Generated by Cargo
2+
# will have compiled files and executables
3+
debug/
4+
target/
5+
6+
# These are backup files generated by rustfmt
7+
**/*.rs.bk
8+
9+
# MSVC Windows builds of rustc generate these, which store debugging information
10+
*.pdb
11+
12+
# RustRover
13+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
14+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
15+
# and can be added to the global gitignore or merged into this file. For a more nuclear
16+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
17+
#.idea/

.helix/languages.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[[language]]
2+
name = "rust"
3+
4+
[language-server.rust-analyzer.config]
5+
check.allTargets = false
6+
cargo.target = "riscv32imc-unknown-none-elf"

.vscode/settings.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"rust-analyzer.cargo.allTargets": false,
3+
"rust-analyzer.cargo.target": "riscv32imc-unknown-none-elf",
4+
"editor.formatOnSave": true,
5+
}

0 commit comments

Comments
 (0)