Comments 5
Единственная польза от статьи:
SQLx supports compile-time checked queries. It does not, however, do this by providing a Rust API or DSL (domain-specific language) for building queries. Instead, it provides macros that take regular SQL as input and ensure that it is valid for your database. The way this works is that SQLx connects to your development DB at compile time to have the database itself verify (and return some info on) your SQL queries.
Прям как в pl/sql - ранее связывание sql-кода и проверка валидности sql-запроса (и не много прав доступа) в compile-time.
Ну так неинтересно: держать пустую БД с идентичной схемой, только ради compile-time проверок:
The DATABASE_URL environment variable must be set at build time to a database which it can prepare queries against; the database does not have to contain any data but must be the same kind (MySQL, Postgres, etc.) and have the same schema as the database you will be connecting to at runtime.
А где функция анализа сообщения пользователя?
Ну например, "я сьел 24 штуки острых крыльев KFC и выпил же чаю" = 114342 калорий?
На Rust.
Очаровательный маскот и название)
...надо признать, настолько халтурная КДПВ действительно привлекает внимание. Смысла в статье, впрочем, не видно.
Kalorik: Telegram-бот на Rust для анализа питания Часть 1 (Preview)