Wickra.Compile 0.1.4

dotnet add package Wickra.Compile --version 0.1.4
                    
NuGet\Install-Package Wickra.Compile -Version 0.1.4
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Wickra.Compile" Version="0.1.4" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Wickra.Compile" Version="0.1.4" />
                    
Directory.Packages.props
<PackageReference Include="Wickra.Compile" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Wickra.Compile --version 0.1.4
                    
#r "nuget: Wickra.Compile, 0.1.4"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Wickra.Compile@0.1.4
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Wickra.Compile&version=0.1.4
                    
Install as a Cake Addin
#tool nuget:?package=Wickra.Compile&version=0.1.4
                    
Install as a Cake Tool

<p align="center"> <a href="https://wickra.org"><img src="https://raw.githubusercontent.com/wickra-lib/.github/main/profile/wickra-banner.svg?v=514-8" alt="Wickra Compile — compile a strategy spec into a standalone deployable" width="100%"></a> </p>

CI codecov NuGet License: MIT OR Apache-2.0

Wickra Compile — C#


Part of the Wickra ecosystem: — for C#. dotnet add package Wickra.Compile — prebuilt native library, no system dependencies.

C# / .NET bindings for the Wickra strategy compiler over its C ABI hub. A Compiler is driven over a JSON boundary, so the manifest it produces is byte-identical to every other Wickra Compile binding.

Install

dotnet add package Wickra.Compile

The native library ships prebuilt per platform under runtimes/<rid>/native/, selected automatically. There is nothing to compile. Targets .NET 8 and later.

The native C ABI library is loaded through a DllImportResolver. For a local build, run cargo build -p wickra-compile-c --release and the test project copies the library from target/release next to the assembly (see the <Content> items in WickraCompile.Tests).

Quick start

using Wickra.Compile;

using var compiler = new Compiler();

var response = compiler.Command("""
    {"cmd":"compile","dry_run":true,"spec":{
      "strategy":{"symbol":"x","timeframe":"1h",
        "indicators":{"f":{"type":"Ema","params":[3]}},
        "entry":{"cross_above":["f","f"]},"exit":{"cross_below":["f","f"]},
        "sizing":{"type":"fixed_qty","qty":1}},
      "target":{"kind":"wasm"},"crate_name":"demo"}}
    """);

Console.WriteLine(response); // response JSON, including manifest.project_hash

Surface

  • new Compiler() — construct a compiler handle; it is IDisposable, so wrap it in using.
  • string Command(string cmdJson) — apply a command envelope ({"cmd":"...", ...}) and return the response JSON. Commands: compile, targets, version, artifact_bytes, reset.
  • static string Version() — the crate version.

A malformed command, an unknown command name, or an invalid spec is reported in-band as {"ok":false,"error":...} (the response JSON), not as an exception.

Determinism

The whole compiler lives once in the Rust core; this binding forwards its JSON verbatim, so a given spec produces the byte-identical manifest here and in every other binding — the exact cross-language golden invariant.

Benchmark

Every binding forwards to the same data-driven Rust core, so what this one adds is the call overhead of [LibraryImport] P/Invoke over the C ABI, not a different result. The core's throughput is measured by the repository's benchmark suite and the nightly bench.yml run; the numbers, the machine and how to reproduce them are in the repository BENCHMARKS.md.

Documentation

The full guide, the spec reference and the API documentation live in the main repository and the documentation site:

Wickra Compile ships native bindings for Python, Node.js, WASM and Rust, plus a C ABI hub that any C-capable language (C, C++, C#, Go, Java, R) links against — all forwarding to the same data-driven, unsafe-forbidden Rust core.

Security

Found a security issue? Please don't open a public issue. Report it privately via the repository's Security tab ("Report a vulnerability") or email support@wickra.org with a subject line starting [wickra security]. Full policy: https://github.com/wickra-lib/wickra-compile/blob/main/SECURITY.md.

Disclaimer

Wickra Compile is a code-generation tool, provided "as is" without warranty of any kind. It generates projects and can invoke cargo to build them — run it only on specs you trust. Nothing here is financial advice; compiled strategies are your responsibility, and trading carries risk of loss.

License

Licensed under either of Apache-2.0 or MIT at your option.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net8.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.

Version Downloads Last Updated
0.1.4 101 9/27/2026
0.1.3 95 9/23/2026
0.1.2 94 9/18/2026
0.1.1 99 9/15/2026
0.1.0 95 9/14/2026