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.
Click to show internal directories.
Click to hide internal directories.