trustcaptcha

Crates.iotrustcaptcha
lib.rstrustcaptcha
version2.0.0
created_at2025-06-15 14:53:41.174438+00
updated_at2025-06-17 16:56:08.337321+00
descriptionTrustCaptcha – Privacy-first CAPTCHA solution for Rust. GDPR-compliant, bot protection made in Europe.
homepagehttps://www.trustcomponent.com/en/products/captcha/integrations/rust-captcha
repositoryhttps://github.com/trustcomponent/trustcaptcha-rust
max_upload_size
id1713376
size83,250
TrustComponent (trustcomponent-devops)

documentation

README

Crates.io

TrustCaptcha for Rust — GDPR-compliant, privacy-first CAPTCHA

Protect websites and apps against bots and spam with a privacy-first, EU-hosted CAPTCHA solution.

What is TrustCaptcha?

TrustCaptcha combines proof-of-work, an AI bot-score and custom security rules to stop automated bot abuse — without image marking or puzzles

Key perks:

  • Privacy-friendly & GDPR-compliant – data processed exclusively in Europe
  • No visual challenges – users never label images or solve quizzes
  • Fully themable widget – matches any brand and design and improves your user flow
  • Conversion-safe – near-zero user drop-off compared to legacy CAPTCHAs

Read the full TrustCaptcha product overview for technical details and the security concept.

Get started

  1. Create an account: sign up / sign in.
  2. Choose a CAPTCHA: pick an existing one or create a new one.
  3. Embed the widget: implement the TrustCaptcha widget into your website or app.
  4. Validate result: validate the CAPTCHA verification result in your backend.

Need a walkthrough? See the Rust integration guide.

Basic Rust integration

  1. Install the dependency
cargo add trustcaptcha-rust
  1. Retrieve the verification result
// Retrieving the verification result
let verification_result = match CaptchaManager::get_verification_result("<your_secret_key>", "<verification_token_from_your_client>").await {
    Ok(result) => result,
    Err(e) => {
        // Fetch verification result failed - handle error
        error!("Failed to fetch verification result: {}", e);
        return Ok(HttpResponse::InternalServerError().json(json!({"error": "Captcha verification failed"})));
    }
};
  1. Act on the result
// Act on the verification result
if !verification_result.verification_passed || verification_result.score > 0.5 {
    info!("Verification failed or bot score > 0.5 – possible automated request.");
}

Congratulations — you have successfully validated the result of the CAPTCHA!

For detailed implementation instructions, read the Rust integration guide.

Other pre-built integrations

TrustCaptcha ships ready-made integrations for popular stacks:

  • Platforms like WordPress, Joomla, CraftCMS or Keycloak
  • Frontends like JavaScript, Angular, React or Vue.js
  • Backends like Node.js, PHP, Python, Java, Ruby, Rust, Go or DotNet
  • Mobile Applications like iOS, Android, React Native or Flutter

Discover all our pre-built Integrations on our website.

Get support

Questions? We will be happy to help!

Commit count: 4

cargo fmt