No description
Find a file
2024-12-04 19:44:20 +02:00
endolingual Basic API request to DeepL 2024-12-04 19:44:20 +02:00
endolingual-macro Basic API request to DeepL 2024-12-04 19:44:20 +02:00
.envrc Init commit 2024-11-14 22:53:41 +00:00
.gitignore Basic API request to DeepL 2024-12-04 19:44:20 +02:00
Cargo.lock Basic API request to DeepL 2024-12-04 19:44:20 +02:00
Cargo.toml Basic API request to DeepL 2024-12-04 19:44:20 +02:00
devenv.lock Init commit 2024-11-14 22:53:41 +00:00
devenv.nix Basic API request to DeepL 2024-12-04 19:44:20 +02:00
devenv.yaml Init commit 2024-11-14 22:53:41 +00:00
LICENSE Init commit 2024-11-14 22:53:41 +00:00
README.md Basic API request to DeepL 2024-12-04 19:44:20 +02:00

Endolingual

Procedural macros in Rust can execute arbitrary code at compile time, even performing network requests. This has potentially terrifying security implications, but we'll use it to our advantage!

Endolingual is a Rust macro which translates strings of natural language text into multiple foreign languages at once by making API requests at compile time. The produced translations are &'static str values, so they are very lightweight.

Examples

use endolingual::{translate, TranslationSet};

let button_text_french: &str = translate!("Sign up").fr;
// ...

Usage

Set the environment variable DEEPL_API_KEY to your DeepL API key. Only DeepL is supported at the moment.

This library is still experimental and in the early stages of development.