Paul Krill
Editor at Large

Deno gets faster Rust calls

news
Mar 18, 20222 mins

The JavaScript/TypeScript runtime features optimization for the communication layer.

abstract tunnel showing speed and motion and connectivity
Credit: thinkstock

Faster calls into Rust are highlighted in the latest version of the Deno secure JavaScript/TypeScript runtime, improving performance.

The Rust enhancement pertains to communication between the Google V8 JavaScript engine leveraged by Deno and the rest of the runtime, which was written in the Rust language. With Deno 1.20, announced March 17, proponents have optimized the communication layer to be as much as 60% quicker, leveraging Rust procedural macros to generate optimized bindings for V8 from existing Rust code. The macro optimizes away deserialization of unused arguments, speeds up metric collection, and provides a base for future integration with the V8 Fast API to further boost performance between JavaScript and Rust.

Those with Deno already installed can upgrade by running the following:

deno upgrade

Other installation instructions can be found at deno.land. Elsewhere in Deno 1.20:

  • Deno’s HTTP server now supports auto-compression for response bodies.
  • Stricter defaults are featured in programmatic permissions for tests and workers. This is a breaking change.
  • To upgrade an HTTP connection, a Deno namespace API was added: Deno.upgradeHTTP(). It is unstable at the moment.
  • A subcommand, deno task, has been added. This serves as a task runner, providing a convenient way of defining and executing custom commands specific to the development of a code base. But deno task, too, currently is unstable and could change drastically in the future.
  • Another subcommand, deno bench, serves as a benchmarking tool to check code performance. It also is unstable.
  • Global statics now can be used in the foreign function interface API.
  • New interfaces, Deno.TcpConn and Deno.UnixConn, can be used as return types for Deno.connect() API.
  • TypeScript 4.6 ships with Deno 1.20.
  • V8 10.0 is supported.
Paul Krill

Paul Krill is editor at large at InfoWorld. Paul has been covering computer technology as a news and feature reporter for more than 35 years, including 30 years at InfoWorld. He has specialized in coverage of software development tools and technologies since the 1990s, and he continues to lead InfoWorld’s news coverage of software development platforms including Java and .NET and programming languages including JavaScript, TypeScript, PHP, Python, Ruby, Rust, and Go. Long trusted as a reporter who prioritizes accuracy, integrity, and the best interests of readers, Paul is sought out by technology companies and industry organizations who want to reach InfoWorld’s audience of software developers and other information technology professionals. Paul has won a “Best Technology News Coverage” award from IDG.

More from this author