Conversation
Rewrote encoding.c's zigzagEncode and castFloatBytesToInt in Rust Added a basic Makefile integration to the rust sources Ensured the unit tests pass on host
Suggested by Michael Bryan ( https://github.com/Michael-F-Bryan/ )
|
Do you know any of the process of adding this to our automation system? as you can see it breaks some of our checks :( |
|
@Quick-Flash I couldn't find any logs on Codacy Static Code Analysis page. All it says is not analyzed: https://app.codacy.com/gh/emuflight/EmuFlight/commit?cid=659668051&fileBranchId=30902143 Can someone with access to the Static Analysis page login and see why it wasn't running? Locally I made changes to the github builder workflow but that isn't even used in the 1.x branch so didn't push one. |
|
i'll see what i can do, i just enabled Codacy on the Side-note: someone may have to setup new |
|
@nerdCopter Yeah we need a new build.yml . Haven't added that because i am not sure how different our setup will be from betaflight's in 1.x I think adding this should be enough for the build though. - name: Setup Rust
run: |
rustup update stable
rustup target add thumbv7em-none-eabihf
cargo install cbindgen |
We didn't have to do this but i did it just to trigger a new CI build
|
Closing this pull request because Opened #866 to merge the rust changes into the correct branch |

@Quick-Flash Here's a pull request for how to get started with Rust Integration in EmuFlight 1.0.0 . The code size is still slightly higher (~1kb) But overall, the integration was smooth. The idea is we move more and more functions to the rustemu crate (and delete them from the C codebase)
To test this out,
Restart the terminal to make sure your
PATHvariable can use the rustup commandMake sure to install the bare metal arm toolchain for rust installed:
Then you can build emuflight using the regular
MakefileLet me know if there are any issues, so I can fix them before this is merged.