ClojureDart is a port of the Clojure language to Dart.
Its primary goal is to leverage Dart and Flutter to extend Clojure's reach to mobile and desktop apps.
ClojureDart is a work-in-progress but it's good enough for the bravest Clojurists to put in in production. Learn more about what's going on.
Tensegritics, an itty-bitty Clojure consultancy by Baptiste Dupuch🐦 and Christophe Grand🐦.
ClojureDart is not a revenue source for us, even if we build it for fun and hopefully profit -- by being the proverbial rising tide which lifts all boats.
Sponsorships to either of us are welcome. Sponsorship money allowed us to have an intern on the project writing samples and producing videos.
Here be Dragons!
Let's repeat it: ClojureDart is a work-in-progress. Some features may be outright missing or partially implemented or even bugged. In any case get in touch with us on Clojurians #ClojureDart channel) or open an issue.
Most notable missing bits are:
- no REPL yet
- multi-method (WIP)
- sorted-collection (WIP)
Some differences have been documented, see Differences with Clojure.
- For Flutter to build GUIs
- For Plain Dart to build CLI apps.
In the samples directory you'll find sample code either original or ports of Flutter recipes.
Clone the ClojureDart repo.
git clone https://github.com/Tensegritics/ClojureDart.git
Go to the sample you want to try, let's say fab
:
cd ClojureDart/samples/fab
Init the project:
clj -M:cljd init
Then launch the watcher:
clj -M:cljd flutter
You should get the sample running either in Chrome or as a desktop app.
To specify your exact target you must run flutter devices
which outputs something like:
3 connected devices:
iPhone 6s (mobile) • D6707352-78D2-46BB-AB95-87355283FC82 • ios •
com.apple.CoreSimulator.SimRuntime.iOS-15-5 (simulator)
macOS (desktop) • macos • darwin-arm64 •
macOS 12.4 21F79 darwin-arm
Chrome (web) • chrome • web-javascript •
Google Chrome 103.0.5060.114
The second column is the id of the target (here D6707352-78D2-46BB-AB95-87355283FC82
, macos
or chrome
) that you pass to the watcher:
clj -M:cljd flutter -d D6707352-78D2-46BB-AB95-87355283FC82
Enjoy! 🧃
cljd.flutter.alpha
is an utility namespace to remove Flutter boilerplate and integrate it a bit more with Clojure.
To all individuals who blindly believed in our endeavor and sponsored our work.
To NuBank who approached us very early for sponsorship.
To Roam Research who bet their mobile apps development (now in the App Store and Play Store) on ClojureDart and allowed us to make steady progress since Summer 2021.
If you want to sponsor our work, you can sponsor either of us, we'll balance sponsorship. If you are a company you can also contact us directly.