This repo is a Rust implementation of twitter-text. All aspects of tweet text are parsed by a Pest PEG grammar, with the exception of URL length and character weighting. See the parser directory for the grammar. Procedural validation for URL lengths and character weights is performed by the Extractor code.
To run the tests, install Rust, and then try this in the terminal:
> cargo build
> cargo test
The Ruby bindings require Ruby 3.4.1 or higher. If you're on macOS with the system Ruby (2.6.x), you'll need to install a newer version:
Option 1: Homebrew (simplest)
brew install rubyOption 2: Ruby version manager
The Ruby bindings use the magnus crate which requires Ruby 3.2.3+ APIs.