[ANN] v0.16 release of Jane Street packages

Dear OCaml developers,

We are pleased to announce the v0.16 release of Jane Street packages!

This release comes with 33 new packages and a plethora of new features, fixes, and enhancements.

The remainder of this post highlights the main changes since the v0.15
release.

Release-wide changes

Switch to OCaml 4.14

We are switching Base and all our packages, except sexplib0, to OCaml 4.14 and above.

Previously, Base supported the four latest OCaml versions. The prime reason for it was to ensure that a single ppxlib release would work across multiple compilers. However, ppxlib now depends solely on sexplib0, not Base.

Meanwhile, we are making a considerable effort to integrate the latest OCaml features. We’ve already added features like the In_channel module from the 4.14 standard library to Base, and we’re working on switching to the 5.0 compiler internally.

As a result, we decided to remove the strict requirement for Base’s backward compatibility. Instead, we hope to provide a more comprehensive Stdlib replacement and better testing for recent compiler versions. We plan to eventually add support for OCaml 5 primitives in Base, starting with releases v0.17 or v0.18.

32-bit platform support

As stated previously, we are no longer testing on 32-bit platforms. That said, we expect that our packages will mostly continue to function on 32-bit, and we strive to maintain compatibility. In particular, we will keep responding to bug reports and accepting 32-bit compatibility patches. We’re also hoping that Tarides’ work in this area will improve the testing of our packages across many platforms, including 32-bit bytecode.

Deprecation of Caml in favor of Stdlib

We are deprecating our Caml alias for the OCaml standard library, in favor of using the default module, Stdlib. This allows writing code that references the standard library regardless of whether Base is opened or not.

Local allocations

We’ve included annotations for local allocations in our public release code; however, these annotations are not recognized by the stock OCaml compiler. More information on local allocations can be found in our blog post at Jane Street Tech Blog - Oxidizing OCaml: Locality.

For those interested in experimenting with local allocations, our OCaml fork with local allocation support can be found here. Please be aware that this is highly experimental and not guaranteed to function outside of Jane Street.

Future plans

Shadowing Stdlib

We plan to stop shadowing Stdlib in Base. We also plan to add a flag to Dune to enable -nopervasives during compilation, which prevents Stdlib from being opened automatically. The previous practice of shadowing Stdlib in Base has caused issues, and we hope this new approach will prove more resilient.

OCaml extensions

We intend to create an experimental Opam repository with our internal compiler for a more straightforward setup. This will allow users to experiment with our new language extensions before they are integrated into mainstream OCaml.

At present, we convert our native syntax for OCaml extensions into annotations. However, once we transition to the experimental repo, we will release the unmodified code featuring the preferred local_ syntax.

Many, many other changes

Since our last release, we have focused on delivering improved changelogs for our users, and we plan to maintain these efforts moving forward. Most of our libraries now include changelog files that outline changes since the v0.15 release. Browse our GitHub repositories and access the respective CHANGES.md files for more information.

For examples, see changelogs for Base and Async_kernel.

New packages

base_trie – trie data structure library for Base.

bidirectional_map – a library for bidirectional maps and multimaps.

content_security_policy – a library for building content-security policies for the Web.

cpuid – a library for parsing CPU capabilities from the cpuid instruction.

csv – tools for working with CSVs on the command line

dedent – a library for improving the readability of multi-line string constants in code.

diffable – an interface for diffable data structures.

env_config – a helper library for retrieving configuration from an environment variable.

hardcaml_axi – Hardcaml AXI interface types.

hardcaml_c – Hardcaml C simulation backend.

hardcaml_handshake – Hardcaml handshake component.

indentation_buffer – a library for building strings with indentation.

jane_rope – string representation with cheap concatenation.

js_of_ocaml_patches – additions to js_of_ocaml’s standard library that are required by Jane Street libraries.

lru_cache – an LRU Cache implementation for Core.

man_in_the_middle_debugger – a man-in-the-middle debugging library for Async readers and writers.

n_ary – a library for N-ary datatypes and operations, generalizing enumerations, variants, tuples, and lists.

numeric_string – a comparison function that sorts numeric fragments of strings according to their numeric value.

of_json – a friendly applicative interface for Jsonaf.

ordinal_abbreviation – a minimal library for generating ordinal names of integers.

polling_state_rpc – an RPC which tracks the state on the client and server so it only needs to send diffs across the wire.

ppx_demo – a PPX that exposes the source code string of an expression/module structure.

ppx_derive_at_runtime – defining a new PPX deriver by naming a runtime module.

ppx_globalize – a PPX rewriter that generates functions to copy local values to the global heap.

ppx_stable_witness – a PPX extension for deriving a witness that a type is intended to be stable.

ppx_tydi – let expressions inferring pattern type from expression.

regex_parser_intf – interface shared by Re_parser and Re2.Parser

re_parser – typed parsing using regular expressions.

semantic_version – semantic versioning data structure.

stored_reversed – a library for representing a list temporarily stored in reverse order.

streamable – a collection of types suitable for incremental serialization.

tilde_f – provides a let-syntax for continuation-passing style.

torch – we are taking over the development of ocaml-torch from Laurent Mazare. Many thanks to him for his original work!

26 Likes

Thank you @dkalinichenko for your splendid job as a release manager pushing all these out to opam! It’s always a big job with so many Jane Street packages, so I appreciate your attention to detail with all the various constraints that needed to put into the opam packages to ensure compatibility.

If anyone notices any glitches in the opam matrix with their builds failing, please do open an issue on opam-repository.

5 Likes

I cannot find the new packages dedent, base_trie, jane_rope, … in the opam packages.

These ones?

@yawaramin Sorry, there has been a time lag. Now these packages appear in the opam package manager.

I noticed that the OCaml.org documentation disappeared for the v0.16.* family of packages (example, whereas v0.15.1 is still there). Is this due to some change in the packages themselves or a bug in OCaml.org/somewhere else?

Unfortunately the documentation build is failing for the v0.16.* family of packages. We are looking into it.

1 Like