-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use C2Rust to convert static inlines
Depends on immunant/c2rust#291. Is exploratory work for rust-lang/rust-bindgen#1344.
- Loading branch information
Showing
5 changed files
with
117 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,3 +15,4 @@ license = "LGPL-2.1" | |
[build-dependencies] | ||
bindgen = "0.53.1" | ||
shlex = "0.1.1" | ||
serde_json = "1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#include <shell.h> | ||
#include <thread.h> | ||
#include <irq.h> | ||
#include <stdio_base.h> | ||
#include <periph/adc.h> | ||
#include <periph/gpio.h> | ||
#include <periph/i2c.h> | ||
// #include <net/gnrc.h> | ||
// #include <net/gnrc/udp.h> | ||
#include <net/gnrc/pktbuf.h> | ||
// #include <net/gnrc/ipv6.h> | ||
#include <net/gnrc/nettype.h> | ||
#include <net/gnrc/netapi.h> | ||
|
||
#include <saul.h> | ||
#include <saul_reg.h> | ||
|
||
#include <board.h> | ||
// #include <xtimer.h> | ||
|
||
// not in riot-all? | ||
#include <mutex.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/// Contains header code converted to Rust by C2Rust | ||
/// | ||
/// Types in here are distinct from those created in the main module (using bindgen); unifying | ||
/// those will be part of [bindgen's #1334], but it's a long way there. | ||
/// | ||
/// [bindgen's #1334]: https://github.com/rust-lang/rust-bindgen/issues/1344 | ||
/// | ||
/// Use these functions through the re-export in the main module, for the C headers may flip-flop | ||
/// between static inline and linked. | ||
use crate::libc; | ||
|
||
include!(concat!(env!("OUT_DIR"), "/riot_c2rust_replaced.rs")); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters