The release of the JavaScript platform Deno 1.16 has taken place, designed for isolated execution (without using a browser) of applications written in JavaScript and TypeScript. The project is developed by Node.js creator Ryan Dahl. The platform's code is written in the Rust programming language and is distributed under the MIT license. Ready builds are prepared for Linux, Windows, and macOS.
The project is similar to the Node.js platform and, like it, utilizes the V8 JavaScript engine; however, according to the creator of Node.js, it corrects a number of architectural mistakes of its predecessor and differs from it in the following nuances:
- Using Rust as the primary language, which, according to the developers, reduces the risk of vulnerabilities related to low-level memory operations (buffer overflows, use-after-free, etc.);
- Deno does not use the npm package manager and package.json, offering users module installation by specifying a URL or path to the module. Nevertheless, the project provides several utilities to simplify working with third-party modules;
- Applications run in isolation in sandboxes and do not have access to the network, environment variables, or the file system without explicitly granted permissions;
- The architecture allows for the creation of universal web applications capable of functioning both in the Deno system and in regular browsers;
- The use of ES Modules and the absence of support for require();
- Any unhandled programmer errors in the web application lead to forced termination;
- Support for TypeScript in addition to JavaScript;
- The total size of the ready-to-use platform is 84 MB (31 MB in a zip archive) in the form of a single executable file;
- The package includes a dependency resolution system and code formatting;
- Focus on high-performance applications.
Deno handles requests in a non-blocking mode using the Tokio platform, designed for creating high-performance applications based on an event-driven architecture. Interestingly, the built-in HTTP server of Deno is implemented in TypeScript on top of native TCP sockets, which positively affects the performance of network operations.
The new version features:
- Performance optimization (4 patches);
- Fixing over 15 errors, including now TLS client supporting HTTP/2, the encoding subsystem supporting additional encoding labels, and more.
- More than two dozen innovations, among which are the stabilization of previously testing subsystems Deno.startTls and Deno.TestDefinition.permissions, updating the JS engine V8 to version 9.7, and support for React 17 JSX transformations.
Source: opennet.ru
