Skip to content

0.9.6

Compare
Choose a tag to compare
@dhil dhil released this 28 Feb 18:48
· 81 commits to master since this release

CHANGES:

This release extends the core features of Links and resolves various
minor bugs.

  • Links now supports System F-style explicit type abstractions:
    For instance, writing /\ [a, e::Row] { foo } abstracts the expression foo
    over type variable a and row variable e. Here, foo must have a unique
    type and must be pure (to satisfy the value restriction).

  • Fixed a bug in "mixing" query normalisation, which prevented certain queries using
    concatenation inside for statements from being correctly converted to SQL.

  • Links now has basic support for temporal database operations. More information
    can be found on the Wiki.
    There are new keywords: valid, to, vt_insert, tt_insert, and TemporalTable.

  • A new commandline option --compile (shorthand -c) has been
    added, which runs Links in a "compile only" mode. In this mode the
    JavaScript compilation artefact can be saved to a file (the naming
    of this file is controlled via the commandline option -o). Note
    that the generated file may not be directly runnable without linking
    the runtime system first. Currently, the runtime system must be
    linked manually.

  • Fixed a bug where calling either of newAP, newClientAP, and
    newServerAP on the client-side would crash the client.

  • It is now possible to dispatch an MVU message from outside of the
    event loop. This is particularly useful, for example, when dealing
    with a persistent, stateful thread which is receiving messages from
    a server. New things include:

    • A new type alias MvuHandle(msg).
    • A family of runners: runHandle, runCmdHandle,
      runSimpleHandle which return an MvuHandle(msg) rather than the
      unit value.
    • A new dispatcher Mvu.dispatch : (msg, MvuHandle(msg)) ~> (),
      which directly dispatches a message to the MVU loop.
  • The built-in webserver now supports SSL connections. To enable
    secure connections, you must first obtain an adequate certificate
    and key, e.g. via Let's Encrypt or a self-signed certificate. The
    latter can be useful for testing, e.g. the following command starts
    an interactive process to create a self-signed certificate (that
    uses 4096 bits RSA encryption and is valid for 365 days):

openssl req -x509 -newkey rsa:4096 -keyout server.key -out server.crt -days 365 -nodes

After obtaining a valid certificate, you must tell Links to run in SSL
mode and you must also tell it how to locate the key and crt
file. This can be done via a configuration file, e.g.

# ssl.config
ssl=true
ssl_cert_file=server.crt
ssl_key_file=server.key

Then running ./links --config=ssl.config <file.links> will cause
the webserver to only serve requests via https.

When a webpage is served via https, then the websocket layer will
automatically communicate via the wss protocol.

  • Other various bug fixes.