Skip to content

Latest commit

 

History

History
87 lines (61 loc) · 2.66 KB

README.md

File metadata and controls

87 lines (61 loc) · 2.66 KB

typomania-crates

An example of using typomania with a crates.io database dump.

Prerequisites

PostgreSQL

You'll need a crates.io database dump loaded into a running PostgreSQL instance. You'll also need to set the DATABASE_URL environment variable so that typomania-crates can connect to Postgres: the easiest way to do that will be to copy .envrc.sample to .envrc or .env (depending on whether you're using direnv or dotenv, respectively), and change it to point to the right Postgres.

Configuration

You can edit typomania.toml to tinker with the options used when running the typosquatting checks, although the defaults should be reasonable (and basically match Dan Gardner's typogard-crates).

spaCy

By default, this uses spaCy to perform additional checks on the description of each possibly typosquatted crate, which requires a Python environment with spaCy enabled.

The easiest way to do this is with Poetry, which this repo includes configuration for:

poetry install

Running

With spaCy

poetry run cargo run

Without spaCy

cargo run

The Rust Foundation has adopted a Code of Conduct that we expect project participants to adhere to. Please read the full text so that you can understand what actions will and will not be tolerated.

Contributing

See CONTRIBUTING.md.

Licenses

Rust is primarily distributed under the terms of both the MIT license and the Apache License (Version 2.0), with documentation portions covered by the Creative Commons Attribution 4.0 International license..

See LICENSE-APACHE, LICENSE-MIT, LICENSE-documentation, and COPYRIGHT for details.

You can also read more under the Foundation's intellectual property policy.

Other Policies

You can read about other Rust Foundation policies in the footer of the Foundation website.