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!