Skip to content

Releases: by-nir/aws-lambda-zig

0.4.0

19 Aug 17:44
Compare
Choose a tag to compare
  • Upgraded to Zig 0.15.0.

[BREAKING] Response Streaming

  • Use the standard writer for response streaming.
  • See stream and url_stream demos for updated usage.

0.3.1

06 Jul 14:35
Compare
Choose a tag to compare
  • Update the package manifest for Zig 0.14 (thanks @vytskalt)
  • Update the docs for Zig 0.14 best practices.
  • Add the package version to the user agent.
  • Warn when building a handler executable without explicit -Darch option.

0.3.0

11 Dec 04:38
Compare
Choose a tag to compare

Lambda URLs

Added event decoders & encoders for both buffered and streaming Lambda URLs.
Check out the demos to learn how to use lambda.url.

Response Streaming

[BREAKING] Formatting convention

Replaced stream.writeFmt(···) and stream.publishFmt(···) with a conventional stream.writer().

[BREAKING] Removed stream.closeWithError

It seems that while the HTTP payloads are sent correctly to the Runtime API – the behavior is ignored.
I'm removing it until further investigation so I could implement it with confidence.

In the meanwhile, the same can be achieved by combining lambda.log(···), stream.publish(···), stream.close(), and the new ctx.forceTerminateAfterResponse().

Open With Payload

Allows opening the stream and sending an initial body payload to the Runtime API in a single call.
This is mostly for supporting Lambda’s HTTP Integration protocol.

const raw_http = "6\r\nHello!\r\n";
try stream.openWith("text/plain", raw_http);

Warning

Note that the payload is raw, as it merely appends the bytes to the HTTP request – it’s up to the user to format it with proper semantics (or use one of the new Event Encoders).

Misc

  • Support for scheduling termination of the function instance until after the handler provides a response to the client:
    ctx.forceTerminateAfterResponse();
  • Add GPA allocator leak detection in debug mode.

0.2.2

08 Dec 00:18
Compare
Choose a tag to compare
  • Support async invocation

0.2.1

07 Dec 19:23
Compare
Choose a tag to compare
  • Merge handler context into a single struct

0.1.2

06 Dec 03:13
Compare
Choose a tag to compare
Rename module name