Paul Krill
Editor at Large

Deno 1.7 brings compilation improvements

news
Jan 27, 20212 mins

Secure-by-default Node.js alternative now supports cross-compilation among supported platforms and generates significantly smaller binaries.

command line
Credit: Thinkstock

Deno 1.7, the latest version of the JavaScript/TypeScript runtime built to serve as a more secure alternative to Node.js, is highlighted by improved compilation and data URL capabilities.

Published January 19, Deno 1.7 offers features, stabilizations, and improvements to APIs and tools. Installation instructions can be found at deno.land.

Key to the Deno 1.7 release is that deno compile now can cross-compile from any in stable supported architecture, including Windows x64, MacOS x64, and Linux x64, to any other in stable supported architecture. Thus binaries for Windows and MacOS can be created from a single Linux CI machine.

In addition, deno compile now generates binaries that are 40 percent to 60 percent smaller than those produced by Deno 1.6. This feature can be tried out using the --lite flag when compiling an application. A slimmed-down runtime-only Deno binary will be produced instead of the full Deno binary.

Also, deno compile now can produce binaries that have built-in CA certificates, custom V8 flags, locked-down permissions, and pre-populated command line arguments. Other notable features in Deno 1.7 include:

  • Data URLs support, for executing code generated on the fly, has been added in imports, both static and dynamic, and in Web Workers.
  • An unstable Deno.resolveDns API can be used to query DNS records from a DNS resolver.
  • deno fmt now supports formatting Markdown files, including formatting of JavaScript and TypeScript codeblocks in the files.
  • A --location flag has been added to set “document” location for scripts.
  • Three unstable APIs, transpileOnly, Deno.bundle, and Deno.compile, used to interact with Deno’s built-in TypeScript compiler, have been replaced by a single improved function, Deno.emit.

Deno 1.7 follows last month’s Deno 1.6 release, which enabled production of standalone executables and a language server implementing Language Server Protocol. Experimental support for Apple computers running M1 processors support also was featured. Deno 1.0 arrived last May.

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