-
Notifications
You must be signed in to change notification settings - Fork 157
Developing ClojureCLR
For development work, you will need the .NET SDK of your choice and whatever C# development tools make you happy.
The repo is at https://github.com/clojure/clojure-clr.
We'll assume you can get the code up in your development environment of choice. Building should be straightforward.
Clojure/Clojure.sln points to the various projects that make up ClojureCLR, all located in the Clojure subdirectory.
- Clojure -- contains the data structures, compiler, runtime support that make up the backbone of the project.
- Clojure.Source -- contains Clojure source such as core.clj that provide the rest of the Clojure environment.
- Clojure.Main -- REPL for .NET 6.0, and .NET 8.0
- Clojure.Main461 -- REPL targeting .NET Framework 4.6.1.
- Clojure.Compile -- program that compiles Clojure source files specified on the command line. Framework 4.6.1 only.
- Clojure.Tests -- contains the Clojure source for tests of the Clojure environment
- Csharp.Tests -- NUnit tests for some of the basic data structures and runtime support.
You can build the solution and run the NUnit tests by any method you like. Running the Clojure tests and performing other tasks is best done via MSBuild. Your working directory should be /Clojure.
MSBuild.exe build.proj -t:<Task> <arguments>
The tasks you should know about:
-t:Build
-t:Rebuild
-
-t:DeepClean
# gets rid of the artifacts that even -
-t:Test -p:TestTargetFramework=X
# whereX
is one ofnet462
,net6.0
, ornet8.0
(default) -- runs most of the Clojure tests -
-t:TestGen -p:TestTargetFramework=X
# whereX
is one ofnet462
,net6.0
, ornet8.0
(default) -- runs the Clojure 'generative' tests
On any of these, you can specify
-p:Configuration=Debug
-p:Configuration=Release
Debug
is the default.
The value for -p:DirectLinking
can be either "true"
or "false"
. This controls whether direct (static) linking is used in the build.
See docs/Preparing-a-release.md
if you want to learn about building Nuget packages or zipfiles for distribution.