mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-25 23:11:57 +00:00
libs: convert to a cargo workspace
Convert libs into a Cargo workspace, so all libraries could share the build infrastructure. Fixes #3282 Signed-off-by: Liu Jiang <gerry@linux.alibaba.com>
This commit is contained in:
parent
575df4dc4d
commit
392f1ecdf5
8
Makefile
8
Makefile
@ -21,10 +21,10 @@ STANDARD_TARGETS = build check clean install test vendor
|
||||
|
||||
default: all
|
||||
|
||||
all: logging-crate-tests build
|
||||
all: libs-crate-tests build
|
||||
|
||||
logging-crate-tests:
|
||||
make -C src/libs/logging
|
||||
libs-crate-tests:
|
||||
make -C src/libs
|
||||
|
||||
include utils.mk
|
||||
include ./tools/packaging/kata-deploy/local-build/Makefile
|
||||
@ -49,7 +49,7 @@ docs-url-alive-check:
|
||||
binary-tarball \
|
||||
default \
|
||||
install-binary-tarball \
|
||||
logging-crate-tests \
|
||||
libs-crate-tests \
|
||||
static-checks \
|
||||
docs-url-alive-check
|
||||
|
||||
|
@ -117,6 +117,8 @@ The table below lists the core parts of the project:
|
||||
|-|-|-|
|
||||
| [runtime](src/runtime) | core | Main component run by a container manager and providing a containerd shimv2 runtime implementation. |
|
||||
| [agent](src/agent) | core | Management process running inside the virtual machine / POD that sets up the container environment. |
|
||||
| [libraries](src/libs) | core | Library crates shared by multiple Kata Container components or published to [`crates.io`](https://crates.io/index.ht
|
||||
ml) |
|
||||
| [documentation](docs) | documentation | Documentation common to all components (such as design and install documentation). |
|
||||
| [libraries](src/libs) | core | Library crates shared by multiple Kata Container components or published to [`crates.io`](https://crates.io/index.html) |
|
||||
| [tests](https://github.com/kata-containers/tests) | tests | Excludes unit tests which live with the main code. |
|
||||
|
@ -107,10 +107,10 @@ endef
|
||||
##TARGET default: build code
|
||||
default: $(TARGET) show-header
|
||||
|
||||
$(TARGET): $(GENERATED_CODE) logging-crate-tests $(TARGET_PATH)
|
||||
$(TARGET): $(GENERATED_CODE) libs-crate-tests $(TARGET_PATH)
|
||||
|
||||
logging-crate-tests:
|
||||
make -C $(CWD)/../libs/logging
|
||||
libs-crate-tests:
|
||||
make -C $(CWD)/../libs
|
||||
|
||||
$(TARGET_PATH): show-summary
|
||||
@RUSTFLAGS="$(EXTRA_RUSTFLAGS) --deny warnings" cargo build --target $(TRIPLE) --$(BUILD_TYPE) $(EXTRA_RUSTFEATURES)
|
||||
@ -203,7 +203,7 @@ codecov-html: check_tarpaulin
|
||||
|
||||
.PHONY: \
|
||||
help \
|
||||
logging-crate-tests \
|
||||
libs-crate-tests \
|
||||
optimize \
|
||||
show-header \
|
||||
show-summary \
|
||||
|
@ -8,11 +8,11 @@ include ../../../utils.mk
|
||||
.DEFAULT_GOAL := default
|
||||
default: build
|
||||
|
||||
build: logging-crate-tests
|
||||
build: libs-crate-tests
|
||||
@RUSTFLAGS="$(EXTRA_RUSTFLAGS) --deny warnings" cargo build --target $(TRIPLE) --$(BUILD_TYPE)
|
||||
|
||||
logging-crate-tests:
|
||||
make -C $(CWD)/../../libs/logging
|
||||
libs-crate-tests:
|
||||
make -C $(CWD)/../../libs
|
||||
|
||||
clean:
|
||||
cargo clean
|
||||
@ -32,6 +32,6 @@ check: standard_rust_check
|
||||
check \
|
||||
clean \
|
||||
install \
|
||||
logging-crate-tests \
|
||||
libs-crate-tests \
|
||||
test \
|
||||
vendor
|
||||
|
@ -8,11 +8,11 @@ include ../../../utils.mk
|
||||
.DEFAULT_GOAL := default
|
||||
default: build
|
||||
|
||||
build: logging-crate-tests
|
||||
build: libs-crate-tests
|
||||
@RUSTFLAGS="$(EXTRA_RUSTFLAGS) --deny warnings" cargo build --target $(TRIPLE) --$(BUILD_TYPE)
|
||||
|
||||
logging-crate-tests:
|
||||
make -C $(CWD)/../../libs/logging
|
||||
libs-crate-tests:
|
||||
make -C $(CWD)/../../libs
|
||||
|
||||
clean:
|
||||
cargo clean
|
||||
@ -32,6 +32,6 @@ check: standard_rust_check
|
||||
check \
|
||||
clean \
|
||||
install \
|
||||
logging-crate-tests \
|
||||
libs-crate-tests \
|
||||
test \
|
||||
vendor
|
||||
|
Loading…
Reference in New Issue
Block a user