Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "glommio/liburing"]
path = glommio/liburing
url = git://git.kernel.dk/liburing
8 changes: 5 additions & 3 deletions glommio/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,10 @@ readme = "../README.md"
log = "0.4"
concurrent-queue = "1.1.2"
futures-lite = "1.11.1"
libc = "0.2.73"
libc = "0.2.77"
socket2 = { version = "0.3.18", features = ["unix", "reuseport"] }
iou = { git = "https://github.com/glommer/iou", tag = "glommio-2020-11-30" }
uring-sys = { git = "https://github.com/glommer/uring-sys", tag = "scipio-2020-09-10" }
nix = "0.19.0"
bitflags = "1.2.0"
bitmaps = "2.1.0"
typenum = "1.12"
scoped-tls = "1.0.0"
Expand All @@ -41,6 +40,9 @@ futures = "0.3.5"
fastrand = "1.4.0"
tokio = { version = "0.3.5", default-features = false, features = ["rt", "macros", "rt-multi-thread", "net", "io-util", "time"] }

[build-dependencies]
cc = "1.0.47"

[features]
bench = []

Expand Down
15 changes: 15 additions & 0 deletions glommio/README.uring_sys_iou.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
This crate includes imported code for
[uring-sys](https://github.com/ringbahn/uring-sys) and
[iou](https://github.com/ringbahn/iou)
from the ringbahn project.

It is my intention that those imports are temporary and I don't
mean this as a hard fork. On the other hand those crates haven't been
as actively maintained as we would like. They are very central for
what we do, as uring evolves very rapidly, so I have decided to
soft fork them.

Every patch that touches code in those directories should make at
least a good faith effort to merge the code back into iou and uring-sys.
Hopefully with time they will, at their own pace, have all the code
that we need in which case we can revert back to using them externally.
55 changes: 55 additions & 0 deletions glommio/build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
use std::env;
use std::fs;
use std::path::*;
use std::process::Command;

use cc::Build;

fn main() {
let project = PathBuf::from(env::var("CARGO_MANIFEST_DIR").unwrap())
.canonicalize()
.unwrap();
let liburing = project.join("liburing");

Command::new("git")
.arg("submodule")
.arg("update")
.arg("--init")
.status()
.unwrap();
// Run the configure script in OUT_DIR to get `compat.h`
let configured_include = configure(&liburing);

let src = liburing.join("src");

// liburing
Build::new()
.file(src.join("setup.c"))
.file(src.join("queue.c"))
.file(src.join("syscall.c"))
.file(src.join("register.c"))
.include(src.join("include"))
.include(&configured_include)
.extra_warnings(false)
.compile("uring");

// (our additional, linkable C bindings)
Build::new()
.file(project.join("rusturing.c"))
.include(src.join("include"))
.include(&configured_include)
.compile("rusturing");
}

fn configure(liburing: &Path) -> PathBuf {
let out_dir = PathBuf::from(env::var("OUT_DIR").unwrap())
.canonicalize()
.unwrap();
fs::copy(liburing.join("configure"), out_dir.join("configure")).unwrap();
fs::create_dir_all(out_dir.join("src/include/liburing")).unwrap();
Command::new("./configure")
.current_dir(&out_dir)
.output()
.expect("configure script failed");
out_dir.join("src/include")
}
1 change: 1 addition & 0 deletions glommio/liburing
Submodule liburing added at b013df
Loading