Metadata-Version: 2.3
Name: vest-build-dotnet
Version: 0.0.3
Summary: Vest build support for .NET projects
Keywords: vest,build,build-system,dotnet,.net,csharp,native-aot,ilc,msbuild,compilation,packaging
Author: ascpixi
Author-email: ascpixi <ascpixi@proton.me>
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: C#
Classifier: Topic :: Software Development :: Build Tools
Classifier: Topic :: Software Development :: Compilers
Classifier: Typing :: Typed
Requires-Dist: packaging>=26.0
Requires-Dist: vest-build>=0.0.2
Requires-Python: >=3.11
Project-URL: Repository, https://github.com/ascpixi/vest-dotnet
Description-Content-Type: text/markdown

# Vest support for .NET
[![image](https://img.shields.io/pypi/v/vest-build-dotnet.svg)](https://pypi.python.org/pypi/vest-build-dotnet)
[![image](https://img.shields.io/pypi/l/vest-build-dotnet.svg)](https://github.com/ascpixi/vest-dotnet/blob/master/LICENSE)
[![image](https://img.shields.io/pypi/pyversions/vest-build-dotnet.svg)](https://pypi.python.org/pypi/vest-build-dotnet)
[![Actions status](https://github.com/ascpixi/vest-dotnet/workflows/CI/badge.svg)](https://github.com/ascpixi/vest-dotnet/actions)

.NET build support for [Vest](https://pypi.org/project/vest-build/), a Python-based build
system for bespoke use.

## Requirements
The project assumes that the following dependencies are installed:

- The [.NET SDK](https://dotnet.microsoft.com/download), with `dotnet` on `PATH`.
- `csc`. You can install this via `dotnet tool install csc`.
- `ilc` for Native AOT compilation. You can install this via `dotnet tool install ilc`.

## Examples

### Building or publishing an existing project

```python
from vest import *
from vest.dotnet import dotnet_publish

component(name = "my-service")

@task
def publish():
    artifacts = dotnet_publish(
        configuration = "Release",
        rid = "linux-x64"
    )

    return artifacts.publish
```

### Native AOT compilation

`ilc_compile` turns an IL assembly into a native object file via `dotnet ilc`, which can then
be fed into your own linker invocation:

```python
from vest.dotnet import ilc_compile

@task
def aot():
    asm = dotnet_build(
        configuration = dotnet_configuration(),
        rid = rid(),
        properties = {
            "Arch": "x64"
        }
    )

    ilc_compile(
        input = asm.build,
        output = f"{artifact_dir()}/obj/my-object.o",
        target_arch = "x64",
        stdlib_assembly = "Azerou.CoreLib",
        nativelib = True
    )
```
