Commit f726e1fe authored by RILLING Louis's avatar RILLING Louis
Browse files

fake-vm: Make capi a common crate and introduce the fake_vm_capi crate to...

fake-vm: Make capi a common crate and introduce the fake_vm_capi crate to easily build several flavors
parent bb7fe069
......@@ -45,6 +45,17 @@ version = "1.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693"
[[package]]
name = "capi"
version = "0.1.0"
dependencies = [
"libc",
"log",
"static_assertions",
"stderrlog",
"tansiv-client",
]
[[package]]
name = "cc"
version = "1.0.50"
......@@ -112,11 +123,7 @@ dependencies = [
name = "fake_vm_capi"
version = "0.1.0"
dependencies = [
"libc",
"log",
"static_assertions",
"stderrlog",
"tansiv-client",
"capi",
]
[[package]]
......
[workspace]
members = ["tansiv-client", "fake_vm", "capi"]
default-members = ["fake_vm", "capi"]
members = ["tansiv-client", "capi", "fake_vm", "fake_vm_capi"]
default-members = ["fake_vm", "fake_vm_capi"]
......@@ -13,7 +13,7 @@ else
endif
OUT_DIR := $(TOP_DIR)/target/$(PROFILE)
TEST_DIRS := $(TOP_DIR)/capi/tests
TEST_DIRS := $(TOP_DIR)/fake_vm_capi/tests
DEST_LIB_DIR := $(PREFIX)/lib
DEST_INC_DIR := $(PREFIX)/include
......
[package]
name = "fake_vm_capi"
name = "capi"
version = "0.1.0"
authors = ["Louis Rilling <louis.rilling@irisa.fr>"]
edition = "2018"
[features]
default = []
process = ["tansiv-client/process"]
[dependencies]
tansiv-client = {version = "0.1.0", path = "../tansiv-client", features = ["process"]}
tansiv-client = {version = "0.1.0", path = "../tansiv-client"}
libc = "0.2"
log = "0.4"
static_assertions = "0.3.1"
[dev-dependencies]
tansiv-client = {version = "0.1.0", path = "../tansiv-client", features = ["process", "test-helpers"]}
tansiv-client = {version = "0.1.0", path = "../tansiv-client", features = ["test-helpers"]}
stderrlog = "0.4"
[lib]
name = "fake_vm"
crate-type = ["staticlib"]
[package]
name = "fake_vm_capi"
version = "0.1.0"
authors = ["Louis Rilling <louis.rilling@irisa.fr>"]
edition = "2018"
[dependencies]
capi = {version = "0.1.0", path = "../capi", features = ["process"]}
[lib]
name = "fake_vm"
crate-type = ["staticlib"]
......@@ -17,4 +17,4 @@ test: $(TARGET_BUILD_TESTS) $(TARGET_RUN_TESTS)
for test in $(TARGET_RUN_TESTS); do $$test || { echo "test $$test failed!"; exit 1; }; done
$(TARGET_BUILD_TESTS) $(TARGET_RUN_TESTS): $(OUT_DIR)/%: %.c $(OUT_DIR)/libfake_vm.a
gcc -Wall -o $@ -I../src -L$(OUT_DIR) $< -lfake_vm -lpthread -ldl -lrt
gcc -Wall -o $@ -I../../capi/src -L$(OUT_DIR) $< -lfake_vm -lpthread -ldl -lrt
#[cfg(feature = "process")]
pub use process::*;
#[cfg(feature = "process")]
mod process;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment