|
This repository gathers Flix code examples coming from various websites. It also includes several build scripts (Ant files, Bash scripts, batch files, Gradle scripts, Make scripts) for experimenting with Flix on a Windows machine. |
Ada, Akka, C++, COBOL, Component Pascal, Dafny, Dart, Deno, Docker, Erlang, Go, GraalVM, Haskell, Kafka, Kotlin, LLVM, Modula-2, MySQL, Node.js, Rust, Scala 3, Spark, Spring, Standard ML, TruffleSqueak, WiX Toolset and Zig are other topics we are continuously monitoring.
☛ Read the document "Did You Know?" from the Flix documentation to know more about the Flix ecosystem.
This project depends on the following external software for the Microsoft Windows platform:
- Apache Maven 3.9 (requires Java 8+) (release notes)
- Flix 0.67 (requires Java 21+) (release notes)
- Git 2.52 (release notes)
- Gradle 9.2 (requires Java 8+) (release notes)
- Temurin OpenJDK 21 LTS (release notes, Shipilev's notes, Java 21 API)
Optionally one may also install the following software:
- Apache Ant 1.10 (requires Java 8) (release notes)
- ConEmu 2023 (release notes)
- Flix nightly builds 1
- mdBook 0.5 2 (changelog)
- MSYS2 2024 (change log)
- Scala 2.13 (release notes)
- Temurin JDK Mission Control 9.1 3 (release notes)
- Visual Studio Code 1.106 (release notes)
☛ Installation policy
When possible we install software from a Zip archive rather than via a Windows installer. In our case we definedC:\opt\as the installation directory for optional software tools (in reference to the/opt/directory on Unix).
For instance our development environment looks as follows (December 2025) 4:
C:\opt\apache-ant\ ( 43 MB) C:\opt\apache-maven\ ( 10 MB) C:\opt\ConEmu\ ( 26 MB) C:\opt\flix\ ( 37 MB) C:\opt\Git\ (393 MB) C:\opt\gradle\ (144 MB) C:\opt\jdk-temurin-21.0.9_10\ (327 MB) C:\opt\jmc\ (109 MB) C:\opt\mdBook\ ( 10 MB) C:\opt\msys64\ (5.5 GB) C:\opt\scala-2.13.18\ ( 25 MB) C:\opt\VSCode\ (381 MB)
Directory structure ▴
This project has the following directory structure :
bin\
docs\
examples\{README.md, areas, arrays, channels, ..}
flix\ (Git submodule)
lutz-examples\{README.md, channels, datalog, etc.}
CHANGES.md
CONTRIBUTIONS.md
BUILD.md
DEPS.md
QUICKREF.md
README.md
RESOURCES.md
setenv.bat
UBUNTU_WSL.md
where
- directory
bin\provides several utility batch files. - directory
docs\contains Flix related papers/articles. - directory
examples\contains Flix code examples (seeREADME.md). - directory
flix\contains our fork of theflix/flixrepository as a Github submodule. - directory
lutz-examples\contains Flix code examples from Lutz Hühnken's article (seeREADME.md). - file
CHANGES.mdgathers language changes. - file
CONTRIBUTIONS.mdpresents ongoing works and contributions to the Flix project. - file
BUILD.mdpresents the Flix build. - file
DEPS.mdlists library dependencies of published Flix distributions. - file
QUICKREF.mdgathers Flix language features. - file
README.mdis the Markdown document for this page. - file
RESOURCES.mdgathers Flix related documents. - file
setenv.batis the batch script for setting up our environment. - file
UBUNTU_WSL.mdpresents a Flix code examples in Ubuntu WSL.
Bash/Batch commands ▴
We distinguish different sets of batch commands:
-
setenv.bat– This batch command makes external tools such asgit.exeandgradle.batdirectly available from the Windows command prompt (see section Project dependencies).> setenv help Usage: setenv { <option> | <subcommand> } Options: -debug print commands executed by this script -verbose print progress messages Subcommands: help print this help message
-
examples\*\build.bat– Code examples can be built/run/tested using thebuild.batcommand.> build Usage: build { <option> | <subcommand> } Options: -debug print commands executed by this script -nightly use latest Flix nightly build if locally available -verbose print progress messages Subcommands: clean delete generated files compile generate program executable help print this help message run execute the generated program "areas" test run the unit tests
-
examples\*\build.gradle– Code examples can be built/run/tested using thegradle.batbuild tool. -
examples\*\build.sh– Code examples can be built/run/tested using thebash.exescripting tool.> sh build.sh help Usage: build.sh { <option> | <subcommand> } Options: -debug print commands executed by this script -nightly select latest Flix nightly build if locally available -verbose print progress messages Subcommands: clean delete generated files compile compile Flix source files decompile decompile generated code with CFR help print this help message run execute Flix program "areas" test run the unit tests
Usage examples ▴
We execute command setenv.bat once to setup our development environment; it makes external tools such as git.exe, gradle.bat, make.exe and sh.exe directly available from the command prompt:
> setenv Tool versions: java 21.0.9, javac 21.0.9, scalac 2.13.18, flix 0.67.1, gradle 9.2.1, make 4.4.1, mdbook v0.5.1, mvn 3.9.11, git 2.52.0, diff 3.12, bash 5.2.37(1) > where git gradle make sh C:\opt\Git\bin\git.exe C:\opt\Git\mingw64\bin\git.exe C:\opt\gradle\bin\gradle C:\opt\gradle\bin\gradle.bat C:\opt\make-3.81\bin\make.exe C:\opt\Git\bin\sh.exe C:\opt\Git\usr\bin\sh.exe
Command setenv.bat with option -verbose displays additional information:
- the download of the Flix nightly build to directory
%FLIX_HOME%(if not yet done), - the tool paths (which may not contain the version suffix, i.e.
C:\opt\Git\bin\git.exein some installations), - the environment variables defined locally within this session,
- and the path associations (i.e.
F:\in this case, but other drive names may be displayed as path associations are globally defined).
> setenv -verbose Assign path C:\Users\michelou\workspace-perso\flix-examples to drive F: Download file "flix-2025-12-06.jar" to directory "C:\opt\flix" Tool versions: java 21.0.9, javac 21.0.9, scalac 2.13.18, flix 0.67.1, gradle 9.2.1, make 4.4.1, mdbook v0.5.1, mvn 3.9.11, git 2.520.0, diff 3.12, bash 5.2.37(1) Tool paths: C:\opt\jdk-temurin-21.0.9_10\bin\java.exe C:\opt\jdk-temurin-21.0.9_10\bin\javac.exe C:\opt\scala-2.13.18\bin\scalac.bat C:\opt\gradle\bin\gradle.bat C:\opt\make-3.81\bin\make.exe C:\opt\mdBook\mdbook.exe C:\opt\apache-maven\bin\mvn.cmd C:\opt\Git\bin\git.exe C:\opt\Git\usr\bin\diff.exe Environment variables: "ANT_HOME=C:\opt\apache-ant" "CFR_HOME=C:\opt\cfr-0.152" "FLIX_HOME=C:\opt\flix" "GIT_HOME=C:\opt\Git" "GRADLE_HOME=C:\opt\gradle" "JAVA_HOME=C:\opt\jdk-temurin-21.0.9_10" "JAVA17_HOME=C:\opt\jdk-temurin-17.0.17_10" "JMC_HOME=C:\opt\jmc" "MAKE_HOME=C:\opt\make-3.81" "MAVEN_HOME=C:\opt\apache-maven" "MDBOOK_HOME=C:\opt\mdBook" "MSYS_HOME=C:\opt\msys64" "SCALA_HOME=C:\opt\scala-2.13.18" Path associations: F:\: => %USERPROFILE%\workspace-perso\flix-examples
Footnotes ▴
[1] Flix nightly builds ↩
-
Our installation directory
%FLIX_HOME%looks as follows on December 6, 2025 :> tree /a /f c:\opt\flix | tail -n +3 C:\opt\flix flix-2025-12-06.jar flix.jar
Commandbuild.batin our Flix projects features the-nightlyoption to choose the latest Flix nightly build archive file locally available instead of the release version (archive fileflix.jarabove).
[2] mdBook ↩
-
We use
mdbook.exeto work on our local copy of the online book "Programming Flix" generated from the GitHub projectflix/book.
[3] JDK Mission Control ↩
- Each vendor provides his own distribution of the JDK Mission Control tool, e.g. Adoptium JDK Mission Control (our choice), Zulu Mission Control, Liberica Mission Control or Oracle JDK Mission Control.
-
We use
jmc.exeto investigate issues occuring during the build of our GitHub fork of theflix/flixrepository.> %JMC_HOME%\bin\jmc.exe -vm %JAVA_HOME%\bin
[4] Downloads ↩
- In our case we downloaded the following installation files (see section 1):
-
apache-ant-1.10.15-bin.zip ( 9 MB) apache-maven-3.9.11-bin.zip ( 9 MB) ConEmuPack.230724.7z ( 5 MB) flix.jar ( 39 MB) flix-2025-11-06.jar ( 39 MB) gradle-9.2.1-bin.zip (128 MB) mdbook-v0.5.1-x86_64-pc-windows-msvc.zip ( 4 MB) msys2-x86_64-20240727.exe ( 94 MB) org.openjdk.jmc-9.1.1-win32.win32.x86_64.zip ( 90 MB) OpenJDK21U-jdk_x64_windows_hotspot_21.0.9_10.zip (195 MB) PortableGit-2.52.0-64-bit.7z.exe ( 61 MB) scala-2.13.18.zip ( 22 MB) VSCode-win32-x64-1.106.3.zip (148 MB)
