AIThis post was created with the assistance of artificial intelligence (AI).

TL;DR

Before you orderOffer from Amazon

Get bike and ride gear delivered free with Prime

  • Fast, free delivery on millions of items
  • Prime Video, Amazon Music and more included
  • Member-only deals all year
Start your free Prime trial Free trial for eligible customers · Cancel anytime
As an affiliate, we earn on qualifying purchases.

Vercel has announced Scriptc, a new compiler that converts TypeScript directly into native binaries without including a JavaScript engine. This development aims to enhance performance and security for serverless and edge applications.

Vercel has unveiled Scriptc, a new compiler that translates TypeScript directly into native binaries without embedding a JavaScript engine. This innovation aims to improve the performance, security, and footprint of serverless functions and edge deployments, representing a significant shift in the JavaScript ecosystem.

Scriptc is designed to compile TypeScript code into standalone native binaries, removing the traditional dependency on embedded JavaScript engines like V8 or SpiderMonkey. According to Vercel, this approach results in smaller binaries, faster startup times, and reduced attack surfaces, which are critical factors for serverless and edge computing environments.

Vercel stated that Scriptc leverages a new compilation pipeline that converts TypeScript into optimized native code, bypassing the need for a JavaScript runtime within the binary. This method differs from existing solutions that bundle JavaScript engines, which can increase binary size and startup latency.

Vercel has not disclosed whether Scriptc relies on any existing native compilation frameworks or if it introduces a new runtime environment. The company emphasizes that the tool is aimed at developers seeking more efficient deployment options for serverless functions and microservices.

At a glance
announcementWhen: announced March 2024
The developmentVercel’s Scriptc is a TypeScript-to-native compiler that eliminates the need for a JavaScript engine in the binary, marking a significant shift in how serverless functions are deployed.

Implications for Serverless and Edge Computing

This development could significantly impact how serverless functions are built and deployed. By removing the JavaScript engine, Scriptc may enable smaller, faster, and more secure binaries, which are highly desirable in edge computing and high-performance serverless environments. It could also influence other cloud providers and open-source projects to explore similar approaches, potentially reshaping the landscape of serverless architecture.

Amazon

TypeScript native compiler

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Background on JavaScript Engines and Compilation Techniques

Traditionally, serverless functions written in JavaScript or TypeScript rely on embedded JavaScript engines like V8 or SpiderMonkey to execute code. These engines add to the binary size and startup latency, which can be problematic for edge deployments requiring rapid scaling and minimal latency.

Previous efforts to optimize serverless functions include using lightweight runtimes or compiling code into native binaries, but these often involve trade-offs in flexibility or developer experience. Vercel’s announcement introduces a novel approach by compiling TypeScript directly into native code, sidestepping the need for a runtime engine altogether.

It remains unclear how Scriptc handles dynamic features of JavaScript or TypeScript, such as reflection or dynamic imports, which typically depend on runtime capabilities.

“Scriptc represents a new paradigm in serverless deployment, offering smaller, faster, and more secure binaries by removing the JavaScript engine dependency.”

— Vercel spokesperson

Amazon

serverless function binaries

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Technical Limitations and Compatibility Questions

It is not yet clear how Scriptc handles complex JavaScript/TypeScript features like dynamic imports, reflection, or runtime code modification. The extent to which existing TypeScript codebases can be migrated without modification remains uncertain.

Vercel has not disclosed whether Scriptc generates platform-specific binaries or supports cross-platform deployment, nor how it integrates with existing build pipelines or frameworks.

Amazon

edge computing deployment tools

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Next Steps for Adoption and Development

Vercel plans to release Scriptc to a broader developer audience in the coming months, likely through an open beta or developer preview. Monitoring user feedback and compatibility testing will be key to assessing its practical viability.

Further technical details, including support for complex code patterns and cross-platform capabilities, are expected to be announced as the project progresses. Industry observers will watch for benchmarks comparing Scriptc’s performance and binary size against traditional JavaScript engines.

Amazon

native code compiler for TypeScript

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Key Questions

How does Scriptc differ from existing JavaScript bundlers?

Unlike bundlers that package JavaScript code with a runtime engine, Scriptc compiles TypeScript directly into native binaries, eliminating the need for an embedded JavaScript engine.

Will Scriptc support all TypeScript features?

Vercel has not yet confirmed full support for all TypeScript features, especially dynamic or runtime-dependent features. Compatibility details are still emerging.

Is Scriptc suitable for production deployment?

As of now, Scriptc is in early stages, and Vercel has not announced official production support. Developers should wait for further testing and official releases.

What platforms will Scriptc support?

Platform support details remain unclear. It is expected that initial releases will target major operating systems, but cross-platform capabilities are yet to be confirmed.

Source: hn

HALLOWEEN

Halloween Picks

As an affiliate, we earn on qualifying purchases.

You May Also Like

Delphi 13 Community Edition Is Now Available

Embarcadero has released Delphi 13 Community Edition, offering free access to the latest version for individual developers and small teams.

The Fiat Topolino Is Barely a Car, But It Might Get an Abarth Variant

Fiat’s tiny Topolino could soon sport an Abarth version, though details remain unconfirmed. This development signals potential performance upgrades for the microcar.

Jeff Gordon And Bill Elliott Raced IROC Pontiacs Wheel-to-Wheel In DC Last Weekend. Who Knew?

Jeff Gordon and Bill Elliott competed wheel-to-wheel in IROC Pontiacs last weekend in Washington, D.C., marking a rare on-track reunion of racing legends.

Testing 12 Different Zigbee Temperature/humidity Sensors

SmartHomeScene compared 12 battery-powered Zigbee temperature and humidity sensors against a calibrated reference, with fridge benchmarks added.