Skip to content

⚡️ Match tens of thousands of regular expressions within milliseconds - .NET Core binding for Intel's Hyperscan

License

Notifications You must be signed in to change notification settings

pombredanne/Hyperscan-csharp

Repository files navigation

Hyperscan - C#

License: MIT Nuget Nuget

hyperscan is a high-performance multiple regex matching library.

It uses hybrid automata techniques to allow simultaneous matching of large numbers (up to tens of thousands) of regular expressions and for the matching of regular expressions across streams of data.

This project is a third-party developed using C++/CLI for the hyperscan project to enable developers to integrate hyperscan in their .NET Core based projects.

Build status

Github CI (Windows) Code Coverage Status
ci-image cc-image

Installing from NuGet

To install Hyperscan, run the following command in the Package Manager Console

Install-Package Hyperscan

More details available here.

Usage

More to come.

Structure

  • hyperscan is a git subtree taken from master branch of https://github.com/intel/hyperscan. It is used by the C++/CLI wrapper located in src/hyperscan-bridge.
  • src is the root folder of the Hyperscan - C# project which contains:
    • hyperscan-bridge: C++/CLI wrapper targeting .NET Core 3.1 which exposes the hyperscan API to the .NET world.
    • Hyperscan: .NET Core 3.1 layer on top of hyperscan-bridge which provides utilities, helpers and extension methods to easier the usage of the hyperscan API.
    • Hyperscan.Sample: .NET Core 3.1 console application to demonstrate simple usage of the API.
    • Hyperscan.Tests: Unit tests powered by xUnit.
    • Hyperscan.Benchmarks: Benchmark powered by BenchmarkDotNet.

Building the Repository

Windows
Instructions

Supported platforms

Hyperscan - C# supports only Windows 8/8.1/10/Server 2016/2019 x64 with .NET Core >= 3.1, while support for 32-bit platform-only is not provided.

Using Hyperscan - C# is only available through .NET Core 3.1 applications, hence referencing netcoreapp3.1 within your csproj. The chosen platform must also be x64 exclusively, x86 or AnyCPU targets are not supported due to native bindings from hyperscan being x64.

Those requirements are driven by the following statements:

  • hyperscan supports Windows 8+ as explained here.
  • C++/CLI does support .NET Core >= 3.1 and only on Windows, as stated here.
  • 32-bit platform-only usage is marginal, especially on memory-intensive environment such as servers.

Contributing

Feel free to raise issues or submit a pull request.

Credits

Original project implementation comes from Intel®.

Legal and Licensing

Hyperscan - C# is licensed under the MIT license.

About

⚡️ Match tens of thousands of regular expressions within milliseconds - .NET Core binding for Intel's Hyperscan

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published