Skip to content
This repository has been archived by the owner on Jun 19, 2024. It is now read-only.

fix: give a more descriptive error when compiling to unsupported targets #95

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly-2024-02-07
toolchain: nightly-2024-02-07-armv7a-vexos-eabi
override: true

- name: Check
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ Before releasing:
### Fixed

- Fix error handling and error type variats in ADI bindings
- Give a better error when compiling for an unsupported target.

### Changed

Expand Down
4 changes: 4 additions & 0 deletions packages/pros/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ pub use pros_sys as __pros_sys;
mod vexos_env;
#[cfg(target_arch = "wasm32")]
mod wasm_env;

#[cfg(not(all(target_os = "vexos", target_arch = "wasm32")))]
compile_error!("You are compiling pros-rs with an unsupported target! Supported targets are armv7a-vexos-eabi and wasm32. If you aren't sure what this means, please compile with `cargo pros`");

#[macro_use]
pub mod competition;
pub mod color;
Expand Down
Loading