https://github.com/alexsugak/uniclojure
Universal clojure code used on multiple platforms
https://github.com/alexsugak/uniclojure
clojure cross-platform dotnet-core java node-js
Last synced: 10 months ago
JSON representation
Universal clojure code used on multiple platforms
- Host: GitHub
- URL: https://github.com/alexsugak/uniclojure
- Owner: AlexSugak
- Created: 2022-05-23T07:52:24.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-05-23T08:09:52.000Z (over 3 years ago)
- Last Synced: 2025-01-22T20:51:30.396Z (12 months ago)
- Topics: clojure, cross-platform, dotnet-core, java, node-js
- Language: Clojure
- Homepage:
- Size: 190 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
# Universal Clojure
At some point in your life you will want to write code once and use it on multiple platforms.
**DON'T DO THIS!**
But if you must, Clojure, as a universal language, is a good choice.
This repo provides an example of a simple library code, written in Clojure, that is used on multiple platforms:
- Java: being a JVM hosted language in the first place, it is possible to call Clojure functions from Java code
- Node.JS: using [ClojureScript](https://clojurescript.org/) to transpile Clojure code to node package
- **TODO:** Browser: using [ClojureScript](https://clojurescript.org/) to transpile Clojure code to modern JS
- .NET Core: using [ClojureCLR](https://github.com/clojure/clojure-clr) to host Clojure on .NET runtime
- **TODO:** .NET Framework: using [ClojureCLR](https://github.com/clojure/clojure-clr) to build .dll from clojure files
- C/ObjC: using [clojurem](https://github.com/joshaber/clojurem) to transpile Clojure code to Objective C
- **TODO:** C/ObjC: test [clojure-objc](https://github.com/galdolber/clojure-objc) and [clojurec](https://github.com/schani/clojurec)
- **TODO:** Add scripting with [babashka](https://github.com/babashka/babashka) sample
- **TODO:** Native binary via [GraalVM](https://github.com/clj-easy/graal-docs)
## Getting started
- `$ make deps` to install dependencies. If that fails on your machine (it probably will), use corresponding target definition in Makefile to see what needs to be installed and why
- `$ make all` to build and run all samples
- `$ make help` to list all available targets