πŸ“ ― Uses the Jaro similarity metric to measure the distance between two strings

Overview

distance

distance: Uses the Jaro similarity metric to measure the distance between two strings

FYI, this was just to test Neon, I do not recommend using this This project was bootstrapped by create-neon.

Installing distance

Installing distance requires a supported version of Node and Rust.

You can install the project with npm. In the project directory, run:

$ npm install

This fully installs the project, including installing any dependencies and running the build.

Building distance

If you have already installed the project and only want to run the build, run:

$ npm run build

This command uses the cargo-cp-artifact utility to run the Rust build and copy the built library into ./index.node.

Exploring distance

After building distance, you can explore its exports at the Node REPL:

$ npm install
$ node
> require('.').hello()
"hello node"

Available Scripts

In the project directory, you can run:

npm install

Installs the project, including running npm run build.

npm build

Builds the Node addon (index.node) from source.

Additional cargo build arguments may be passed to npm build and npm build-* commands. For example, to enable a cargo feature:

npm run build -- --feature=beetle

npm build-debug

Alias for npm build.

npm build-release

Same as npm build but, builds the module with the release profile. Release builds will compile slower, but run faster.

npm test

Runs the unit tests by calling cargo test. You can learn more about adding tests to your Rust code from the Rust book.

Project Layout

The directory structure of this project is:

distance/
β”œβ”€β”€ Cargo.toml
β”œβ”€β”€ README.md
β”œβ”€β”€ index.node
β”œβ”€β”€ package.json
β”œβ”€β”€ src/
|   └── lib.rs
└── target/

Cargo.toml

The Cargo manifest file, which informs the cargo command.

README.md

This file.

index.node

The Node addonβ€”i.e., a binary Node moduleβ€”generated by building the project. This is the main module for this package, as dictated by the "main" key in package.json.

Under the hood, a Node addon is a dynamically-linked shared object. The "build" script produces this file by copying it from within the target/ directory, which is where the Rust build produces the shared object.

package.json

The npm manifest file, which informs the npm command.

src/

The directory tree containing the Rust source code for the project.

src/lib.rs

The Rust library's main module.

target/

Binary artifacts generated by the Rust build.

Learn More

To learn more about Neon, see the Neon documentation.

To learn more about Rust, see the Rust documentation.

To learn more about Node, see the Node documentation.

You might also like...
Measure the execution time of an application

Execution Timer Drag an executable file on the binary or enter the path as an argument to measure the execution time of the program. Building cargo bu

Parity-Bridge β€” Bridge between any two ethereum-based networks

Deprecated Bridges This repo is deprecated. Originally it contained the ETH ETH-PoA bridge (see tumski tag). Later it was repurposed for ETH-PoA

Get a diff between two OpenAPI descriptions.

Get the difference between two OpenAPI descriptions.

Explore the WWW and find the shortest path between two HTML documents

explore Find shortest path between two web resources. About I decided to create this project because some day I started to wonder: In how many clicks

A collection of algorithms that can do join between two parties while preserving the privacy of keys on which the join happens

Private-ID Private-ID is a collection of algorithms to match records between two parties, while preserving the privacy of these records. We present tw

Insert a new named workspace between two other named workspaces

Insert a new named workspace between two other named workspaces

A fast rendezvous in rust where data can optionally be swapped between the two threads.

rendezvous_swap A rendezvous is an execution barrier between a pair of threads, but this crate also provides the option of swapping data at the synchr

Shared k-mer content between two genomes

skc skc is a simple tool for finding shared k-mer content between two genomes. Installation Prebuilt binary curl -sSL skc.mbh.sh | sh # or with wget w

memchr vs stringzilla - up to 7x throughput difference between two SIMD-accelerated substring search libraries in Rust

memchr vs stringzilla Rust Substring Search Benchmarks Substring search is one of the most common operations in text processing, and one of the slowes

Qdrant - vector similarity search  engine with extended filtering support
Qdrant - vector similarity search engine with extended filtering support

Vector Similarity Search Engine with extended filtering support Qdrant (read: quadrant ) is a vector similarity search engine. It provides a productio

Machine learning framework for building object trackers and similarity search engines

Similari Similari is a framework that helps build sophisticated tracking systems. The most frequently met operations that can be efficiently implement

Instance Distance is a fast pure-Rust implementation of the Hierarchical Navigable Small Worlds paper

Fast approximate nearest neighbor searching in Rust, based on HNSW index

Signed distance field font and image command line tool based on OpenCL.

SDFTool Signed distance field font and image command line tool based on OpenCL. Build Windows Run cargo build --release in Visual Studio developer x64

Python package to compute levensthein distance in rust

Contents Introduction Installation Usage License Introduction Rust implementation of levensthein distance (https://en.wikipedia.org/wiki/Levenshtein_d

A fast and cross-platform Signed Distance Function (SDF) viewer, easily integrated with your SDF library.
A fast and cross-platform Signed Distance Function (SDF) viewer, easily integrated with your SDF library.

SDF Viewer (demo below) A fast and cross-platform Signed Distance Function (SDF) viewer, easily integrated with your SDF library. A Signed Distance Fu

Multi-channel signed distance field (MSDF) generator for fonts implemented in pure Rust.

msdfont WIP - school started so less updates from now on :(( Multi-channel signed distance field (MSDF) generator for fonts implemented in pure Rust.

A crate to help you copy things into raw buffers without invoking spooky action at a distance (undefined behavior).

πŸ—œ presser Utilities to help make copying data around into raw, possibly-uninitialized buffers easier and safer. presser can help you when copying dat

Signed distance functions + Rust (CPU & GPU) = ❀️❀️
Signed distance functions + Rust (CPU & GPU) = ❀️❀️

sdf-playground Signed distance functions + Rust (CPU & GPU) = ❀️❀️ Platforms: Windows, Mac & Linux. About sdf-playground is a demo showcasing how you

Adjustment Identification Distance: A gadjid for Causal Structure Learning

Adjustment Identification Distance: A πšπšŠπšπš“πš’πš for Causal Structure Learning This is an early release of πšπšŠπšπš“πš’πš πŸ₯ and feedback is very welc

Owner
Demigender
✨ Organisation for @sach1 scoped packages on NPM.
Demigender
The fastest way to identify any mysterious text or analyze strings from a file, just ask `lemmeknow` !

The fastest way to identify anything lemmeknow ⚑ Identify any mysterious text or analyze strings from a file, just ask lemmeknow. lemmeknow can be use

Swanand Mulay 594 Dec 30, 2022
An implementation of regular expressions for Rust. This implementation uses finite automata and guarantees linear time matching on all inputs.

regex A Rust library for parsing, compiling, and executing regular expressions. Its syntax is similar to Perl-style regular expressions, but lacks a f

The Rust Programming Language 2.6k Jan 8, 2023
A naive (read: slow) implementation of Word2Vec. Uses BLAS behind the scenes for speed.

SloWord2Vec This is a naive implementation of Word2Vec implemented in Rust. The goal is to learn the basic principles and formulas behind Word2Vec. BT

Lloyd 2 Jul 5, 2018
The Fast Vector Similarity Library is designed to provide efficient computation of various similarity measures between vectors.

Fast Vector Similarity Library Introduction The Fast Vector Similarity Library is designed to provide efficient computation of various similarity meas

Jeff Emanuel 243 Sep 6, 2023
Rust edit distance routines accelerated using SIMD. Supports fast Hamming, Levenshtein, restricted Damerau-Levenshtein, etc. distance calculations and string search.

triple_accel Rust edit distance routines accelerated using SIMD. Supports fast Hamming, Levenshtein, restricted Damerau-Levenshtein, etc. distance cal

Daniel Liu 75 Jan 8, 2023
Conference Monitoring Project based on Image Recognition that uses Rust Language and AWS Rekognition service to get the level of image similarity.

Conference Monitoring System based on Image Recognition in Rust This is a Conference Monitoring Project based on Image Recognition that uses Rust Lang

Pankaj Chaudhary 6 Dec 18, 2022
Compute a pairwise SNP distance matrix from one or two alignment(s)

Compute a pairwise SNP distance matrix from one or two alignment(s) Table of Contents Motivation Install cargo conda Precompiled binaries homebrew Con

Michael Hall 11 Nov 2, 2022
Emoji-printer - Utility to convert strings with emoji shortcodes to strings with the emoji unicode

Emoji Printer Intro Utility to convert strings with emoji shortcodes (:sushi:) to strings with the emoji unicode ( ?? ) Install cargo add emoji-printe

Kyle Scully 2 Dec 30, 2021
This code generate coinjoin transaction whici has two inputs and two outputs

How to create coinjoin transaction This code generate coinjoin transaction whici has two inputs and two outputs. First, we create two trasactions. The

kanna 2 Jun 25, 2022
Library + CLI-Tool to measure the TTFB (time to first byte) of HTTP requests. Additionally, this crate measures the times of DNS lookup, TCP connect and TLS handshake.

TTFB: CLI + Lib to Measure the TTFB of HTTP/1.1 Requests Similar to the network tab in Google Chrome or Mozilla Firefox, this crate helps you find the

Philipp Schuster 24 Dec 1, 2022