|
| 1 | +# Mandrel |
| 2 | + |
| 3 | +Mandrel is [a downstream distribution of the GraalVM community edition](https://developers.redhat.com/blog/2020/06/05/mandrel-a-community-distribution-of-graalvm-for-the-red-hat-build-of-quarkus/). |
| 4 | +Mandrel's main goal is to provide a `native-image` release specifically to support [Quarkus](https://quarkus.io). |
| 5 | +The aim is to align the `native-image` capabilities from GraalVM with OpenJDK and Red Hat Enterprise Linux libraries to improve maintainability for native Quarkus applications. |
| 6 | +Mandrel can best be described as a distribution of a regular OpenJDK with a specially packaged GraalVM Native Image builder (`native-image`). |
| 7 | + |
| 8 | +## How Does Mandrel Differ From Graal |
| 9 | + |
| 10 | +Mandrel releases are built from a code base derived from the upstream GraalVM code base, with only minor changes but some significant exclusions. |
| 11 | +A full distribution of GraalVM is much more than `native-image`: it has polyglot support, the Truffle framework which allows for efficient implementation of interpreters, an LLVM compiler back end for native image, the libgraal JIT compiler as a replacement for Hotspot’s C2 server compiler and much more. |
| 12 | +Mandrel is the small subset of that functionality we support for the `native-image` use-case. |
| 13 | + |
| 14 | +Mandrel's `native-image` also doesn't include the following features: |
| 15 | +* The experimental image-build server, i.e., the `--experimental-build-server` option. |
| 16 | +* The LLVM backend, i.e., the `-H:CompilerBackend=llvm` option. |
| 17 | +* The musl libc implementation, i.e., the `--libc=musl` option. |
| 18 | +* Support for generating static native images, i.e., the `--static` option. |
| 19 | +* Support for non JVM-based languages and polyglot, i.e., the `--language:<languageId>` option. |
| 20 | + |
| 21 | +Mandrel is also built slightly differently to GraalVM, using the standard OpenJDK project release of jdk17u. |
| 22 | +This means it does not profit from a few small enhancements that Oracle have added to the version of OpenJDK used to build their own GraalVM downloads. |
| 23 | +Most of these enhancements are to the JVMCI module that allows the Graal compiler to be run inside OpenJDK. |
| 24 | +The others are small cosmetic changes to behaviour. |
| 25 | +These enhancements may in some cases cause minor differences in the progress of native image generation. |
| 26 | +They should not cause the resulting images themselves to execute in a noticeably different manner. |
| 27 | + |
| 28 | +## Communication Channels |
| 29 | + |
| 30 | +* [Slack](https://www.graalvm.org/slack-invitation) - Join `#mandrel` channel at graalvm's slack workspace |
| 31 | +* [graalvm-dev@oss.oracle.com](mailto:graalvm-dev@oss.oracle.com?subject=[MANDREL]) mailing list - Subscribe [here](https://oss.oracle.com/mailman/listinfo/graalvm-dev) |
| 32 | +* [GitHub issues](https://github.com/graalvm/mandrel/issues) for bug reports, questions, or requests for enhancements. |
| 33 | + |
| 34 | +Please report security vulnerabilities according to the [Reporting Vulnerabilities guide](https://www.oracle.com/corporate/security-practices/assurance/vulnerability/reporting.html). |
| 35 | + |
| 36 | +## Getting Started |
| 37 | + |
| 38 | +Mandrel distributions can be downloaded from [the repository's releases](https://github.com/graalvm/mandrel/releases) |
| 39 | +and container images are available at [quay.io](https://quay.io/repository/quarkus/ubi-quarkus-mandrel-builder-image?tag=latest&tab=tags). |
| 40 | + |
| 41 | +### Prerequisites |
| 42 | + |
| 43 | +Mandrel's `native-image` depends on the following packages: |
| 44 | +* freetype-devel |
| 45 | +* gcc |
| 46 | +* glibc-devel |
| 47 | +* libstdc++-static |
| 48 | +* zlib-devel |
| 49 | + |
| 50 | +On Fedora/CentOS/RHEL they can be installed with: |
| 51 | +```bash |
| 52 | +dnf install glibc-devel zlib-devel gcc freetype-devel libstdc++-static |
| 53 | +``` |
| 54 | + |
| 55 | +**Note**: The package might be called `glibc-static` or `libstdc++-devel` instead of `libstdc++-static` depending on your system. |
| 56 | +If the system is missing stdc++, `gcc-c++` package is needed too. |
| 57 | + |
| 58 | +On Ubuntu-like systems with: |
| 59 | +```bash |
| 60 | +apt install g++ zlib1g-dev libfreetype6-dev |
| 61 | +``` |
| 62 | + |
| 63 | +## Building Mandrel From Source |
| 64 | + |
| 65 | +For building Mandrel from source please see [mandrel-packaging](https://github.com/graalvm/mandrel-packaging) |
| 66 | +and consult [Repository Structure in CONTRIBUTING.md](CONTRIBUTING.md#repository-structure) regarding which branch of Mandrel to use. |
| 67 | + |
| 68 | +# Community |
| 69 | +Empowering Software Development with Works on Arm Initiative |
| 70 | + |
| 71 | +[Works on Arm](https://www.arm.com/solutions/infrastructure/works-on-arm) is a strategic initiative to enable and accelerate the |
| 72 | +software ecosystem for Arm64. |
| 73 | + |
| 74 | +[GraalVM's](https://www.graalvm.org/) [Mandrel](https://github.com/graalvm/mandrel) distribution that |
| 75 | +powers [Quarkus Native](https://quarkus.io/guides/building-native-image) proudly counts itself among the libraries and |
| 76 | +tools that successfully leveraged the resources from Works on Arm. |
0 commit comments