Introduction¶
dk
is a standalone binary that runs scripts and (optionally) cross-compiles those scripts to standalone executables:
- a "script" is a file containing source code that can be run directly from the command line. Common examples include
.bat
batch files,.sh
shell scripts and.py
Python modules. - a standalone executable is a native executable (a
.exe
file on Windows) that requires nothing more than standard system libraries
Running and cross-compiling scripts with dk
solves the problem of README-itis: you give your users a lengthy README document, your users fail to setup your software, and you lose a user forever.
Think of dk
as a Python interpreter, but using a different language (OCaml) and having the ability to create executables from your scripts that you can deploy to other machines and operating systems.
Experienced developers, please start at the Quick Tour. Students, you should have a teacher or a mentor guide you through the Quick Walkthrough; once to get you familiar with what dk
can do, and once more to give you an explanation of what is happening.
Developers who are ready to script with dk
should explore the dk Runtime to check which versions of Windows , macOS
, and Linux
are supported for your users.
Developers who are writing scripts should first consult dk Parties for how to organize your scripts in a project, and then keep a copy of the dk Libraries and dk Macros reference manuals open while editing their scripts.
Intermediate and advanced OCaml users will want to read the Coming From OCaml guide.
If you need to web search for dk
, use the full product name: DkCoder.
Examples¶
dk
powers the student developer experience, and some dk
scripts are cross-compiled into the data layer (ie. embedded as a shared
library) in its Android app.