csharp

package
v0.1.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 31, 2026 License: GPL-3.0 Imports: 12 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package csharp provides a C# builder that downloads .NET SDK toolchains from Microsoft.

Only .NET 8.x and above are supported. The builder uses native AOT compilation (dotnet publish) to produce a self-contained binary.

Import this package for its side effects to register the builder:

import _ "github.com/Highload-fun/builders/csharp"

Index

Constants

View Source
const BuilderId = "csharp"

BuilderId is the identifier used to register and look up this builder.

Variables

This section is empty.

Functions

This section is empty.

Types

type CSharp

type CSharp struct {
	// contains filtered or unexported fields
}

CSharp implements builders.Builder for the C# programming language via the .NET SDK.

func (*CSharp) Build

func (c *CSharp) Build(ctx context.Context, sb *sandbox.Sandbox, version string, flags []string) error

Build compiles C# source code inside the sandbox using "dotnet publish" with native AOT. If version is empty, "8.0.0" is used. The .NET SDK is downloaded on demand and cached in builders.CompilersHostDir.

func (*CSharp) GetVersions

func (c *CSharp) GetVersions(ctx context.Context) ([]builders.Version, error)

GetVersions fetches available .NET SDK versions from the dotnet releases-index.json API. Only channels with major version >= 8 are included. Results are cached for 1 hour.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL