[ANN] Base, Stdio and Jbuilder 0.1.alpha1

37 views
Skip to first unread message

Jeremie Dimino

unread,
Dec 4, 2016, 2:58:46 AM12/4/16
to caml...@inria.fr, ocaml...@googlegroups.com
I am pleased to announce the first alpha release of the Base library.

Base is a standard library for OCaml. It is not an extension but
rather a wholesale replacement of the standard library distributed
with the OCaml compiler. In particular, it makes different choices and
doesn't re-export features that are not fully portable such as I/O,
which are left to other libraries.

This release is not production ready, several things are still missing
and some APIs will change before the first release. However, all the
features we wanted to include to ensure that Base is a serious
alternative to the standard library are now setup and working.

Most of these features concern the build of Base:

1. Base has zero dependencies, except for its build system. In
particular, it doesn’t require ppx rewriters and builds without
make or even bash. This is true for both release tarballs and for
the git repository itself

2. Base doesn't use module packs, instead it uses module aliases. This
means that if you link against Base you will link against only the
subset of modules that is needed

3. The layout of the code base is the one you would expect,
i.e. Base.String is implemented in src/string.ml

The roadmap for the first stable release is described in the README of
Base.

Along with Base, we are releasing two new packages: Stdio and
Jbuilder. Base aims to be fully portable and therefore doesn't provide
I/O functions. These are re-exported from the OCaml standard library
as the Stdio library.

Jbuilder is a build system that interprets the jbuild file format used
at Jane Street to describe libraries and executables. It is intended
as a release build system; it has zero dependencies outside of the
OCaml compiler and aims to be fast and portable. The long term goal is
to be able to use the same rules with both Jbuilder and Jenga, so that
one can develop comfortably with Jenga and release with Jbuilder.

Base, Stdio and Jbuilder are in the main opam repository and their
code is available on github:

- https://github.com/janestreet/base
- https://github.com/janestreet/stdio
- https://github.com/janestreet/jbuilder

Note that the development versions of Jane Street packages currently
don't build against Base 0.1.alpha1. They will be updated next week.

--
Jeremie

Malcolm Matalka

unread,
Dec 4, 2016, 10:26:53 AM12/4/16
to Jeremie Dimino, caml...@inria.fr, ocaml...@googlegroups.com
What's the relationship between Base and Core? is this another std
library in the mix or does it replace Core as a stdlib alternative?

Jeremie Dimino

unread,
Dec 4, 2016, 6:07:56 PM12/4/16
to Malcolm Matalka, caml...@inria.fr, ocaml...@googlegroups.com
On Sun, Dec 4, 2016 at 4:26 PM, Malcolm Matalka <mmat...@gmail.com> wrote:
> What's the relationship between Base and Core? is this another std
> library in the mix or does it replace Core as a stdlib alternative?

Core is a richer stdlib that supersedes Base. More precisely,
Core_kernel supersedes Base and Core supersedes Core_kernel.
Core_kernel adds bin_prot as well as some other features that are not
necessarily as general purpose than what is in Base. Core adds less
portable features and depends on Unix.

But the main difference between Base and Core_kernel is that Base
comes first in the dependency graph. In particular, we can't use
Core_kernel in sexplib, bin_prot or any ppx rewriter used in
Core_kernel. As a result we end up reimplementing the same functions
over and over again. Moreover improvements to Core_kernel don't
benefit sexplib or bin_prot. Now everything has the same base.

Given that Base has much less dependencies than Core_kernel, it should
also be more attractive to people who want to keep a low number of
dependencies.

--
Jeremie
Reply all
Reply to author
Forward
0 new messages