April 25, 2024

pixliv

Digitally first class

Deno gets faster Rust calls

[ad_1]

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.

Copyright © 2022 IDG Communications, Inc.

[ad_2]

Source link