{"id":40234968,"url":"https://github.com/usommerl/graalnative4s","last_synced_at":"2026-01-19T23:05:30.069Z","repository":{"id":39848160,"uuid":"302687024","full_name":"usommerl/graalnative4s","owner":"usommerl","description":"Employ Scala for serverless applications","archived":false,"fork":false,"pushed_at":"2026-01-14T01:19:23.000Z","size":1095,"stargazers_count":69,"open_issues_count":2,"forks_count":5,"subscribers_count":5,"default_branch":"develop","last_synced_at":"2026-01-14T05:06:24.726Z","etag":null,"topics":["cats","cats-effect","circe","ciris","cloud-run","graal","graal-native","graalvm","graalvm-native-image","http4s","odin","scala","serverless","tapir","upx"],"latest_commit_sha":null,"homepage":"https://graalnative4s.usommerl.dev","language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/usommerl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-10-09T15:50:34.000Z","updated_at":"2026-01-14T01:18:56.000Z","dependencies_parsed_at":"2025-12-30T10:05:02.048Z","dependency_job_id":null,"html_url":"https://github.com/usommerl/graalnative4s","commit_stats":null,"previous_names":[],"tags_count":31,"template":false,"template_full_name":null,"purl":"pkg:github/usommerl/graalnative4s","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usommerl%2Fgraalnative4s","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usommerl%2Fgraalnative4s/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usommerl%2Fgraalnative4s/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usommerl%2Fgraalnative4s/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/usommerl","download_url":"https://codeload.github.com/usommerl/graalnative4s/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usommerl%2Fgraalnative4s/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28588971,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-19T20:45:59.482Z","status":"ssl_error","status_checked_at":"2026-01-19T20:45:41.500Z","response_time":67,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["cats","cats-effect","circe","ciris","cloud-run","graal","graal-native","graalvm","graalvm-native-image","http4s","odin","scala","serverless","tapir","upx"],"created_at":"2026-01-19T23:05:29.515Z","updated_at":"2026-01-19T23:05:30.055Z","avatar_url":"https://github.com/usommerl.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"# graalnative4s\n\n![build](https://img.shields.io/github/actions/workflow/status/usommerl/graalnative4s/ci.yaml?branch=develop\u0026style=for-the-badge)\n[![codecov](https://img.shields.io/codecov/c/github/usommerl/graalnative4s?style=for-the-badge)](https://codecov.io/gh/usommerl/graalnative4s)\n[![Scala Steward badge](https://img.shields.io/badge/Scala_Steward-helping-blue.svg?style=for-the-badge)](https://scala-steward.org)\n\nThis is a showcase for a combination of purely functional Scala libraries that can be used with GraalVM `native-image` without much effort. It employs [http4s][http4s] for general server functionality, [circe][circe] for JSON processing, [ciris][ciris] to load runtime configuration, [tapir][tapir] to describe HTTP endpoints and [odin][odin] for logging. Applications that were built with `native-image` have beneficial properties such as a lower memory footprint and fast startup. This makes them suitable for serverless applications.\n\n### Build\nUse `sbt docker` to build a docker image with the native image binary. You don't need to install anything besides `docker` and `sbt`, the build process downloads all required GraalVM tooling. The [created image][image] will be as minimal as possible by using a multi-stage build.\n\nYou can create an even smaller image by utilizing UPX compression. Use the `UPX_COMPRESSION` environment variable at build time to specify the compression level.\nPlease note that while this reduces the size of the image significantly it also [has an impact on startup performance and memory consumption.](./benchmark/upx.md)\n\nExample: `export UPX_COMPRESSION=\"--best\"; sbt docker`\n\n### Deploy\nThis repository contains a [workflow][workflow] that will deploy the created image to Google Cloud Run. You could also use the button below to deploy it to your own GCP account.\n\n[![Run on Google Cloud](https://deploy.cloud.run/button.svg)](https://deploy.cloud.run)\n\n### Try\nThe most recent version of this small example is online here: [https://graalnative4s.usommerl.dev](https://graalnative4s.usommerl.dev)\n\n### Acknowledgements \u0026 Participation\nI have taken a lot of inspiration and knowledge from [this blog post by James Ward][inspiration]. You should check out his [hello-uzhttp][uzhttp] example. Another project that helped me to connect the dots regarding `native-image` configuration was [vasilmkd/docker-stats-monitor][docker-stats-monitor]. Suggestions and contributions to this repository are welcome!\n\n[http4s]: https://github.com/http4s/http4s\n[circe]: https://github.com/circe/circe\n[tapir]: https://github.com/softwaremill/tapir\n[odin]: https://github.com/valskalla/odin\n[ciris]: https://github.com/vlovgr/ciris\n\n[image]: https://github.com/users/usommerl/packages/container/package/graalnative4s\n[workflow]: https://github.com/usommerl/graalnative4s/blob/deploy-gcp/.github/workflows/deploy.yaml\n[inspiration]: https://jamesward.com/2020/05/07/graalvm-native-image-tips-tricks/\n[uzhttp]: https://github.com/jamesward/hello-uzhttp\n[docker-stats-monitor]: https://github.com/vasilmkd/docker-stats-monitor\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fusommerl%2Fgraalnative4s","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fusommerl%2Fgraalnative4s","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fusommerl%2Fgraalnative4s/lists"}