vibe.d beta banner
get vibe.d

vibe.d 0.7.27 release

Header image
Tue, 09 Feb 2016 In preparation for a full separation of the individual library components, this release splits up the code logically into multiple DUB sub packages. This enables dependent code to reduce the dependency footprint and compile times. In addition to this and a bunch of further improvements, a lot of performance tuning and some important REST interface additions went into this release.

Note that the integration code for std.concurrency has been re-enabled with this release. This means that you can use std.concurrency without worrying about blocking the event loop now. However, there are a few imcompatibilities between std.concurrency and vibe.d's own version in vibe.core.concurrency, such as std.concurrency not supporting certain shared(T) or Isolated!T to be passed to spawned tasks. If you hit any issues that cannot be easily resolved, the usual vibe.d behavior is available in the form of "Compat" suffixed functions (i.e. sendCompat, receiveCompat etc.). But note that these functions operate on separate message queue structures, so mixing the "Compat" functions with non-"Compat" versions will not work.

Features and improvements

  • Compiles on DMD frontend versions 2.066.0 up to 2.070.0
  • Split up the library into sub packages - this prepares for a deeper split that is going to happen in the next release
  • A lot of performance tuning went into the network and HTTP code, leading to a 50% increase in single-core HTTP performance and a lot more in the multi-threaded case over 0.7.26
  • Marked more of the API @safe and nothrow
  • Re-enabled the std.concurrency integration that went MIA a while ago - std.concurrency can now be used transparently in vibe.d applications - issue #1343, pull #1345
  • REST interface generator changes
  • Added support for REST collections with natural D syntax using the new Collection!I type - pull #1268
  • Implemented CORS support for the REST interface server (by Sebastian Koppe) - pull #1299
  • Conversion errors for path parameters (e.g. @path("/foo/:someparam")) in REST interfaces now result in a 404 error instead of 500
  • HTTP server/client changes
  • The URLRouter now adds a "routerRootDir" entry with the relative path to the router base directory to HTTPServerRequest.params (by Steven Dwy) - pull #1301
  • Added a WebSocket client implementation (by Kemonozume) - pull #1332
  • Added the possibility to access cookie contents as a raw string
  • The HTTP client now retries a request if a keep-alive connection gets closed before the response gets read
  • Added HTTPServerResponse.finalize to manually force sending and finalization of the response - issue #1347
  • Added scope callback based overloads of switchProtocol in HTTPServerResponse and HTTPClientResponse
  • Added ChunkedOutputStream.chunkExtensionCallback to control HTTP chunk-extensions (by Manuel Frischknecht and Yannick Koechlin) - pull #1340
  • Passing an empty string to HTTPClientResponse.switchProtocol now skips the "Upgrade" header validation
  • Enabled TCP no-delay in the HTTP server
  • Redundant calls to HTTPServerResponse.terminateSession are now ignored instead of triggering an assertion - issue #472
  • Added log output for newly registered HTTP virtual hosts - issue #1271
  • The Markdown compiler now adds "id" attributes to headers to enable cross-referencing
  • Added getMarkdownOutline, which returns a tree of sections in a Markdown document
  • Added Path.relativeToWeb, a version of relativeTo with web semantics
  • Added vibe.core.core.setupWorkerThreads to customize the number of worker threads on startup (by Jens K. Mueller) - pull #1350
  • Added support for parsing IPv6 URLs (by Mathias L. Baumann aka Marenz) - pull #1341
  • Enabled TCP no-delay in the Redis client (by Etienne Cimon) - pull #1361
  • Switch the :javascript Diet filter to use "application/json" as the content type - issue #717
  • NetworkAddress now accepts std.socket.AddressFamily constants in addition to the AF_ ones - issue #925
  • Added support for X509 authentication in the MongoDB client (by machindertech) - pull #1235
  • Added TCPListenOptions.reusePort to enable port reuse as an OS supported means for load-balancing (by Soar Qin) - pull #1379

Bug fixes

  • Fixed behavior of ZlibInputStream in case of premature end of input - issue #1116
  • Fixed a memory leak in ZlibInputStream (by Etienne Cimon) - pull #1116
  • Fixed a regression in the OpenSSL certificate validation code - issue #1325
  • Fixed the behavior of TCPConnection.waitForData in all drivers - issue #1326
  • Fixed a memory leak in Libevent2Driver.connectTCP on connection failure (by Etienne Cimon) - pull #1322, issue #1321
  • Fixed concatenation of static and dynamic class attributes in Diet templates - issue #1312
  • Fixed resource leaks in connectTCP for libevent when the task gets interrupted - issue #1331
  • Fixed ZlibInputStream in case of the target buffer matching up exactly with the uncompressed data (by Ilya Lyubimov aka villytiger) - pull #1339
  • Fixed some issues with triggering assertions on yielded tasks
  • Fixed TLS SNI functionality in the HTTP server
  • Fixed excessive CPU usage in the libasync driver (by Etienne Cimon) - pull #1348
  • Fixed exiting multi-thread event loops for the libasync driver (by Etienne Cimon) - pull #1349
  • Fixed the default number of worker threads to equal all logical cores in the system
  • Fixed an assertion failure in the WebSocket server (by Ilya Yaroshenko aka 9il) - pull #1356, issue #1354
  • Fixed a range violation error in InotifyDirectoryWatcher - issue #1364
  • Fixed readUntil to not use the buffer returned by InputStream.peek() after a call to - issue #960
  • Disabled the case randomization feature of libevent's DNS resolver to work around issues with certain servers - pull #1366
  • Fixed the behavior of multiple runEventLoop/exitEventLoop calls in sequence for the win32 driver
  • Fixed reading response bodies for "Connection: close" connections without a "Content-Length" in the HTTP client - issue #604
  • Fixed indentation of :javascript blocks in Diet templates - issue #837
  • Fixed assertion failure in the win32 driver when sending files over TCP - issue #932
  • Fixed exitEventLoop having no effect if called while the event loop is in the idle handler
  • Fixed an assertion failure in the libevent driver when actively closing a connection that is currently being read from - issue #1376
  • Fixed a null-pointer dereference when waitForData gets called on a fully closed TCP connection - issue #1384
  • Fixed a crash at exit caused by a bad module destructor call sequence when std.parallelism.TaskPool is used - issue #1374


Posted at 14:20:30 +0100 by Sönke Ludwig


Andrew Chapman on Thu, 11 Feb 2016, 13:10:30 GMT:

Love it, thanks Sönke.

Commenting is currently disabled for this article.