BunDotNet 1.3.0
dotnet add package BunDotNet --version 1.3.0
NuGet\Install-Package BunDotNet -Version 1.3.0
<PackageReference Include="BunDotNet" Version="1.3.0" />
<PackageVersion Include="BunDotNet" Version="1.3.0" />
<PackageReference Include="BunDotNet" />
paket add BunDotNet --version 1.3.0
#r "nuget: BunDotNet, 1.3.0"
#:package BunDotNet@1.3.0
#addin nuget:?package=BunDotNet&version=1.3.0
#tool nuget:?package=BunDotNet&version=1.3.0
BunDotNet
Tools that help integrate Bun, A fast all-in-one JavaScript runtime, into your .NET projects.
Library
Install the NuGet package:
dotnet add package BunDotNet
Use it like this:
using BunDotNet;
// install the latest version of Bun
var runtime = await BunInstaller.InstallAsync();
// or install a specific version
var runtime = await BunInstaller.InstallAsync(version: BunVersion.Parse("1.3.6"));
// then use the bun cli to run a script
await runtime.RunAsync(args: ["run", "script.ts"], workingDirectory: Environment.CurrentDirectory);
// or list the installed versions
var versions = await BunInstaller.ListVersionsAsync();
CLI Tool Usage
This is a .NET CLI tool that wraps the Bun CLI. It automatically sets up the Bun for you. The only requirement is .NET 10.
Run a TypeScript or JavaScript file using Bun from the command line:
dotnet tool exec BunDotNet.Cli -- wrapper -- run script.ts
Do you need a specific version of Bun? No problem:
dotnet tool exec BunDotNet.Cli -- wrapper --version 1.3.6 -- run script.ts
More commands and options can be found by running:
dotnet tool exec BunDotNet.Cli -- --help
You can also install the CLI tool in your project:
dotnet tool install BunDotNet.Cli
Then run it like this:
dotnet bun wrapper -- run script.ts
Contributing
Pull requests are welcome. Please use Conventional Commits to keep commit messages consistent.
Acknowledgements
- Bun is an amazing project. This would not be possible without it.
License
Distributed under the MIT License. See LICENSE for more information.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.