Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

driftregion/bazel-c-rust-x86_linux-armv7_baremetal

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bazel-c-rust-x86_linux-armv7_baremetal

Everyone knows you can mix C and rust. Bazel shines at swapping compilation targets.

diagram

target main lib command
x86_64-unknown-linux-gnu c c bazel run //:linux_c_c
x86_64-unknown-linux-gnu c rust bazel run //:linux_c_rs
x86_64-unknown-linux-gnu rust c bazel run //:linux_rs_c
ARM Cortex M3 on QEMU (lm3s6965evb) c c bazel run --config=qemu //:arm_c_c
ARM Cortex M3 on QEMU (lm3s6965evb) c rust bazel run --config=qemu //:arm_c_rs

x86_64-unknown-linux-gnu | c | c

Hello from C compiled for x86_64 linux!
C library calculated squared(4) = 16

x86_64-unknown-linux-gnu | c | rust

Hello from C compiled for x86_64 linux!
rust library calculated squared(4) = 16

x86_64-unknown-linux-gnu | rust | c

Hello from rust compiled for linux on x86_64!
A C library calculated squared(4) = 16

ARM Cortex M3 on QEMU (lm3s6965evb) | c | c

Hello from C compiled for baremetal ARM Cortex M3 on QEMU!
C library calculated squared(4) = 16

ARM Cortex M3 on QEMU (lm3s6965evb) | c | rust

Hello from C compiled for baremetal ARM Cortex M3 on QEMU!
rust library calculated squared(4) = 16

Acknowledgements

If this is useful to you, please hit ⭐

TODO:

  • bindgen
  • cargo dependencies
  • clippy and IDE integration

About

demonstrate a rust library that can be tested on a linux PC and deployed on a mostly-C baremetal device

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
Morty Proxy This is a proxified and sanitized view of the page, visit original site.