LeanCorpus.SourceGen 1.1.0

dotnet add package LeanCorpus.SourceGen --version 1.1.0
                    
NuGet\Install-Package LeanCorpus.SourceGen -Version 1.1.0
                    
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="LeanCorpus.SourceGen" Version="1.1.0">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="LeanCorpus.SourceGen" Version="1.1.0" />
                    
Directory.Packages.props
<PackageReference Include="LeanCorpus.SourceGen">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
                    
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 LeanCorpus.SourceGen --version 1.1.0
                    
#r "nuget: LeanCorpus.SourceGen, 1.1.0"
                    
#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 LeanCorpus.SourceGen@1.1.0
                    
#: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=LeanCorpus.SourceGen&version=1.1.0
                    
Install as a Cake Addin
#tool nuget:?package=LeanCorpus.SourceGen&version=1.1.0
                    
Install as a Cake Tool

Rowles.LeanCorpus

Build AOT Compatible Docs Docs

A .NET-native full-text search engine. Segment-centric indexing, memory-mapped reads, and atomic commit semantics. Targets net10.0 and net11.0. The core library has no external dependencies; stored-field compression uses BCL types only. Optional extension packages add LZ4, Snappy, and Zstandard support.

Inspired by Apache Lucene.

Projects

All projects target .NET 10, and .NET 11. Versions < 10 are not supported. (LeanCorpus.SourceGen is a .NET Standard library, for obvious reasons though).

Core library

  • NuGet Version
    • 0 dependencies, AOT compatible, includes LINQ, default compressors (Deflate or Brotli)

Optional libraries

  • NuGet Version Typed mapping source generator
  • NuGet Version Zstandard stored field compression
  • NuGet Version LZ4 stored field compression
  • NuGet Version Snappy stored field compression

Native AOT

Rowles.LeanCorpus is marked AOT-compatible for net10.0 and net11.0. The core library avoids reflection-based JSON metadata and is validated by a dedicated xUnit smoke executable (which can be ran with .\scripts\aot-smoke.ps1) rather than the ASP.NET JSON API example.

This publishes src\examples\Rowles.LeanCorpus.Example.NativeAot\Rowles.LeanCorpus.Example.NativeAot.csproj for win-x64 with PublishAot=true, then runs the native executable. The smoke executable several different bits of the library that may have proved some difficulty.

A note if you're using on of the optional compression libraries, and are using native AOT: The core library has no native sidecar dependencies for compression. Optional packages (Rowles.LeanCorpus.Compression.LZ4, Rowles.LeanCorpus.Compression.Snappy, Rowles.LeanCorpus.Compression.Zstandard) may include RID-specific native binaries; AOT consumers using those packages must call their respective Register() methods at startup.

While LeanLucene is AOT capable, it does not support (and does not intend to support) Blazor WASM. LeanLucene (and the other segment-centric engines) require use of the OS's filesystem to achieve its performance. It would be too much work (and a project itself) to support a dual approach with a filesystem, and the browsers limited storage.

Blazor Server/Hybrid remains supported (naturally), as long as the indexing happens server-side.

SonarQube Scan (main branch)

Quality Gate Status Lines of Code Bugs Code Smells Duplicated Lines (%) Technical Debt Vulnerabilities Reliability Rating Security Rating Maintainability Rating

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

  • .NETStandard 2.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
1.1.0 94 7/12/2026
1.0.0 114 5/29/2026