cubic 0.18.0

Cubic is a lightweight command line manager for virtual machines. It has a simple, daemon-less and rootless design. All Cubic virtual machines run isolated in the user context. Cubic is built on top of QEMU, KVM and cloud-init. https://cubic-vm.org https://github.com/cubic-vm/cubic Show all supported images: $ cubic images Create a new virtual machine instance: $ cubic create mymachine --image ubuntu:noble List all virtual machine instances: $ cubic instances Start an instance: $ cubic start <instance name> Stop an instance: $ cubic stop <instance name> Open a shell in the instance: $ cubic ssh <machine name> Copy a file from the host to the instance: $ cubic scp <path/to/host/file> <machine>:<path/to/guest/file> Copy a file from the instance to the hots: $ cubic scp <machine>:<path/to/guest/file> <path/to/host/file>
DOCKER_CMD=docker run --rm -v .:/usr/local/app
IMAGE=cubic:latest

build-image:
	if [ -z "`docker images -q ${IMAGE}`" ]; then docker build -t ${IMAGE} .; fi

clean: build-image
	${DOCKER_CMD} ${IMAGE} cargo clean

cleanall: build-image
	docker image rm -f ${IMAGE}

format: build-image
	${DOCKER_CMD} ${IMAGE} cargo fmt --check

fix-format: build-image
	${DOCKER_CMD} ${IMAGE} cargo fmt

lint: build-image
	${DOCKER_CMD} ${IMAGE} cargo clippy -- -D warnings

fix-lint: build-image
	${DOCKER_CMD} ${IMAGE} cargo clippy --fix --allow-dirty --allow-staged

test: build-image
	${DOCKER_CMD} ${IMAGE} cargo test

audit: build-image
	${DOCKER_CMD} ${IMAGE} cargo audit --ignore RUSTSEC-2023-0071 # no fix available so far

update: build-image
	${DOCKER_CMD} ${IMAGE} cargo update

sh: build-image
	${DOCKER_CMD} -it ${IMAGE} bash

check: format lint test audit

fix: fix-format fix-lint

build: build-image
	${DOCKER_CMD} ${IMAGE} cargo build

doc: build-image
	${DOCKER_CMD} ${IMAGE} sphinx-build docs target/doc && python3 -m http.server -d target/doc 4000

release: build-image
	sed "s/^\(version =\).*$$/\1 \"${version}\"/g" -i Cargo.toml
	sed "s/^\\(version:\\).*$$/\\1 '${version}'/g" -i snapcraft.yaml
	sed "s/^\\(release = \\).*$$/\\1 'v${version}'/g" -i docs/conf.py
	make build