Core "Us" LibrariesΒΆ

These libraries are maintained by Us (the dk team) to provide core functionality for your scripts. They are stable and can be used in your scripts without additional configuration:

DkCoder_Std

Each script in DkCoder has a structure and overridable defaults defined by DkCoder_Std.

MlFront_Core

The framework that DkCoder uses to perform its build is called "mlfront". MlFront_Core has basic types and values used throughout the build system.

Partitioned Standard Library - 4.14ΒΆ

These libraries are a re-packaging of the OCaml standard library. Tr1Stdlib_V414All is the conventional OCaml "Stdlib" standard library. All the other Tr1Stdlib_V414* packages are a partition of the OCaml standard library: opening all of these packages is equivalent to opening the whole Tr1Stdlib_V414All library.

You have a choice to open either the whole Tr1Stdlib_V414All or open the individual partitions you need. We recommend the individual partitioned packages like Tr1Stdlib_V414Runtime in accordance to the security principle of least privilege and for future compatibility with DkCoder security analysis tools.

Tr1Stdlib_V414All

The conventional Stdlib OCaml standard library.

Tr1Stdlib_V414Base

Modules safe for use on any platform. Also includes safe functions like sqrt.

Tr1Stdlib_V414CRuntime

Modules that need a C99 runtime.

Tr1Stdlib_V414Extras

The types and functions of the Stdlib that are conventionally available to OCaml programs, and helper modules so the OCaml standard library can be used consistently with the rest of the DkCoder libraries:

  • StdExit contains all the program termination types and functions of Stdlib.
  • StdIo contains all the input/output types and functions of Stdlib.
  • StdBinds contains modules that can be opened and used with the ocaml-monadic PPX macros.
Tr1Stdlib_V414Gc

Modules for garbage collection.

Tr1Stdlib_V414Io

Modules for input and output. Can't be used on Android and iOS.

Tr1Stdlib_V414Random

Modules for random numbers.

Tr1Stdlib_V414Threads

Modules to create and coordinate threads. Brings in Tr1Stdlib_V414CRuntime.

Tr1Stdlib_V414Unsafe

Modules that can break type-safety.

Tr1 "Us" LibrariesΒΆ

These libraries are re-packaged 3rd-party libraries that were curated by Us (the dk team). They are liberally licensed and serve as your comprehensive standard library. Each library is subject to change. They can be used in your scripts without additional configuration:

Tr1Angstrom_Std

Parser combinators.

Tr1Bogue_Std

GUI library based on SDL2.

Tr1Bos_Std

Basic input/output.

Tr1Capnp_Std

Cap'n Proto serialization framework.

Tr1Capnp_Unix

Cap'n Proto serialization on Unix-like platforms including Windows.

Tr1Clap_Std

Imperative command-line argument parsing.

Tr1Cmdliner_Std

Declarative command-line argument parsing.

Tr1Fpath_Cmdliner

Command line options for Tr1Cmdliner_Std specifically for Tr1Fpath_Std file path options.

Tr1Fpath_Std

File path operations.

Tr1Htmlit_Std

Simple combinators to generate HTML fragments and pages.

Tr1Http_Std

Types that represent HTTP methods, requests and responses.

Tr1Json_Std

Easy interfaces to read and write JSON.

Tr1Json_Stream

Modules to stream JSON documents without storing them all in memory.

Tr1Json_Yojson2

Alternative parsing and pretty-printing JSON with non-standard extensions.

Tr1Logs_Clap

Command line options for logging and colors in an Tr1Clap_Std-based application that runs on the terminal.

Tr1Logs_Lwt

Command line options for logging and colors in an application that uses cooperative Lwt threading and runs on the terminal.

Tr1Logs_Std

Logging interfaces.

Tr1Logs_Term

Command line options for logging and colors in an Tr1Cmdliner_Std-based application that runs on the terminal.

Tr1Num_Stdint

Standard C-style integer types beyond those provided by OCaml.

Tr1OsCodes_Std

Exit code constants for applications, especially useful when converting Windows codes into text.

Tr1Qrc_Std

QR code encoder.

Tr1Routes_Std

Typed routing combinators for web frameworks.

Tr1SQLite3_Std

An interface to the sqlite3 embedded SQL database.

Tr1Shexp_Std

Deprecated. This is a library for creating possibly parallelized pipelines that represent shell scripts. Works only on 64-bit machines.

Tr1String_Ext

A set of string operations that are not included in the OCaml standard library.

Tr1Tar_LwtUnix

.tar and .tar.gz operations for Unix-like platforms including Windows.

Tr1Tezt_C

Testing framework for native applications.

Tr1Tezt_Core

Testing framework API.

Tr1TinyHttpd_Prometheus

Expose metrics over HTTP in the prometheus format.

Tr1TinyHttpd_Std

Minimal HTTP server using good old threads, with stream abstractions, simple routing, URL encoding/decoding, static asset serving, and optional compression.

Tr1TosCheck_Std

DkSDK terms of service checks.

Tr1Uri_Std

RFC3986-compliant Uniform Resource Identifier handling.

Tr1Uuid_Std

Universally unique identifiers (UUIDs).

Tr1 "Us" MacrosΒΆ

These macros can be used in your scripts without additional configuration:

ppx_deriving.eq
Provides the [@@deriving eq] macro to compare values for equality.
ppx_deriving.ord
Provides the [@@deriving ord] macro to compare values for a total order.
ppx_deriving.show
Provides the [@@deriving show] macro to define pretty printers for values.
ocaml-monadic
Provides let%bind, if%bind and match%bind macros to simplify sequential (monadic) code.