This commit is contained in:
Bojan Serafimov
2022-05-03 13:13:36 -04:00
parent 9eea3da810
commit 4c0534f85e
3 changed files with 28 additions and 0 deletions

4
Cargo.lock generated
View File

@@ -2149,6 +2149,10 @@ dependencies = [
"yasna",
]
[[package]]
name = "redo"
version = "0.1.0"
[[package]]
name = "redox_syscall"
version = "0.2.10"

8
libs/redo/Cargo.toml Normal file
View File

@@ -0,0 +1,8 @@
[package]
name = "redo"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]

16
libs/redo/src/main.rs Normal file
View File

@@ -0,0 +1,16 @@
// This will look for `int redo()` in `libredo.a`
#[link(name = "redo")]
extern "C" {
fn redo() -> i32;
}
// To compile this, run:
// rustc libs/redo/src/main.rs -L /home/bojan/src/neondatabase/neon/tmp_install/lib/
fn main() {
unsafe {
dbg!(redo());
}
}