As mentioned in Embedded Commercial Rust Gaps, one of the stoppers that embedded rust have is can bus support missing. There were few attempts to implement can bus in embedded hal repo, but non of them succeeded.
Previous attempts
- Issue#21 with discussion
- Pull request#77 by kjetilkjeka with a lot of discussion
- Pull request#53 by dunmatt
- PinballWizards/mcp2517fd WIP crate for MCP2517FD example for feather M0, but with GPL licence. Don't be gpl, be MIT
It looks like people didn't found an agreement on what to abstract in embedded HAL.
In the Rust embedded chat, realprof suggested to move "iteratively" step by step implementing something first, and then look for another hardware platforms and then, after some understanding, implement something in embedded hal.
Another approach is to add support crate for external can controllers like MCP2515 and enable CAN bus without strong dependency on hardware of MCU.
Also, we should keep in mind, that CAN bus is used in other high-level protocols, like CANOpen, UAVCAN, CANAerospace and others.
Anyway, adding CAN bus support to embedded RUST is not a trivial thing, and I think we should bring attention of more experience RUST contributors to help build roadmap, make high quality support crates and implement full support of CAN.
PS. Maybe this page should be pinned and converted to wiki?