Crates.io | rs_ws281x |
lib.rs | rs_ws281x |
version | 0.5.1 |
source | src |
created_at | 2018-01-21 17:53:05.781799 |
updated_at | 2023-12-03 03:37:04.192597 |
description | Wrapper for ws281x library using bindgen to track upstream |
homepage | |
repository | https://github.com/rpi-ws281x/rpi-ws281x-rust |
max_upload_size | |
id | 47685 |
size | 180,881 |
If you are looking at this crate and thinking "boy, I'd like to add {insert higher abstraction}" then you may be interested in one of the below projects. This project is meant to stick strictly to the driver's feature set (and possibly a subset of that even).
Remember to audit your dependencies, we take no responsibility for any security vulnerabilities resulting from the use of the above mentioned crates
If you have a crate that builds on this one and want it featured here, feel free to open a PR.
This project is still a work-in-progress, and the API is very much subject to change. Most of the major stuff is covered by fairly idiomatic Rust. However, we are always striving to cover more to the level of @Meh who wrote manual bindings to this libray a while back.
Code is licensed under the MIT license, so as long as you are cool with that, feel free to open an issue, talk about proposed changes, then open a PR! I would love a helping hand, just have to make sure things don't get too messy either.
rustup target add arm-unknown-linux-gnueabihf
sudo apt install libclang-dev
rustup target add arm-unknown-linux-gnueabihf
sudo apt install libclang-dev gcc-arm-linux-gnueabihf
Run rustup target add aarch64-unknown-linux-gnu
Install cross-compiler toolchain:
sudo apt install libclang-dev gcc-aarch64-linux-gnu
Build with: cargo build --target=aarch64-unknown-linux-gnu [YOUR OPTIONS]
rustup default stable-i686-pc-windows-gnu
rustup target add arm-unknown-linux-gnueabihf
rustup target add armv7-unknown-linux-gnueabihf
.cargo
.
Inside that directory, create a file and paste the contents:
[build]
target = "arm-unknown-linux-gnueabihf"
[target.arm-unknown-linux-gnueabihf]
linker = "C:/SysGCC/raspberry/bin/arm-linux-gnueabihf-gcc.exe"
An example build script might look like this (using Git for Windows Bash):
#!/usr/bin/env bash
# inform rpi-ws2811-rust where the GCC sysroot is
export RPI_WS281X_SYSROOT=C:/SysGCC/raspberry/arm-linux-gnueabihf/sysroot
# point to the GCC ARM compiler/linker.
export CC_arm_unknown_linux_gnueabihf=C:/SysGCC/raspberry/bin/arm-linux-gnueabihf-gcc.exe
# point to the GCC ARM archiver
export AR_arm_unknown_linux_gnueabihf=C:/SysGCC/raspberry/bin/arm-linux-gnueabihf-ar.exe
# run the build command
cargo build $@