Coder Social home page Coder Social logo

chimera4j's Introduction

Chimera4j

Chimera4j allows you to run full PCRE compliant regexes in the JVM (up to 8 times faster than native PCRE). It is essentially just a wrapper for Chimera. Currently, the project is a bit of a super hacky prototype, but it is tested fairly well and appears to work... so that's kinda nice.

This project is based off the fine work of the folks over at hyperscan-java, which is a wrapper for Hyperscan.

Installation

Gradle

compile 'com.rivdata:Chimera4j:0.2.0'

sbt

libraryDependencies += "com.rivdata" % "Chimera4j" % "0.2.0"

Usage

Check out the tests.

What's the current state of the code?

Code is just a proof of concept that we can use Hyperscan 5 and Chimera with Java. We need to validate that's compatible with all PCRE regexes before committing to a full development.

Be wary of the following pitfalls:

  1. Be afraid of the natives. I built the darwin ones on my personal computer, the linux ones I built in docker. If you get any errors, these natives are likely the cause. Since they run very differently depending on the hardware you are running on, make sure to test your production environments, or better yet, keep this library out of production altogether.
  2. The libchimera.so and libchimera.dylib filenames are a bit misleading. In truth, they are actually dynamic libs that link chimera, hyperscan and PCRE together into a FAT executable.
  3. The pure Hyperscan .dylib file in here is useless, but I'm leaving it in because the code references it in a ton of places. All the functionality it provides is duplicated in the chimera.dylib.

chimera4j's People

Contributors

swiftengineer avatar montesinnos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.