SkillAgentSearch skills...

Llrt

LLRT (Low Latency Runtime) is an experimental, lightweight JavaScript runtime designed to address the growing demand for fast and efficient Serverless applications.

Install / Use

/learn @awslabs/Llrt
About this skill

Quality Score

0/100

Category

Design

Supported Platforms

Universal

README

LLRT CI LLRT Release

LLRT (Low Latency Runtime) is a lightweight JavaScript runtime designed to address the growing demand for fast and efficient Serverless applications. LLRT offers up to over 10x faster startup and up to 2x overall lower cost compared to other JavaScript runtimes running on AWS Lambda

It's built in Rust, utilizing QuickJS as JavaScript engine, ensuring efficient memory usage and swift startup.

[!WARNING] LLRT is an experimental package. It is subject to change and intended only for evaluation purposes.

<sub>LLRT - DynamoDB Put, ARM, 128MB:<sub> DynamoDB Put LLRT

<sub>Node.js 20 - DynamoDB Put, ARM, 128MB:<sub> DynamoDB Put Node20

HTTP benchmarks measured in round trip time for a cold start (why?)

Configure Lambda functions to use LLRT

Download the last LLRT release from https://github.com/awslabs/llrt/releases

Option 1: Custom runtime (recommended)

Choose Custom Runtime on Amazon Linux 2023 and package the LLRT bootstrap binary together with your JS code.

Option 2: Use a layer

Choose Custom Runtime on Amazon Linux 2023, upload llrt-lambda-arm64.zip or llrt-lambda-x64.zip as a layer and add to your function

Option 3: Package LLRT in a container image

See our AWS SAM example or:

FROM --platform=arm64 busybox
WORKDIR /var/task/
COPY app.mjs ./
ADD https://github.com/awslabs/llrt/releases/latest/download/llrt-container-arm64 /usr/bin/llrt
RUN chmod +x /usr/bin/llrt

ENV LAMBDA_HANDLER "app.handler"

CMD [ "llrt" ]

Option 4: AWS SAM

The following example project sets up a lambda instrumented with a layer containing the llrt runtime.

Option 5: AWS CDK

You can use cdk-lambda-llrt construct library to deploy LLRT Lambda functions with AWS CDK.

import { LlrtFunction } from "cdk-lambda-llrt";

const handler = new LlrtFunction(this, "Handler", {
  entry: "lambda/index.ts",
});

See Construct Hub and its examples for more details.

That's it 🎉

[!IMPORTANT] Even though LLRT supports ES2023 it's NOT a drop in replacement for Node.js. Consult Compatibility matrix and API for more details. All dependencies should be bundled for a browser platform and mark included @aws-sdk packages as external.

Testing & ensuring compatibility

The best way to ensure your code is compatible with LLRT is to write tests and execute them using the built-in test runner. The test runner currently supports Jest/Chai assertions. There are three main types of tests you can create:

Unit Tests

  • Useful for validating specific modules and functions in isolation
  • Allow focused testing of individual components

End-to-End (E2E) Tests

  • Validate overall compatibility with AWS SDK and WinterTC compliance
  • Test the integration between all components
  • Confirm expected behavior from end-user perspective
  • For more information about the E2E Tests and how to run them, see here.

Web Platform Tests (WPT)

  • Useful for validating LLRT’s behavior against standardized browser APIs and runtime expectations
  • Ensure compatibility with web standards and cross-runtime environments
  • Help verify alignment with WinterTC and broader JavaScript ecosystem
  • For setup instructions and how to run WPT in LLRT, see here.

Test runner

Test runner uses a lightweight Jest-like API and supports Jest/Chai assertions. For examples on how to implement tests for LLRT see the /tests folder of this repository.

To run tests, execute the llrt test command. LLRT scans the current directory and sub-directories for files that ends with *.test.js or *.test.mjs. You can also provide a specific test directory to scan by using the llrt test -d <directory> option.

The test runner also has support for filters. Using filters is as simple as adding additional command line arguments, i.e: llrt test crypto will only run tests that match the filename containing crypto.

Compatibility matrix

[!NOTE] LLRT only support a fraction of the Node.js APIs. It is NOT a drop in replacement for Node.js, nor will it ever be. Below is a high level overview of partially supported APIs and modules. For more details consult the API documentation

| Node.js API | Node.js | LLRT | | ------------------------------------------------ | ------- | ----- | | node:assert | ✔︎ | ✔︎️⚠️ | | node:async_hooks | ✔︎ | ✔︎️⚠️ | | node:buffer | ✔︎ | ✔︎️⚠️ | | node:child_process | ✔︎ | ✔︎⚠️ | | node:cluster | ✔︎ | ✘ | | node:console | ✔︎ | ✔︎⚠️ | | node:crypto | ✔︎ | ✔︎⚠️ | | node:dgram | ✔︎ | ✘ | | node:diagnostics_channel | ✔︎ | ✘ | | node:dns | ✔︎ | ✔︎⚠️ | | node:events | ✔︎ | ✔︎⚠️ | | node:fs | ✔︎ | ✔︎⚠️ | | node:fs/promises | ✔︎ | ✔︎⚠️ | | node:http | ✔︎ | ✘⏱ | | node:http2 | ✔︎ | ✘ | | node:https | ✔︎ | ✘⏱ | | node:inspector | ✔︎ | ✘ | | node:inspector/promises | ✔︎ | ✘ | | node:module | ✔︎ | ✔︎⚠️ | | node:net | ✔︎ | ✔︎⚠️ | | node:os | ✔︎ | ✔︎⚠️ | | node:path | ✔︎ | ✔︎⚠️ | | node:perf_hooks | ✔︎ | ✔︎⚠️ | | node:process | ✔︎ | ✔︎⚠️ | | node:querystring | ✔︎ | ✘ | | node:readline | ✔︎ | ✘ | | node:readline/promises | ✔︎ | ✘ | | node:repl | ✔︎ | ✘ | | node:sqlite | ✔︎ | ✘ | | node:stream | ✔︎ | ✔︎* | | node:stream/promises | ✔︎ | ✔︎* | | node:stream/web | ✔︎ | ✔︎⚠️ | | node:string_decoder | ✔︎ | ✔︎ | | node:test | ✔︎ | ✘ | | node:timers | ✔︎ | ✔︎⚠️ | | node:tls | ✔︎ | ✘⏱ | | node:tty | ✔︎ | ✔︎⚠️ | | node:url | ✔︎ | ✔︎⚠️ | | node:util | ✔︎ | ✔︎⚠️ | | node:v8 | ✔︎ | ✘** | | node:vm | ✔︎ | ✘ | | node:wasi | ✔︎ | ✘ | | node:worker_threads | ✔︎ | ✘ | | node:zlib | ✔︎ | ✔︎⚠️ |

| LLRT API | Node.js | LLRT | | ------------------------------------------------------------ | ------- | ---- | | llrt:hex | ✘ | ✔︎ | | llrt:qjs | ✘ | ✔︎ | | llrt:util | ✘ | ✔︎ | | llrt:xml | ✘ | ✔︎ |

| Web Platform API | LLRT | | ----------------------------------------------------------------- | ---- | | COMPRESSION | ✘⏱ | | CONSOLE | ✔︎⚠️ | | DOM | ✔︎⚠️ | | ECMASCRIPT | ✔︎⚠️ | | ENCODING | ✔︎⚠️ | | FETCH | ✔︎⚠️ | | FILEAPI | ✔︎⚠️ | | HR-TIME | ✔︎ | | HTML | ✔︎⚠️ | | STREAMS | ✔︎⚠️ | | URL | ✔︎ | | URLPATTERN | ✘⏱ | | WASM-JS-API

Related Skills

View on GitHub
GitHub Stars8.7k
CategoryDesign
Updated6h ago
Forks388

Languages

Rust

Security Score

95/100

Audited on Mar 19, 2026

No findings