unikraft / kraftkit

Build and use highly customized and ultra-lightweight unikernel VMs.
https://unikraft.org/docs/cli
BSD 3-Clause "New" or "Revised" License
238 stars 63 forks source link

Cache and use cache of library origin code #465

Open nderjung opened 1 year ago

nderjung commented 1 year ago

To help in environments where remote internet access is not possible or to speed up "properclean" rebuilds, cache the origin library tarball/zip on disk. This issue tracks initially pulling and saving the origin code libraries as well as looking them up before invoking a prepare or build step.

To use the cache, ultimately, the make invocation command should be prefixed with LIB${LIBNAME}_URL.

https://github.com/unikraft/kraftkit/blob/staging/unikraft/app/application.go#L316-L319

We have to figure out how we set the appropriate name idiomatically in Go and how to gather the cache path, ultimately this feeds into make.WithVar:

eopts = append(eopts
  make.WithVar(lib.URL(), lib.OriginCachePath()),
)

(Method names lib.URL() and lib.OriginCachePath() are illustrative)

Cache can be saved to a new path to be added in config.KraftKit.Paths.Cache.

GitHub-Depends: https://github.com/unikraft/kraftkit/issues/464

amroKerkizz commented 7 months ago

Hi Im a student at the University of Texas at Austin, and for a project we were assigned I would like to work on this issue. I was wondering if this issue could be assigned to me?