Introducing Bun as a Runtime for Pulumi
Blog post from Pulumi
Pulumi has expanded its support for Bun, a JavaScript runtime that acts as an all-in-one toolkit, by making it a fully supported runtime for Pulumi programs, allowing developers to run TypeScript projects without Node.js. Bun offers native TypeScript support, faster package management, and aims for full Node.js compatibility, enabling existing npm packages to function seamlessly. To use Bun with Pulumi, developers can set the runtime to Bun in their Pulumi.yaml file and benefit from a streamlined single-tool experience. The transition to Bun involves updating project configurations such as tsconfig.json and adopting ECMAScript module syntax for efficient handling of async code. While Bun enhances package management speed and simplifies runtime configurations, it does not currently support callback functions and dynamic providers that rely on Node.js-specific function serialization. Pulumi version 3.227.0 supports this new Bun runtime, and developers are encouraged to provide feedback to continue improving the integration.