Expand description
Core runtime support for inline_csharp.
This crate is an implementation detail of inline_csharp_macros. End users
should depend on inline_csharp instead of this crate directly.
Public items:
CsharpError— error type returned byrun_csharpand by thecsharp!/csharp_fn!macros at program runtime.run_csharp— compile (if needed) and run a generated C# class.expand_dotnet_args— shell-expand an option string into individual args.cache_dir— compute the deterministic temp-dir path for a C# class.
Enums§
- Csharp
Error - All errors that
csharp!andcsharp_fn!can return at runtime (and thatct_csharp!maps tocompile_error!diagnostics at build time).
Functions§
- base_
cache_ dir - Resolve the root directory used to cache compiled C# assemblies.
- cache_
dir - Compute the deterministic cache-dir path used to store compiled C# assemblies.
- detect_
target_ framework - Detect the installed .NET target framework moniker (e.g.
"net8.0") by runningdotnet --versionand extracting the major version number. - expand_
dotnet_ args - Shell-expand
raw(expanding env vars and~), then split into individual arguments (respecting quotes). Returns an empty vec ifrawis empty. - generate_
csproj - Generate the XML content for a
.csprojfile. - run_
csharp - Compile (if needed) and run a generated C# class, returning raw stdout bytes.