{"id":21149340,"url":"https://github.com/graalvm/graalvm-demos","last_synced_at":"2025-05-15T04:00:30.122Z","repository":{"id":37270967,"uuid":"127737325","full_name":"graalvm/graalvm-demos","owner":"graalvm","description":"This repository contains example applications to illustrate the different capabilities of GraalVM","archived":false,"fork":false,"pushed_at":"2025-05-05T15:08:25.000Z","size":104877,"stargazers_count":628,"open_issues_count":5,"forks_count":163,"subscribers_count":47,"default_branch":"master","last_synced_at":"2025-05-05T16:27:02.865Z","etag":null,"topics":["graalvm","graalvm-demos","native-image"],"latest_commit_sha":null,"homepage":"http://graalvm.org","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"upl-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/graalvm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-04-02T09:50:42.000Z","updated_at":"2025-05-05T15:08:30.000Z","dependencies_parsed_at":"2023-12-20T12:32:22.015Z","dependency_job_id":"fdfa1f23-48b6-4439-84ad-69ff5b7c0cc2","html_url":"https://github.com/graalvm/graalvm-demos","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graalvm%2Fgraalvm-demos","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graalvm%2Fgraalvm-demos/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graalvm%2Fgraalvm-demos/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graalvm%2Fgraalvm-demos/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/graalvm","download_url":"https://codeload.github.com/graalvm/graalvm-demos/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254270640,"owners_count":22042858,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["graalvm","graalvm-demos","native-image"],"created_at":"2024-11-20T09:34:19.991Z","updated_at":"2025-05-15T04:00:30.072Z","avatar_url":"https://github.com/graalvm.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GraalVM Demos\n\nThis repository contains a collection of example applications that highlight key features and best practices for working with GraalVM technologies.\n\n## Get Started\n\nTo get started, clone this repository and navigate to the relevant demo directory:\n```bash\ngit clone https://github.com/graalvm/graalvm-demos.git\ncd graalvm-demos\n```\n\nYou will find instructions for running a particular demo in the corresponding _README.md_ file. Some demos redirect you to a specific guide on the [GraalVM website](https://www.graalvm.org/latest/guides/).\n\n## Native Image Demos\n\nExample applications showcasing the capabilities of GraalVM Native Image, including performance optimization and configuration tips.\n\n### Build\nDemos for building native images, including configurations and setup steps for various use cases.\n\n* [hello-world](native-image/hello-world/) - A HelloWorld example showing how to create a native executable from a class file\n* [build-from-jar](native-image/build-from-jar/) - Shows how to create a JAR file without using Maven or Gradle, and build a native executable from that JAR\n* [build-java-modules](native-image/build-java-modules/) - Shows how to compile a modularized Java application into a native executable without using Maven or Gradle\n* [build-shared-library](native-image/build-shared-library/) - Shows how build a native shared library and then load it from a C application\n* [build-static-images](native-image/build-static-images/) - Shows how to create a fully static and a mostly-static native executable, unlike the default dynamic one\n* [build-with-js-embedded](native-image/build-with-js-embedded/) - Shows how to embedded JavaScript into a Java application, and then compile it ahead of time\n* [list-files](native-image/list-files/) - Shows how to create a native executable from the command line, and then apply Profile-Guided Optimization (PGO)\n* [native-build-tools](native-image/native-build-tools/) - Contains two Java projects, and shows how to create native executables from those applications using [Maven](https://graalvm.github.io/native-build-tools/latest/maven-plugin.html) and [Gradle](https://graalvm.github.io/native-build-tools/latest/gradle-plugin.html) plugins for GraalVM Native Image\n* [wasm-javac](native-image/wasm-javac/) - Illustrates how to use the new experimental WebAssembly backend in GraalVM to compile `javac` into a Wasm module, which can then run either on the command line or in the browser. [Check out the live demo here](https://graalvm.github.io/graalvm-demos/native-image/wasm-javac/).\n\n### Configure\nDemos illustrating how to compile applications with Native Image that use some dynamic Java features including reflection, resource access, and so on.\n\n* [access-environment-variables](native-image/access-environment-variables/) - Showing how to access environment variables in a native executable at run time\n* [configure-with-tracing-agent](native-image/configure-with-tracing-agent/) - Demonstrate how to use the tracing agent to create a native executable that relies on reflection and requires configuration\n* [include-metadata](native-image/include-metadata/) - Contains Maven and Gradle Java projects and demonstrates how to include reachability metadata using [Native Build Tools](https://graalvm.github.io/native-build-tools/)\n* [include-resources](native-image/include-resources/) - Demonstrates how to register resources to be included in a native executable by providing a resource configuration file\n* [specify-class-init](native-image/specify-class-init/) - Demonstrates how to influence the default class initialization policy, and initialize a specific class at build time\n* [use-system-properties](native-image/use-system-properties/) - Demonstrates how to use system properties in a native executable at build time versus at run time\n\n### Containerize\nDemos focusing on containerizing native Java applications and following best practices.\n\n* [spring-boot-microservice-jibber](native-image/spring-boot-microservice-jibber/) - Demonstrates how to create a native executable for a Spring Boot web server, containerize it, and run\n* [tiny-java-containers](native-image/tiny-java-containers/) - Shows how a simple Java application and the `jdk.httpserver` module can be compiled to produce small container images\n\n### Monitor\nDemos showcasing how to monitor native applications using observability and diagnostics tools.\n\n* [add-jfr](native-image/add-jfr/) - Shows how to build a native executable with JDK Flight Recorder (JFR) events support\n* [add-jmx](native-image/add-jmx/) - Shows how to build, run, and interact with a native executable using Java Management Extensions (JMX)\n* [add-logging](native-image/add-logging/) - Demonstrates how add logging to a native executable by providing necessary logging configuration\n* [create-heap-dump](native-image/create-heap-dumps/) - Shows how to enable heap dump support and describes all possible ways how to create a heap dump from a native executable\n* [embed-sbom](native-image/embed-sbom/) - Demonstrates how to embed an SBOM in a native executable to identify its dependencies\n\n### Optimize\nDemos optimizing native applications for different criteria (runtime and performance tuning, file size, build time, and more).\n\n* [emit-build-report](native-image/emit-build-report/) - Shows how to optimize Size of a native executable using Build Reports\n* [optimize-memory](native-image/optimize-memory/) - Shows how to optimize memory footprint of a native executable\n* [optimize-with-pgo](native-image/optimize-with-pgo/) - Shows how to optimize a native executable with Profile-Guided Optimization (PGO) for performance and throughput\n\n### Benchmark\nPerformance measurement demos for Native Image.\n\n* [jmh/binary-tree](native-image/benchmark/jmh/binary-tree/) - Shows how to run a Java Microbenchmark Harness (JMH) benchmark as a native executable\n\n### Clouds\nDemos showcasing the building and deployment of native applications to Oracle Cloud Infrastructure (OCI), AWS, and Google Cloud.\n\n* [native-aws-fargate](native-image/clouds/native-aws-fargate/) - Shows how to containerize a native Java application and then deploy it using the Amazon Elastic Container Registry and AWS Fargate\n* [native-aws-lambda](native-image/clouds/native-aws-lambda/) - Demonstrates how to deploy both Java 17 and Native Image applications onto the AWS Lambda platform\n* [native-google-cloud-run](native-image/clouds/native-google-cloud-run/) - Demonstrates how to deploy a native Java application onto the Google Cloud Run platform\n* [native-oci-cloud-shell](native-image/clouds/native-oci-cloud-shell/) - Shows how to get started quickly with Oracle GraalVM and use Native Image in Oracle Cloud Infrastructure (OCI) Cloud Shell\n* [native-oci-container-instances](native-image/clouds/native-oci-container-instances/) - Shows how to containerize a native Java application and then deploy it on OCI using the Container Instance service\n* [native-oci-generative-ai](native-image/clouds/native-oci-generative-ai/) - Demonstrates how to use the OCI Generative AI service provided in a Java application, and then compile it ahead of time with Maven\n\n### Microservices\nDemos for building microservices ahead of time using frameworks such as Micronaut and Spring Boot.\n\n* [micronaut-hello-rest-gradle](native-image/microservices/micronaut-hello-rest-gradle) - Demonstrates how to build a native executable from a Micronaut application using [Grade plugin for Native Image](https://graalvm.github.io/native-build-tools/latest/gradle-plugin.html)\n* [micronaut-hello-rest-maven](native-image/microservices/micronaut-hello-rest-maven) - Demonstrates how to build a native executable from a Micronaut application using [Maven plugin for Native Image](https://graalvm.github.io/native-build-tools/latest/maven-plugin.html)\n\n## Compiler Demos\n\nDemos designed to test and showcase the capabilities of the Graal Just-In-Time (JIT) compiler.\nThese examples focus on evaluating the compiler's performance, including its optimizations for modern Java workloads.\n\n* [java-stream-benchmark](compiler/java-stream-benchmark/) - A simple Java Stream benchmark to test the Graal JIT compiler performance against C2\n\n## Graal Languages Demos\n\nYou can find demos and guides for [GraalJS](https://www.graalvm.org/javascript/), [GraalPy](https://www.graalvm.org/python/), [GraalWasm](https://www.graalvm.org/webassembly/), and other Graal Languages at [github.com/graalvm/graal-languages-demos/](https://github.com/graalvm/graal-languages-demos/).\n\n## Archived Demos\n\nLegacy or blog-related demos, as well as examples involving polyglot capabilities.\n\n## License\n\nUnless specified otherwise, all code in this repository is licensed under the [Universal Permissive License (UPL)](http://opensource.org/licenses/UPL).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgraalvm%2Fgraalvm-demos","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgraalvm%2Fgraalvm-demos","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgraalvm%2Fgraalvm-demos/lists"}