{"id":15634935,"url":"https://github.com/borkdude/clojure-rust-graalvm","last_synced_at":"2025-04-15T01:40:35.399Z","repository":{"id":142283239,"uuid":"242423389","full_name":"borkdude/clojure-rust-graalvm","owner":"borkdude","description":"An example of Clojure program calling a Rust library, all combined into one executable using GraalVM.","archived":false,"fork":false,"pushed_at":"2020-03-02T13:42:25.000Z","size":24,"stargazers_count":138,"open_issues_count":0,"forks_count":6,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-03-28T13:38:37.178Z","etag":null,"topics":["clojure","graal-native","graalvm","jni","rust","rust-lang"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"epl-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/borkdude.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},"funding":{"github":"borkdude"}},"created_at":"2020-02-22T22:54:58.000Z","updated_at":"2025-03-21T01:43:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"28b4bd7e-10a7-4025-9de1-85ab59ed4232","html_url":"https://github.com/borkdude/clojure-rust-graalvm","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/borkdude%2Fclojure-rust-graalvm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/borkdude%2Fclojure-rust-graalvm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/borkdude%2Fclojure-rust-graalvm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/borkdude%2Fclojure-rust-graalvm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/borkdude","download_url":"https://codeload.github.com/borkdude/clojure-rust-graalvm/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248991179,"owners_count":21194890,"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":["clojure","graal-native","graalvm","jni","rust","rust-lang"],"created_at":"2024-10-03T10:59:20.772Z","updated_at":"2025-04-15T01:40:35.383Z","avatar_url":"https://github.com/borkdude.png","language":"Rust","funding_links":["https://github.com/sponsors/borkdude"],"categories":[],"sub_categories":[],"readme":"# clojure-rust-graalvm\n\nAn example of Clojure program calling a Rust library, all combined into one executable using GraalVM.\nIt gets the amount of free memory via the\n[heim-rs](https://github.com/heim-rs/heim) library and prints it in EDN format.\n\nThis repo is an adapted example of what is described in the README of the Rust\n[jni](https://docs.rs/jni/0.14.0/jni/) library.\n\nIn `clojure/src-java` there is a Java static method which calls a Rust function\nvia JNI. We call this static method from Clojure.\n\n## Usage\n\n``` shell\n$ time ./clojure-rust megabyte\n{:memory/free [:megabyte \"1210\"]}\n./clojure-rust megabyte   0.01s  user 0.01s system 34% cpu 0.027 total\n```\n\nAccepted options: `byte`, `megabyte`, `gigabyte`.\n\n## Build\n\nPrerequisites:\n\n- Download [GraalVM](https://www.graalvm.org/downloads/) and set `GRAALVM_HOME`\n- Install [lein](https://github.com/technomancy/leiningen)\n- Install [cargo](https://doc.rust-lang.org/cargo/getting-started/installation.html)\n\nRun `script/compile` to build the Rust lib, the Clojure uberjar and the GraalVM executable.\n\nFinally, run the executable:\n\n``` shell\n$ target/clojure-rust\n{:memory/free [:byte \"896126976\"]}\n```\n\n## License\n\nCopyright © 2020 Michiel Borkent\n\nDistributed under the EPL License, same as Clojure. See LICENSE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fborkdude%2Fclojure-rust-graalvm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fborkdude%2Fclojure-rust-graalvm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fborkdude%2Fclojure-rust-graalvm/lists"}