# Release Post - v0.13.0 (Atlas) :::info To generate the feature list: ```bash gh pr list --label "ci/merged" -s closed --search "milestone:\"v0.13.0 (Atlas)\"" -L 100 --json author,title,number --template '{{range .}}{{ printf "* %s (#%v) by @%s\n" .title .number .author.login }}{{end}}' ``` To generate the list of reviewers: ```bash git --no-pager log --format="* %(trailers:key=Reviewed-by,valueonly,separator=%x2C )" --abbrev-commit HEAD...RELEASE-0.12.0 | uniq ``` ::: :::danger before submitting, please search the document for "TODO", "commit" ::: [toc] ## GitHub Release Note We are proud to announce the latest version of Unikraft, v0.13.0 (Atlas)! Along with many fixes, this release comes with a bunch of new features that are worth your attention! **This release includes a breaking change which affects output unikernel binary name. See [native Firecracker support](#TODO) for details.** Here is the full updates list: ### 🚀 New Features * Update parser in `lib/uklibparam` ([#882](https://github.com/unikraft/unikraft/pull/882)) by [Simon Kuenzer](https://github.com/skuenzer) * Support escaping of quotes in `lib/ukargparse` ([#893](https://github.com/unikraft/unikraft/pull/882)) by [Simon Kuenzer](https://github.com/skuenzer) * Add support for environment variables in `lib/posix-environ` ([#868](https://github.com/unikraft/unikraft/pull/868)) by [Simon Kuenzer](https://github.com/skuenzer) * Support for environment variables with `lib/posix-environ` in Musl ([lib-musl#43](https://github.com/unikraft/lib-musl/pull/43)) by [Simon Kuenzer](https://github.com/skuenzer) * Add `README.md` file for 9pfs in `lib/9pfs` ([#837](https://github.com/unikraft/unikraft/pull/837)) by [Delia Pavel](https://github.com/DeliaPavel) * Extend prsyscall in `lib/syscall_shim` (print structs, ...) ([#836](https://github.com/unikraft/unikraft/pull/836)) by [Marc Rittinghaus](https://github.com/marcrittinghaus) * Dynamically allocate `struct mount` paths ([#826](https://github.com/unikraft/unikraft/pull/826)) by [Dinh Ngoc Tu](https://github.com/dinhngtu) * Port the testsuite to the new scheduling APIs in `lib/posix-futex/test` ([#809](https://github.com/unikraft/unikraft/pull/809)) by [Nour-eddine Taleb](https://github.com/noureddine-taleb) * Add per-lcpu variable definition ([#784](https://github.com/unikraft/unikraft/pull/784)) by [Andra Paraschiv](https://github.com/andraprs) * Add `README.md` file in `lib/vfscore` ([#780](https://github.com/unikraft/unikraft/pull/780)) by [Radu Nichita](https://github.com/RaduNichita) * Add `README.md` file in `lib/nolibc` ([#778](https://github.com/unikraft/unikraft/pull/778)) by [Alexandru Calciu](https://github.com/calex257) * Implement a more robust compiler detection in `build` ([#774](https://github.com/unikraft/unikraft/pull/774)) by [Marco Schlumpp](https://github.com/mschlumpp) * Add Codacy code quality status badge to `README.md` in `doc` ([#764](https://github.com/unikraft/unikraft/pull/764)) by [Aryan Verma](https://github.com/aryanvarma7272) * Firecracker boot protocol support in `plat/kvm` ([#760](https://github.com/unikraft/unikraft/pull/760)) by [Marco Schlumpp](https://github.com/mschlumpp) * Implement subset of FUTEX_WAIT_BITSET in `lib/posix-futex` ([#758](https://github.com/unikraft/unikraft/pull/758)) by [Marco Schlumpp](https://github.com/mschlumpp) * Add an empty implementation of ioctl to eventfd in `lib/posix-event` ([#756](https://github.com/unikraft/unikraft/pull/756)) by [Marco Schlumpp](https://github.com/mschlumpp) * Add `syscall` alias to `uk_syscall` in `lib/syscall_shim` ([#755](https://github.com/unikraft/unikraft/pull/755)) by [Marco Schlumpp](https://github.com/mschlumpp) * Implement the EFD_NONBLOCK flag for eventfd in `lib/posix-event` ([#754](https://github.com/unikraft/unikraft/pull/754)) by [Marco Schlumpp](https://github.com/mschlumpp) * Merge `.gcc_except_table`s in `plat/common` ([#753](https://github.com/unikraft/unikraft/pull/753)) by [Marco Schlumpp](https://github.com/mschlumpp) * Compile all source files for ISR context in `lib/ukvmem` ([#751](https://github.com/unikraft/unikraft/pull/751)) by [Marco Schlumpp](https://github.com/mschlumpp) * Use -ffreestanding compiler flag in `lib/nolibc` ([#740](https://github.com/unikraft/unikraft/pull/740)) by [Răzvan Deaconescu](https://github.com/razvand) * Use 48-bit virtual addressing for PARange >= 52 in `plat/kvm/arm` ([#729](https://github.com/unikraft/unikraft/pull/729)) by [Eduard Vintilă](https://github.com/eduardvintila) * Improve unwind information for x86 architecture in `plat/x86` ([#700](https://github.com/unikraft/unikraft/pull/700)) by [Marco Schlumpp](https://github.com/mschlumpp) * Improve nolibc compatibility in `lib/nolibc` ([#627](https://github.com/unikraft/unikraft/pull/627)) by [Marco Schlumpp](https://github.com/mschlumpp) * Add synchronization mechanisms ([#476](https://github.com/unikraft/unikraft/pull/476)) by [Sairaj Kodilkar](https://github.com/Sairajkodilkar) * Update description of Musl support in `README` ([lib-musl#49](https://github.com/unikraft/lib-musl/pull/49)) by [Răzvan Deaconescu](https://github.com/razvand) * Update newlib to the latest Unikraft version ([#28](https://github.com/unikraft/lib-newlib/pull/28)) by [Eduard Vintilă](https://github.com/eduardvintila) * Update pthread-embedded to the latest Unikraft version ([#11](https://github.com/unikraft/lib-pthread-embedded/pull/11)) by [Eduard Vintilă](https://github.com/eduardvintila) * Add linux definitions patch ([#34](https://github.com/unikraft/lib-lwip/pull/34)) by [Teodor Țeugea](https://github.com/John-Ted) * Add `SOCK_NONBLOCK` to `accept4()` and `socket()` ([#33](https://github.com/unikraft/lib-lwip/pull/33)) by [Marc Rittinghaus](https://github.com/marcrittinghaus) * Improve `README.md` for `app-elfloader` ([app-elfloader#7](https://github.com/unikraft/app-elfloader/pull/7)) by [Simon Kuenzer](https://github.com/skuenzer) * VFS and native dynamic loader support ([app-elfloader#17](https://github.com/unikraft/app-elfloader/pull/17)) by [Simon Kuenzer](https://github.com/skuenzer) ### 🐛 Bug Fixes & Improvements * Add semicolon to `DPRINTF` macro in `lib/vfscore` ([#890](https://github.com/unikraft/unikraft/pull/890)) by [Răzvan Deaconescu](https://github.com/razvand) * Initialize lists for `stdio_vnode` in `lib/vfscore` ([#889](https://github.com/unikraft/unikraft/pull/889)) by [Răzvan Deaconescu](https://github.com/razvand) * Avoid recursive locking in sys_rename in `lib/vfscore` ([#888](https://github.com/unikraft/unikraft/pull/888)) by [Marc Rittinghaus](https://github.com/marcrittinghaus) * Add missing errno include in `lib/ukswrand` ([#887](https://github.com/unikraft/unikraft/pull/887)) by [Marc Rittinghaus](https://github.com/marcrittinghaus) * Fix I/O error on fsync with 9P2000.u in `lib/uk9p, lib/9pfs` ([#886](https://github.com/unikraft/unikraft/pull/886)) by [Marc Rittinghaus](https://github.com/marcrittinghaus) * Start TID numbering from 1 in `lib/posix-process` ([#885](https://github.com/unikraft/unikraft/pull/885)) by [Florin Postolache](https://github.com/maniatro111) * Fix file path resolution for 9pfs setup in `lib/vfscore` ([#883](https://github.com/unikraft/unikraft/pull/883)) by [Andra Paraschiv](https://github.com/andraprs) * Disable compiler control flow protection in `build` ([#881](https://github.com/unikraft/unikraft/pull/881)) by [Andrei Tătar](https://github.com/andreittr) * Modify pointer comparison in `lib/{nolibc,isrlib}` ([#880](https://github.com/unikraft/unikraft/pull/880)) by [Maria Sfîrăială](https://github.com/mariasfiraiala) * Add additional recognised Git trailers to checkpatch in `support/scripts` ([#879](https://github.com/unikraft/unikraft/pull/879)) by [Alexander Jung](https://github.com/nderjung) * Fix memory region setup and issue #766 in `plat/linuxu` ([#878](https://github.com/unikraft/unikraft/pull/878)) by [Sergiu Moga](https://github.com/mogasergiu) * Fix register names for clang in `plat/kvm/x86` ([#877](https://github.com/unikraft/unikraft/pull/877)) by [Ștefan Jumărea](https://github.com/StefanJum) * `fs0` for automounting 9pfs in `lib/vfscore` ([#875](https://github.com/unikraft/unikraft/pull/875)) by [Simon Kuenzer](https://github.com/skuenzer) * Handle `FIONBIO` command in `pipe_ioctl()` in `lib/vfscore` ([#874](https://github.com/unikraft/unikraft/pull/874)) by [Eduard Vintilă](https://github.com/eduardvintila) * Fix Python ascii codec can't decode byte in `support/scripts` ([#873](https://github.com/unikraft/unikraft/pull/873)) by [Florin Postolache](https://github.com/maniatro111) * Change vnops to take constant strings in `lib/vfscore` ([#866](https://github.com/unikraft/unikraft/pull/866)) by [Marc Rittinghaus](https://github.com/marcrittinghaus) * Fix `dup`, `utimensat`, and `futimens` in `lib/vfscore` ([#865](https://github.com/unikraft/unikraft/pull/865)) by [Marc Rittinghaus](https://github.com/marcrittinghaus) * Add `ukarch_fetch_sub` in `uk/arch` ([#864](https://github.com/unikraft/unikraft/pull/864)) by [Răzvan Vîrtan](https://github.com/razvanvirtan) * Fix `ioctl()` on device files (+ cleanup) in `/lib/devfs`, `/lib/ukswran` ([#855](https://github.com/unikraft/unikraft/pull/855)) by [Marc Rittinghaus](https://github.com/marcrittinghaus) * Fix file flags for `O_NONBLOCK` and `O_ASYNC` ([#850](https://github.com/unikraft/unikraft/pull/850)) by [Marc Rittinghaus](https://github.com/marcrittinghaus) * Remove `clone3` syscall in `lib/posix-process` ([#847](https://github.com/unikraft/unikraft/pull/847)) by [Teodor Țeugea](https://github.com/John-Ted) * Apply `LIBxxx_COMPFLAGS{,-y}` to C++ too in `build` ([#845](https://github.com/unikraft/unikraft/pull/845)) by [Dinh Ngoc Tu](https://github.com/dinhngtu) * Fix cast to invalid type in `9p.c` ([#844](https://github.com/unikraft/unikraft/pull/844)) by [Hugo Lefeuvre](https://github.com/hlef) * Fix potential `free(NULL)` in `lib/vfscore` ([#843](https://github.com/unikraft/unikraft/pull/843)) by [Hugo Lefeuvre](https://github.com/hlef) * Use page alignment macros everywhere ([#842](https://github.com/unikraft/unikraft/pull/842)) by [Hugo Lefeuvre](https://github.com/hlef) * Remove unreachable NULL checks in `ukalloc` ([#840](https://github.com/unikraft/unikraft/pull/840)) by [Hugo Lefeuvre](https://github.com/hlef) * Fix unchecked `uk_palloc` value in `xen/x86/mm.c` ([#839](https://github.com/unikraft/unikraft/pull/839)) by [Hugo Lefeuvre](https://github.com/hlef) * Various fixes for application compatibility ([#834](https://github.com/unikraft/unikraft/pull/834)) by [Marc Rittinghaus](https://github.com/marcrittinghaus) * Fix compilation and loading of linuxu images in `plat/linuxu` ([#833](https://github.com/unikraft/unikraft/pull/833)) by [Marco Schlumpp](https://github.com/mschlumpp) * Allow non-writable shared file mappings in `lib/ukvmem` ([#832](https://github.com/unikraft/unikraft/pull/832)) by [Cosmin Vancea](https://github.com/csvancea) * Fix symlink support for 9pfs in `9pfs, vfscore` ([#830](https://github.com/unikraft/unikraft/pull/830)) by [Andra Paraschiv](https://github.com/andraprs) * Fix wrong type for the `st_nlink` field inside `struct stat` in `lib/nolibc` ([#829](https://github.com/unikraft/unikraft/pull/829)) by [Cosmin Vancea](https://github.com/csvancea) * Fix build warnings in `lib/posix-process` ([#820](https://github.com/unikraft/unikraft/pull/820)) by [Konstantinos Koukopoulos](https://github.com/kouk) * Force update `UK_CONFIG` in `build/Makefile` ([#817](https://github.com/unikraft/unikraft/pull/817)) by [Tianyi Liu](https://github.com/i-Pear) * Fix for Issue #730 in `lib/uksglist` ([#813](https://github.com/unikraft/unikraft/pull/813)) by [Vineeth Krishna M](https://github.com/vineethkm) * Handle a full tracing buffer correctly in `lib/ukdebug` ([#810](https://github.com/unikraft/unikraft/pull/810)) by [Marco Schlumpp](https://github.com/mschlumpp) * Fix issues in FDT functions in `plat/drivers/ofw` ([#805](https://github.com/unikraft/unikraft/pull/805)) by [Eduard Vintilă](https://github.com/eduardvintila) * Detect if `gawk` can be used instead of `awk` in `build` ([#803](https://github.com/unikraft/unikraft/pull/803)) by [Simon Kuenzer](https://github.com/skuenzer) * Add a simple test for mmap and munmap in `lib/ukmmap` ([#802](https://github.com/unikraft/unikraft/pull/802)) by [Kha Dinh](https://github.com/kha-dinh) * Remove warnings related to timespec in `lib/nolibc` ([#800](https://github.com/unikraft/unikraft/pull/800)) by [Takeru Wada](https://github.com/wattake) * Fix `posix-mmap` errno issue ([#799](https://github.com/unikraft/unikraft/pull/799)) by [Teodor Țeugea](https://github.com/John-Ted) * Update `uio_offset` and `uio_resid` on successful reads in `lib/posix-event` ([#798](https://github.com/unikraft/unikraft/pull/798)) by [Eduard Vintilă](https://github.com/eduardvintila) * Add comments to `9pfs.h` file ([#794](https://github.com/unikraft/unikraft/pull/794)) by [Delia Pavel](https://github.com/DeliaPavel) * Change the `SECINFO_EXP` regex to be more permissive in `support/scripts` ([#792](https://github.com/unikraft/unikraft/pull/792)) by [Florin Postolache](https://github.com/maniatro111) * Fix double fault and failing mmap ([#790](https://github.com/unikraft/unikraft/pull/790)) by [Marc Rittinghaus](https://github.com/marcrittinghaus) * Add `write-combined` page entry attribute in `plat/x86` ([#788](https://github.com/unikraft/unikraft/pull/788)) by [Marco Schlumpp](https://github.com/mschlumpp) * Ensure the `.eh_frame` section stays in `plat/common` ([#776](https://github.com/unikraft/unikraft/pull/776)) by [Marco Schlumpp](https://github.com/mschlumpp) * Fix type of `revents` pointer in `lib/posix-event` ([#775](https://github.com/unikraft/unikraft/pull/775)) by [Marco Schlumpp](https://github.com/mschlumpp) * Change unhandled IRQ message to a tracepoint in `plat/kvm` ([#768](https://github.com/unikraft/unikraft/pull/768)) by [Marco Schlumpp](https://github.com/mschlumpp) * Fix interrupt flag check in `drivers/virtio` ([#761](https://github.com/unikraft/unikraft/pull/761)) by [Marco Schlumpp](https://github.com/mschlumpp) * Ensure the `ifpages` metadata does not break any alignments in `lib/ukalloc` ([#757](https://github.com/unikraft/unikraft/pull/757)) by [Marco Schlumpp](https://github.com/mschlumpp) * Disable default LIBMUSL_COMPLEX in `Config.uk` ([lib-musl#47](https://github.com/unikraft/lib-musl/pull/47)) by [Răzvan Deaconescu](https://github.com/razvand) * Fix ioctl signature in function definition in `patches` ([lib-musl#44](https://github.com/unikraft/lib-musl/pull/44)) by [Ștefan Jumărea](https://github.com/StefanJum) * Fix `ioctl` signature ([lib-musl#42](https://github.com/unikraft/lib-musl/pull/42)) by [Marc Rittinghaus](https://github.com/marcrittinghaus) * Various fixes ([lib-musl#41](https://github.com/unikraft/lib-musl/pull/41)) by [Marco Schlumpp](https://github.com/mschlumpp) * Add option to disable character maps in `locale` ([lib-musl#40](https://github.com/unikraft/lib-musl/pull/40)) by [Dinh Ngoc Tu](https://github.com/dinhngtu) * Apply `-ffreestanding` for the Musl source code ([lib-musl#35](https://github.com/unikraft/lib-musl/pull/35)) by [Marco Schlumpp](https://github.com/mschlumpp) * Use `-ffreestanding` as internal build option in `Makefile.uk` ([lib-newlib#33](https://github.com/unikraft/lib-newlib/pull/33)) by [Răzvan Deaconescu](https://github.com/razvand) * Add `*_OK` flags in fcntl.h header in `include` ([#32](https://github.com/unikraft/lib-newlib/pull/32)) by [Ștefan Jumărea](https://github.com/StefanJum) * Return address from previous `brk()` context on follow-up request ([#15](https://github.com/unikraft/app-elfloader/pull/15)) by [Andra Paraschiv](https://github.com/andraprs) * Fix `argv` parsing ([app-elfloader#13](https://github.com/unikraft/app-elfloader/pull/13)) by [Cosmin Vancea](https://github.com/csvancea) * Align the stack pointer at a 16-byte boundary at function calls ([#9](https://github.com/unikraft/app-elfloader/pull/9)) by [Cosmin Vancea](https://github.com/csvancea) A big thank you also to all those who helped in the [review process](unikraft.org/docs/contributing/review-process/): [Adina Smeu](https://github.com/adinasm), [Alexander Jung](https://github.com/nderjung), [Alexandru Calciu](https://github.com/calex257), [Alexandru Apostolescu](https://github.com/Alex-deVis), [Andra Paraschiv](https://github.com/andraprs), [Andrei Tătar](https://github.com/andreittr), [Cezar Crăciunoiu](https://github.com/craciunoiuc), [Delia Pavel](https://github.com/DeliaPavel), [Dragoș Petre](https://github.com/dragosp27), [Eduard Mihăilescu](https://github.com/Starnox), [Eduard Vintilă](https://github.com/eduardvintila), [Florin Postolache](https://github.com/maniatro111), [Gabriel Mocanu](https://github.com/gabrielmocanu), [Teodor Țeugea](https://github.com/John-Ted), [Luca Serițan](https://github.com/LucaSeri), [Marco Schlumpp](https://github.com/mschlumpp), [Marc Rittinghaus](https://github.com/marcrittinghaus), [Maria Sfîrăială](https://github.com/mariasfiraiala), [Michalis Pappas](https://github.com/michpappas), [Radu Nichita](https://github.com/RaduNichita), [Rareș Miculescu](https://github.com/rares-miculescu), [Răzvan Deaconescu](https://github.com/razvand), [Răzvan Vîrtan](https://github.com/razvanvirtan), [Robert Kuban](https://github.com/kubanrob), [Sergiu Moga](https://github.com/mogasergiu), [Simon Kuenzer](https://github.com/skuenzer), [Ștefan Jumarea](https://github.com/StefanJum), [Teodor Tiron](https://github.com/teotiron), [Tu Dinh Ngoc](https://github.com/dinhngtu), [Vlad Bădoiu](https://github.com/vladandrew). --- For more information, check out [the accompanying blog post](https://unikraft.org/blog/2023-05-15-unikraft-releases-atlas) or [view the full changelog](https://github.com/unikraft/unikraft/compare/RELEASE-0.12.0...RELEASE-0.13.0). --- ## Twitter Unikraft v0.13.0 (Atlas) is out! 🚀 This release comes with a bunch of new features that are worth your attention: application compatibility updates, a rewrite of our library parameters parsing, a new library that handles environment variables and an updated version of newlib! Check out the blog post for extensive details on the latest changes: https://unikraft.org/blog/2023-05-15-unikraft-releases-atlas --- ## LinkedIn Unikraft v0.13.0 (Atlas) is out! 🚀 This release comes with a bag of new exciting features, like application compatibility updates, a rewrite of our library parameters parsing, a new library that handles environment variables and an updated version of newlib! Find out more on the [blogpost](https://unikraft.org/blog/2023-05-15-unikraft-releases-atlas) and join us on GitHub (https://github.com/unikraft/) and on Discord (https://bit.ly/UnikraftDiscord). --- ## Blog Post Unikraft v0.13.0 (Atlas) is out! As usual, this release adds important fixes and comes with a bunch of new features. In this blog post, we describe some of the new features available in Unikraft. For a full breakdown, please check out the [changelog](https://github.com/unikraft/unikraft/compare/RELEASE-0.12.0...RELEASE-0.13.0). ## New Synchronization Primitives ([#476](https://github.com/unikraft/unikraft/pull/476)) _This feature began as a [Google Summer of Code 2022 (GSoC22) project](https://github.com/unikraft/gsoc/blob/staging/gsoc-2022/ideas.md#smp-synchronization), and it was championed by [Sairaj Kodilkar](https://github.com/Sairajkodilkar) under the guidance of [Marc Rittinghaus](https://github.com/marcrittinghaus) and [Andra Paraschiv](https://github.com/andraprs) with support from [Radu Nichita](https://github.com/RaduNichita) and [Răzvan Deaconescu](https://github.com/razvand)._ The release introduces an IRQ safe API for the spinlock as well as SMP safe mutex implementation. Previously for UP arch, the Mutex disabled the interrupt, this implementation also synchronized the wait queue. Along with this, the previous implementation also used the two conditions to indicate the lock that lock is free, which was: ``` owner == current || lock_count == 0; ``` However, if we observe closely we can separate these conditions since if the owner is the current thread then we can increment the lock count, otherwise, we can wait for the current to be null and can acquire the lock. This implementation does not disable interrupts, but we can definitely introduce an API that does. One requirement of this commit is that we need to separately implement the SMP safe wait queue. Currently, these wait queue is only used in uklock lib, but SMP safe wait queues can be used anywhere in the kernel. More can be read about this implementation in: - https://unikraft.org/blog/2022-06-27-unikraft-synchronization/ - https://unikraft.org/blog/2022-07-19-unikraft-synchronization/ ## Native Firecracker VMM Support ([#760](https://github.com/unikraft/unikraft/pull/760)) _This feature was championed by [Marco Schlumpp](https://github.com/mschlumpp) with important advice from [Marc Rittinghaus](https://github.com/marcrittinghaus), [Sergiu Moga](https://github.com/mogasergiu) and [Andrei Topala](https://github.com/Krechals)._ **⚠️ This addition results in a breaking change to Unikraft's output binary artifact name.** This release introduces support for booting Unikraft on the Firecracker VMM. Compared to QEMU, this enables even faster boot times for Unikraft unikernels. This support was built on top of the boot code refactoring in the previous release, and therefore shares most of the code with the entry point of QEMU. Currently, Unikraft's virtio drivers do not work with firecracker. This will be addressed with a future release. Previously, when building for x86_64 and targeting KVM, the resulting binary artifact would be output as, in the case of the helloworld application, `helloworld_kvm-x86_64`. The new artifact name now targets the VMM, so the result will be `helloworld_qemu-x86_64` or `helloworld_fc-x86_64` in the case of Firecracker. <!-- Section should contain: - overview of firecracker and benefits - how it is implemented - how it can be used - an IMPORTANT NOTE that this now contains a breaking change! The output binary is now different. --> ## `posix-environ`: Handling Environmental Variables ([#868](https://github.com/unikraft/unikraft/pull/868)) _This feature was championed by [Simon Kuenzer](https://github.com/skuenzer) with support from [Răzvan Deaconescu](https://github.com/razvand), [Eduard Mihăilescu](https://github.com/Starnox) and [Job Paardekooper](https://github.com/jobpaardekooper)._ This release introduces the handling of environment variables with the `posix-environ` library. The environment variables vector `environ` can be populated at compile time and at runtime if `uklibparam` is configured as part of a build. The library provides POSIX-conformant getters and setters, like `getenv()` and `setenv()`. The variables provided at compile-time are configurable with `make menuconfig` under `Library Configuration --> posix-environ --> Compiled-in environment variables`. 16 slots are available and the initial `environ` vector is created with the filled slots. Additionally, the configuration option `Parse kernel command line arguments` enables setting further initial environment varaibles via the kernel command line. For this purpose, the parameter `env.vars` accepts an array of strings that is appended to the compile-time initialized vector. As example, the following command line snippet sets the variables `PATH`, `UID`, `GID`, and `LD_LIBRARY_PATH=/lib`: ```text env.vars=[ "PATH=/bin" "UID=0" "GID=0" "LD_LIBRARY_PATH=/lib" ] -- ``` ## Rewriting `uklibparam` ([#867](https://github.com/unikraft/unikraft/pull/867)) _This feature was championed by [Simon Kuenzer](https://github.com/skuenzer) with advice from [Alexander Jung](https://github.com/nderjung) and [Răzvan Deaconescu](https://github.com/razvand)._ Unikraft's library parameter parser is originally rewritten for providing support for environment variables with the kernel command line (see [`posix-environ`](https://github.com/unikraft/unikraft/tree/staging/lib/posix-environ)). Besides ensuring an allocation-free and TLS-free implementation for early boot code, `uklibparam` now relies on pre-processed argument vectors, like with `ukargparse`. This avoids duplicated processing of quotes while naturally enabling support for single quotes (`'`), double quotes (`"`), and nested quoting. Also, arrays of strings are supported by this release. A new set of registration macros simplifies the registration process and introduces the ability to specify a description that is displayed with the `help` kernel command: ```text Usage of command line: [help] [PREFIX.PARAMETER=VALUE]... -- [APPLICATION ARGUMENT]... Special commands: help Print this help summary Available parameters: env.vars Environment variables (array[8] of charp) vfs.rootfs rootfs (charp) vfs.rootdev rootdev (charp) vfs.rootopts rootopts (charp) vfs.rootflags rootflags (u64) Numbers can be passed in decimal, octal ("0" as prefix), or hexadecimal ("0x" as prefix). Valid boolean values for 'true' are: "true", "on", "yes", a non-zero number. Valid boolean values for 'false' are: "false", "off", "no", a zero number (e.g., "0"). Boolean parameters that are passed without a value will be set to 'true'. Array parameters can be passed with multiple 'PREFIX.PARAMETER=VALUE' tokens, using a list: 'PREFIX.PARAMETER=[ VALUE0 VALUE1 ... ]', or a combination of both. Please refer the application manual or application help for application arguments. ``` A library has only to include `uk/libparam.h`, declare the variables and register those to `uklibparam`. The following example demonstrates how this is done with C code: ```c #include <stddef.h> /* NULL */ #include <uk/libparam.h> /* Declarations with default values */ static char *myvar="My parameter"; static char *myvec[4]={ NULL }; /* Registration to uklibparam * NOTE: The macro automatically removes the registration if * lib/uklibparam is excluded from the configuration. */ UK_LIBPARAM_PARAM(myvar, charp, "My variable"); UK_LIBPARAM_PARAM_ARR(myvar, charp, 4, "My C-string vector"); ``` The following command line snippet sets the variables `myvar` and `myvec`: ```text mylib.myvar="Banana" mylib.myvec=[ "I" "am" "very" "hungry!" ] -- ``` Alternatively, arrays can be filled with multiple tokens or a combination of array syntax and tokens, like: ```text= mylib.myvar="Banana" mylib.myvec="I" mylib.myvec="am" mylib.myvec=[ "very" "hungry!" ] -- ``` ## `app-elfloader` updates _This was championed by [Simon Kuenzer](https://github.com/skuenzer) with extensive support from [Andra Paraschiv](https://github.com/andraprs), [Cosmin Vancea](https://github.com/csvancea) and [Răzvan Deaconescu](https://github.com/razvand)._ This release includes updates that enhance and simplify the use of [`app-elfloader`](https://github.com/unikraft/app-elfloader). `app-elfloader` is used to run unmodified Linux ELFs with Unikraft, via the [`syscall_shim`](https://github.com/unikraft/unikraft/tree/staging/lib/syscall_shim). The `README.md` file has been updated, with detailed instructions on configuring, building, running and debugging `app-elfloader`. A helper debugging script allows using debugging symbols in the application, in the loader and in the standard C library. For dynamic applications, explicit loading of the Linux dynamic linker / loader was required. Recent updates don't require that, and the path to the actual dynamic ELF can be passed to the running Unikraft instance. `app-elfloader` parses the `.interp` section to locate information about the dynamic linker / loader, typically located in `/lib64/ld-linux-x86-64.so` on a typical Linux system. The dynamic linker / loader, which needs to be part of the filesystem of the running Unikraft instance, is then loaded and invoked to load dependent libraries and to do dynamic symbol resolution. Up until now, the executable (or the explicit dynamic linker / loader) was passed as part of the initial ramdisk, using the `-initrd` of `qemu-system`. With the recent changes, the executable can be part of the filesystem of the running instance. It's filesystem path is passed as arguments when running `app-elfloader`. Running applications is simplified by using the the compation [`run-app-elfloader` repository], consisting of wrapper scripts with proper options, configurations and pre-built images. ## Application Compatibility Updates _This was a continuous effort from [Marc Rittinghaus](https://github.com/marcrittinghaus), [Simon Kuenzer](https://github.com/skuenzer), [Răzvan Deaconescu](https://github.com/razvand), [Ioan Țeugea](https://github.com/John-Ted), [Florin Postolache](https://github.com/maniatro111), [Andra Paraschiv](https://github.com/andraprs), [Marco Schlumpp](https://github.com/mschlumpp) and [Cosmin Vancea](https://github.com/csvancea)._ Multiple applications are tested using the binary-compatibility mode, i.e. running unmodified Linux ELFs on top of Unikraft, by trapping in the [Unikraft `syscall_shim`](https://github.com/unikraft/unikraft/tree/staging/lib/syscall_shim); this is done using [`app-elfloader`](https://github.com/unikraft/app-elfloader). ELFs must be PIE (_Position-Independent Executables_). Two repositories store pre-built applications: [`dynamic-apps`](https://github.com/unikraft/dynamic-apps) and [`static-pie-apps`](https://github.com/unikraft/static-pie-apps) for dynamic and static PIE apps, respectively. Running these applications revealed incompatibilities between the Linux ABI the Unikernel ABI required by applications, incomplete, missing or faulty system calls. These are now fixed. Applications in the [`dynamic-apps`](https://github.com/unikraft/dynamic-apps) and [`static-pie-apps`](https://github.com/unikraft/static-pie-apps) repositories are now working with Unikraft by employing [`app-elfloader`](https://github.com/unikraft/app-elfloader). As part of the effort, the [`dynamic-apps` repository](https://github.com/unikraft/dynamic-apps) was created. And the [`static-pie-apps` repository](https://github.com/unikraft/static-pie-apps) was enriched with new applications. Focus is on dynamic PIE apps, since they are the default applications on Linux distributions; they can simply be picked up, together with dependent libraries, configuration files and support files and run with Unikraft by using [`app-elfloader`](https://github.com/unikraft/app-elfloader). Existing applications can be quickly tested by using the companion [`run-app-elfloader` repository](https://github.com/unikraft/run-app-elfloader): ```console $ ./run_app.sh Usage: ./run_app.sh [-l] <app> Possible apps: bc bc_static bzip2 client client_go client_go_static client_static echo gzip gzip_static haproxy helloworld helloworld_cpp helloworld_cpp_static helloworld_go helloworld_go_static helloworld_rust helloworld_rust_static_gnu helloworld_rust_static_musl helloworld_static ls nginx nginx_static openssl python redis redis7 redis_static server server_go server_go_static server_static sqlite3 sqlite3_static -l - use dynamic loader explicitly $ ./run_app.sh helloworld [...] Hello, World! ``` ## Newlib Support on in the Latest Unikraft Version _This feature was championed by [Eduard Vintilă](https://github.com/eduardvintila), with support from [Maria Sfîrăială](https://github.com/mariasfiraiala), [Răzvan Deaconescu](https://github.com/razvand) and [Teodor Țeugea](https://github.com/John-Ted)._ Since the introduction of [Musl](https://github.com/unikraft/lib-musl) as the default standard C library (_libc_) for Unikraft, since [release 0.11.0](https://github.com/unikraft/unikraft/releases/tag/RELEASE-0.11.0), [Newlib](https://github.com/unikraft/lib-newlib) support was deprioritized. With this release, Newlib support is not updated to the recent Unikraft version. [Updates to `lib-newlib`](https://github.com/unikraft/lib-newlib/pull/28) and [to the companion threading library `lib-pthread-embedded`](https://github.com/unikraft/lib-pthread-embedded/pull/11) were related to the recent updates of Unikraft and `lib-lwip`: new scheduling API, Musl-imported functions, timing. Most [Unikraft application repositories](https://github.com/search?q=topic%3Aunikraft-application+org%3Aunikraft&type=Repositories) are currently configured to use, by default, [Musl](). They can be configured to use [Newlib](https://github.com/unikraft/lib-newlib) instead. ## Documentation Updates _This feature was championed by [Ștefan Jumărea](https://github.com/eduardvintila), with extensive support from [Radu Nichita](https://github.com/RaduNichita), [Maria Sfîrăială](https://github.com/mariasfiraiala), [Răzvan Deaconescu](https://github.com/razvand), [Delia Pavel](https://github.com/DeliaPavel) and [Eduard Vintilă](https://github.com/eduardvintila)._ As usual with every release, documentation has been updated. Most documentation is filling in the blanks of existing features that require better documentation, and as support for hackathon and tutorial events. Documentation updates take part in the [core `unikraft` repository](https://github.com/unikraft/unikraft) and in the [`docs` repository](https://github.com/unikraft/docs) - that also stores website information. In the [core `unikraft` repository](https://github.com/unikraft/unikraft), documentation consists of `README.md` files in internal libraries, such as [`vfscore`](https://github.com/unikraft/unikraft/blob/staging/lib/vfscore/README.md). And in Doxygen-style comments in header and source code files such as [`ramfs`](https://github.com/unikraft/unikraft/blob/staging/lib/ramfs/ramfs.h), that are then planned to be exported to the website, as an official API documentation for Unikraft. For the [`docs` repository](https://github.com/unikraft/docs), most changes consisted of updates to [hackathon sessions](https://unikraft.org/community/hackathons/sessions/) for the hackathons taking place during this time. Two important additions to documentation are related to [binary compatibility](https://unikraft.org/docs/usage/bin_compat/) and to [building and running complex applications](https://unikraft.org/docs/usage/make_build/#building-and-running-complex-applications-with-make). ## Community Activities ### Athens Hackathon On 30th and 31st of March 2023, we organized our first hackathon in Greece, with support from [Nubificus](https://nubificus.co.uk/), [the High Speed Communication Networks Lab (HSCN)](http://hscnl.ece.ntua.gr/) and [the Computing Systems Lab (CSLab)](http://www.cslab.ece.ntua.gr/) of the National Technical University of Athens ([ICCS](https://www.iccs.gr/en/)/[NTUA](https://www.ntua.gr/en/))! For 2 days, the participants have been introduced to the Unikraft universe and had the opportunity to become part of our community and bring their first contributions. [Michalis Pappas](https://github.com/michpappas), [Răzvan Deaconescu](https://github.com/razvand/) and [Ștefan Jumărea](https://github.com/StefanJum) provided help on site, with other veteran community members offering online suport. You can find the hackathon sessions and challenges on the [Athens Hackathon page](https://unikraft.org/community/hackathons/2023-03-athens/). ### Amsterdam Hackathon We continued our hackathon season with the Amsterdam Unikraft Hackathon, organized on 15th and 16th of April 2023, together with [Vrije Universiteit Amsterdam (VUA)](https://vu.nl/en) and [VUSec](https://www.vusec.net/). This time, [Răzvan Deaconescu](https://github.com/razvand/) was joined by [Hugo Lefeuvre](https://github.com/hlef/) on-site, with other community members keeping in touch online. For full hackathon content, check [Amsterdam Hackathon page](https://unikraft.org/community/hackathons/2023-04-amsterdam/). ### Porto Hackathon Show must go on! We then moved to Porto for the next Unikraft hackathon, organized in collaboration with [Faculdade de Engenharia Universidade do Porto](https://sigarra.up.pt/feup/en/web_page.Inicial) and University of Porto Faculty of Engineering ACM Student Chapter. The hackathon took part on Wednesday and Thursday, May 10-11, 2023. [Ștefan Jumărea](https://github.com/StefanJum) and [Eduard Vintilă](https://github.com/eduardvintila) were present on-site, with other community members providing support online, on Discor. You can find more about this on the [Porto hackathon page](https://unikraft.org/community/hackathons/2023-05-porto/). ### Google Summer of Code 2023 <!-- TODO(nderjung): Should this not be its own blog post? RD: Yes, eventually. --> The results of the project selection for this year edition of Google Summer of Code are here: 5 projects proposed by Unikraft have been selected! Here is the list of students that will work together with us in the next few months, together with their projects: - [**MD Sahil**](https://github.com/MdSahil-oss): [Enhancing the VSCode Developer Experience](https://summerofcode.withgoogle.com/programs/2023/projects/ZUeHjGnO) - [**Rareș Miculescu**](https://github.com/rares-miculescu): [re:Arch Unikraft](https://summerofcode.withgoogle.com/programs/2023/projects/L97cI91F) - [**Tianyi Liu**](https://github.com/i-Pear): [Expanding binary compatibility mode](https://summerofcode.withgoogle.com/programs/2023/projects/Bl7ARfep) - [**Zeyu Li**](https://github.com/zyllee): [Packaging Pre-built Micro-libraries for Faster and More Secure Builds](https://summerofcode.withgoogle.com/programs/2023/projects/vakHok2H) - [**Zhang Xingjian**](https://github.com/zhxj9823): [Arm CCA Support for Unikraft](https://summerofcode.withgoogle.com/programs/2023/projects/5oKH0o5n) We are looking forward to start mentoring our students, and we can't wait for the great features we are going to develop together!