Skip to content
David Miller edited this page Aug 22, 2022 · 3 revisions

Getting started

There are distinct ways of getting started for .Net Core 3.1 and .Net 5/6 versus .Net Framework 4.6.2 (and later).

Getting an executable (REPL) for .Net Core 3.1, .Net 5.0, and .Net 6.0

You can either get a zip from Sourceforge with all the code you need or install ClojureCLRE as a dotnet tool.

Installing ClojureCLR as a dotnet tool

There is a Nuget package of Clojure.Main as an installable tool. Tools can be installed globally or locally. I'll discuss global installation here.

dotnet tool install --global Clojure.Main

If you are installing a pre-release version (or want an older version) you will need to provide the version explicitly, e.g.,

dotnet tool install --global --version 1.11.0-alpha1 Clojure.Main dotnet tool install --global --version 1.11.0-beta1 Clojure.Main

as appropriate.

Then you can start the REPL via:

Clojure.Main

(Case-sensitive on *nix systems, apparently.)

See Tutorial: Install and use a .NET global tool using the .NET CLI and Tutorial: Install and use a .NET local tool using the .NET CLI for more details on installing, updating, local vs global, etc. for dotnet tools.

Installing ClojureCLR from a zip:

From https://sourceforge.net/projects/clojureclr/, download the appropriate version for the desired framework, e.g.,

clojure-clr-1.10.0-Release-netcoreapp3.1.zip
clojure-clr-1.10.0-Release-net5.0.zip clojure-clr-1.10.0-Release-net6.0.zip

Unzip it somewhere, put that place in your path if you like. You can start the REPL via either one of:

Clojure.Main.exe -- this is a Windows-only executable
dotnet Clojure.Main.dll -- should work in all platforms

Note that there is no Clojure.Compile.exe for these frameworks.

Getting an executable (REPL) for .Net Framework (4.6.2 and later)

From https://sourceforge.net/projects/clojureclr/, download the appropriate version for the desired framework, e.g.,

clojure-clr-1.10.0-Release-net4.6.2.zip

Unzip it somewhere, put that in your path if you like. You can run either of

Clojure.Main461.exe
Clojure.Compile.exe -- compiles the clj files on the command line.

Project development

If you want only library support in the form of Clojure.dll and supporting files, say as dependency for C#/F# project, you can just download the Nuget package for Clojure. [https://www.nuget.org/packages/Clojure/]. Clojure.dll and related are targeted for netstandard2.0 and netstandard2.1 and so should run on .Net Framework 4.6.1 and above, .Net Core 3.1, .Net 5.0, and .Net 6.0.

(Unlike past distributions before 1.10, this package no longer has Clojure.Main.exe and Clojure.Compile.exe in a tools subdirectory that you have to move around. See above for getting a REPL.)