MacMusic  |  PcMusic  |  440 Software  |  440 Forums  |  440TV  |  Zicos
ktor
Recherche

JetBrains’ Ktor adds CLI for simpler project creation

jeudi 13 février 2025, 23:46 , par InfoWorld
JetBrains’ Ktor 3.1.0, an update to the Kotlin-based framework for asynchronous server-side and client-side applications, is now available, featuring a command-line tool for simpler creation of projects. The update also brings new features to server-sent events (SSE), which allow a server to continuously push events to a client over HTTP.

The 3.1.0 version, described by JetBrains as a minor release, was unveiled February 13. Instructions on getting started with Ktor can be found at ktor.io.

The new Ktor CLI tool offers an easy-to-use interface to generate project templates with the user’s preferred features, reducing boilerplate and setup times, JetBrains said. Running the ktor new command opens an interactive mode that allows the user to choose plugins and configure a project using the same options available in the Ktor Project Generator at start.ktor.io.

Also in Kotlin 3.1.0, server-side events (SSE) support has been upgraded with built-in serialization for both client and server, enabling them to handle SSE streams with automatic serialization and deserialization. SSE support now includes the ability to specify a heartbeat event to keep a session active, and the ability to enable a reconnection feature by setting the maxReconnectionAttempts property to a value greater than zero. If the client’s connection to the server is lost, it will wait for a specified reconnectionTime, then make maxReconnectionAttempts to reestablish the connection.

Elsewhere in Ktor 3.1.0:

The CIO engine has been expanded to support wasm-js and js targets for both the server and client side. This makes CIO the first server-side JavaScript engine for Ktor.

HttpClient has improved support for multipart requests, to make it easier to upload files and handle complex request bodies across different engines.

To improve the API and docs process, a “Report a Problem” link for every API symbol has been made available both in the IDE’s help section and on api.ktor.io.

The Compression plugin can be disabled for a specific request.

Ktor now backs Unix domain sockets on native targets, enabling inter-process communication without relying on TCP.

Beginning with Ktor 3.1.0, the Curl client engine is statically linked, eliminating the need to install third-party dependencies. This makes it easier to use Curl-based networking. Also, Arm architecture support has been added, including for macOS.

JetBrains also has introduced Ktor Library Improvement Proposals (KLIP), an initiative for the community to propose, discuss, and collaborate on new features and improvements for Ktor. The repository for KLIP is open for contributions. Everyone can participate in discussions or submit new proposals. Approved KLIPs are merged into the repository and will be implemented in the framework by the team.

Ktor 3.1.0 follows the October 2024 release of Ktor 3.0, which introduced support for SSE, brought WebAssembly support to the Ktor client, and switched to the kotlinx.io library.
https://www.infoworld.com/article/3824315/jetbrains-ktor-adds-cli-for-simpler-project-creation.html

Voir aussi

News copyright owned by their original publishers | Copyright © 2004 - 2025 Zicos / 440Network
Date Actuelle
sam. 22 févr. - 12:33 CET