Skip to content

v0.5.0

Choose a tag to compare

@github-actions github-actions released this 19 May 14:26
· 932 commits to main since this release
0ab7979

πŸŽ‰ Milestone 5 Release: Ballerina Native Interpreter

We're excited to announce Milestone 5 β€” introducing ballerina/http client capabilities and subset 8 language features!

What's included

🌐 HTTP Client Support

Outbound HTTP/HTTPS communication via ballerina/http is now supported:

  • Configuration of http:Client with timeouts, redirects, HTTP versions, and security settings
  • Support for standard methods: get, post, put, patch, delete, head, and execute
  • Response processing via http:Response (headers and JSON, text, or binary payloads)
  • Utility for parsing HTTP headers with http:parseHeader

Example:

import ballerina/http;
import ballerina/io;

final http:Client apiClient = check new ("https://httpbin.org/", {
    timeout: 10
});

public function main() returns error? {
    http:Response res = check apiClient->get("/get?text=Hello%20Ballerina");
    io:println("GET Response Status: ", res.statusCode);
    io:println("GET Response Payload: ", check res.getTextPayload());

    json data = {"message": "HTTP client support is now live!"};
    res = check apiClient->post("/post", data);
    io:println("POST Response JSON Payload: ", check res.getJsonPayload());
    io:println("Post Response Content-Type Header: ", check res.getHeader("Content-Type"));
}

πŸš€ Language Features

Types & Type System

  • Add support for module type definitions and enums
  • Add support for optional record fields and access
  • Add support for mapping constructors
  • Add support for member access expressions
  • Extend support for type casting
  • Support dependently-typed functions with inferred defaults

Functions

  • Add support for included record parameters
  • Add support for rest parameters in methods
  • Add support for isolated functions

Object-Oriented Features

  • Support client and isolated class qualifiers
  • Add support for remote methods and call actions

Control Flow

  • Improve analysis in conditional branches
  • Add support for foreach over iterable objects
  • Extend query expressions with join, order by, and on conflict

Expressions & Operators

  • Add support for XML template namespaces and attributes
  • Add support for bitwise complement and nil lifting

βš™οΈ Runtime

  • Detect inherent type violations during mutations
  • Enforce read-only propagation for collections
  • Fix float semantics and NaN handling

πŸ“¦ Projects & Packages

  • Support resolving external packages and repository implementation

πŸ“š Standard Library

  • Expand lang lib support (error, value, string, xml, int)

πŸ› οΈ Diagnostics & Quality

  • Improve error reporting and migrate conformance tests

πŸ“– Documentation

  • Document subset 8 language features

πŸš€ Download or try it directly in the browser!

πŸ”— Resources