-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 9651339
Showing
20 changed files
with
832 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[build] | ||
target = "./armv7a-vex-v5.json" | ||
|
||
[unstable] | ||
build-std = ["core", "compiler_builtins", "alloc"] | ||
build-std-features = ["compiler-builtins-mem"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
--- | ||
name: Bug report | ||
about: Something is not working as expected | ||
title: '' | ||
labels: type:bug, repro:required | ||
assignees: '' | ||
|
||
--- | ||
|
||
## Bug Description | ||
<!-- Include a clear description of the issue and the steps to reproduce it --> | ||
|
||
## Code to reproduce | ||
<!-- A minimum reproducible sample of the issue --> | ||
|
||
## Expected vs. actual behavior | ||
<!-- A clear description of how the library should be behaving versus how it is behaving --> | ||
|
||
## Additional information | ||
<!-- | ||
Add any other context about the problem here. | ||
Move all applicable items out of the comment: | ||
- Operating system (Linux/macOS/Windows): | ||
- Crate version (see `Cargo.toml`): | ||
- Rust version (see `rustc --version`): | ||
- Priority this issue should have (low/med/high): | ||
- I have tested this issue on the latest development release. | ||
- I would be willing to implement a fix for this issue. | ||
--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
--- | ||
name: Feature request | ||
about: Propose an idea or new feature | ||
title: '' | ||
labels: enhancement | ||
assignees: '' | ||
|
||
--- | ||
|
||
## What's the motivation for this feature? | ||
<!-- | ||
For example: | ||
- I'm frustrated when [...] happens | ||
- VEX/libunwind has recently released [...] | ||
- A useful feature to add would be [...] | ||
--> | ||
|
||
## Describe the solution you'd like | ||
<!-- A clear and specific description of what you want to happen. --> | ||
|
||
## Describe the drawbacks, if any | ||
<!-- | ||
A clear and specific description of any problems your solution could cause, if any. | ||
Consider: | ||
- How maintainable is it? | ||
- Is it future-proof? | ||
- Will it make the library harder to use? | ||
--> | ||
|
||
## Describe the alternative solutions, if any | ||
<!-- A clear and specific description of any alternative solutions or features that would solve the same problem. --> | ||
|
||
## Additional context | ||
<!-- | ||
Any other context, including screenshots, that could help describe your feature request. | ||
Would you be willing to work on implementing this feature? | ||
--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
--- | ||
name: Small issue | ||
about: Report a small problem (e.g. typo) | ||
title: '' | ||
labels: type:bug, repro:needed | ||
assignees: '' | ||
|
||
--- | ||
|
||
## Problem Description | ||
<!-- Include a clear description of the issue as well as how to reproduce it. --> | ||
|
||
## Screenshots | ||
<!-- If applicable, add screenshots to help show the problem. --> | ||
|
||
## Additional information | ||
<!-- | ||
Add any other context about the problem here. | ||
Move all applicable items out of the comment: | ||
- Operating system (Linux/macOS/Windows): | ||
- Crate version (see `Cargo.toml`): | ||
- Rust version (see `rustc --version`): | ||
- I have tested this issue on the latest development release. | ||
- I would be willing to implement a fix for this issue. | ||
--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
## Describe the changes this PR makes. Why should it be merged? | ||
|
||
## Additional Context | ||
<!-- | ||
Move all applicable items out of the comment: | ||
- I have tested these changes on a VEX V5 brain. | ||
- I have tested these changes in a simulator. | ||
- These are breaking changes (semver: major). | ||
- These are *only* non-code changes (e.g. documentation, README.md). | ||
- These changes update the crate's interface (e.g. functions/modules added or changed). | ||
--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
name: Rust | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
# Check and lint are separated because linting doesn't seem to fail | ||
# if there are errors are outside of the PR's changes. | ||
check: | ||
name: Check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Setup | Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup | Toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: nightly-2024-02-07 | ||
override: true | ||
|
||
- name: Check | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: check | ||
args: --lib --bins --examples --all-features | ||
lint: | ||
name: Lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: dtolnay/rust-toolchain@nightly | ||
with: | ||
components: clippy | ||
- uses: giraffate/clippy-action@v1 | ||
with: | ||
reporter: "github-pr-check" | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
clippy_flags: --lib --bins --examples --all-features | ||
fmt: | ||
name: Rustfmt | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Setup | Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup | Toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: nightly-2024-02-07 | ||
override: true | ||
|
||
- name: Setup | Install Rustfmt | ||
run: rustup component add rustfmt | ||
|
||
- name: Format | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: fmt | ||
args: --all -- --check |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
# Generated by Cargo | ||
# will have compiled files and executables | ||
debug/ | ||
target/ | ||
|
||
# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries | ||
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html | ||
Cargo.lock | ||
|
||
# These are backup files generated by rustfmt | ||
**/*.rs.bk | ||
|
||
# MSVC Windows builds of rustc generate these, which store debugging information | ||
*.pdb | ||
|
||
# RustRover | ||
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can | ||
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore | ||
# and can be added to the global gitignore or merged into this file. For a more nuclear | ||
# option (not recommended) you can uncomment the following to ignore the entire idea folder. | ||
#.idea/ | ||
|
||
# General | ||
.DS_Store | ||
.AppleDouble | ||
.LSOverride | ||
|
||
# Icon must end with two \r | ||
Icon | ||
|
||
|
||
# Thumbnails | ||
._* | ||
|
||
# Files that might appear in the root of a volume | ||
.DocumentRevisions-V100 | ||
.fseventsd | ||
.Spotlight-V100 | ||
.TemporaryItems | ||
.Trashes | ||
.VolumeIcon.icns | ||
.com.apple.timemachine.donotpresent | ||
|
||
# Directories potentially created on remote AFP share | ||
.AppleDB | ||
.AppleDesktop | ||
Network Trash Folder | ||
Temporary Items | ||
.apdisk | ||
|
||
*~ | ||
|
||
# temporary files which can be created if a process still has a handle open of a deleted file | ||
.fuse_hidden* | ||
|
||
# KDE directory preferences | ||
.directory | ||
|
||
# Linux trash folder which might appear on any partition or disk | ||
.Trash-* | ||
|
||
# .nfs files are created when an open file is removed but is still being accessed | ||
.nfs* | ||
|
||
# Windows thumbnail cache files | ||
Thumbs.db | ||
Thumbs.db:encryptable | ||
ehthumbs.db | ||
ehthumbs_vista.db | ||
|
||
# Dump file | ||
*.stackdump | ||
|
||
# Folder config file | ||
[Dd]esktop.ini | ||
|
||
# Recycle Bin used on file shares | ||
$RECYCLE.BIN/ | ||
|
||
# Windows Installer files | ||
*.cab | ||
*.msi | ||
*.msix | ||
*.msm | ||
*.msp | ||
|
||
# Windows shortcuts | ||
*.lnk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"cSpell.words": [], | ||
"rust-analyzer.cargo.allTargets": false, | ||
"rust-analyzer.check.targets": [ | ||
"${workspaceFolder}/armv7a-vex-v5.json" | ||
], | ||
"rust-analyzer.cargo.extraArgs": [ | ||
"--examples", | ||
"--lib", | ||
"--bins" | ||
], | ||
"rust-analyzer.cargo.features": "all", | ||
"rust-analyzer.check.command": "clippy", | ||
"rust-analyzer.showUnlinkedFileNotification": false, | ||
"files.trimTrailingWhitespace": true, | ||
"files.trimFinalNewlines": true, | ||
"files.insertFinalNewline": true, | ||
"files.eol": "\n", | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[workspace] | ||
members = ["packages/*"] | ||
resolver = "2" | ||
|
||
[workspace.lints.rust] | ||
rust_2018_idioms = { level = "warn", priority = -1 } | ||
missing_docs = "warn" | ||
unsafe_op_in_unsafe_fn = "deny" | ||
|
||
[workspace.lints.clippy] | ||
missing_const_for_fn = "warn" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2023 vexide Contributors | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# vex-libunwind | ||
|
||
> High-level Rust bindings for libunwind on VEX V5 robots |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"cpu": "cortex-a9", | ||
"arch": "arm", | ||
"data-layout": "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64", | ||
"disable-redzone": true, | ||
"emit-debug-gdb-scripts": false, | ||
"env": "newlib", | ||
"executables": true, | ||
"features": "+thumb2,+neon,+vfp3", | ||
"linker": "rust-lld", | ||
"linker-flavor": "ld.lld", | ||
"llvm-target": "armv7a-none-eabi", | ||
"max-atomic-width": 64, | ||
"panic-strategy": "abort", | ||
"post-link-args": { | ||
"ld.lld": ["--gc-sections", "--nostdlib", "-Tv5.ld", "-znorelro"] | ||
}, | ||
"relocation-model": "static", | ||
"target-pointer-width": "32", | ||
"os": "none", | ||
"vendor": "vex", | ||
"default-uwtable": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ | ||
inputs = { | ||
flake-utils.url = "github:numtide/flake-utils"; | ||
cargo-v5.url = "github:vexide/cargo-v5"; | ||
rust-overlay.url = "github:oxalica/rust-overlay"; | ||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; | ||
|
||
rust-overlay.inputs.nixpkgs.follows = "nixpkgs"; | ||
rust-overlay.inputs.flake-utils.follows = "flake-utils"; | ||
|
||
cargo-v5.inputs.nixpkgs.follows = "nixpkgs"; | ||
cargo-v5.inputs.flake-utils.follows = "flake-utils"; | ||
}; | ||
|
||
outputs = { nixpkgs, flake-utils, cargo-v5, rust-overlay, ... }: | ||
(flake-utils.lib.eachDefaultSystem (system: | ||
let | ||
overlays = [ (import rust-overlay) ]; | ||
pkgs = import nixpkgs { inherit system overlays; }; | ||
cargo-v5' = cargo-v5.packages.${system}.default; | ||
in { | ||
devShell = pkgs.mkShell { | ||
buildInputs = with pkgs; [ | ||
(rust-bin.nightly."2024-02-07".default.override { | ||
extensions = [ "rust-src" "rust-analyzer" "clippy" ]; | ||
}) | ||
cargo-v5' | ||
]; | ||
}; | ||
})); | ||
} |
Oops, something went wrong.