Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Настройка gnrt_config.toml

Рядом с Cargo.toml находится gnrt_config.toml. В нём содержатся расширения для обработки крейтов, специфичные для Chromium.

Если вы добавляете новый крейт, укажите хотя бы group. Это одно из значений:

#   'safe': The library satisfies the rule-of-2 and can be used in any process.
#   'sandbox': The library does not satisfy the rule-of-2 and must be used in
#              a sandboxed process such as the renderer or a utility process.
#   'test': The library is only used in tests.

Например,

[crate.my-new-crate]
group = 'test' # only used in test code

В зависимости от структуры исходного кода крейта вам также может понадобиться указать в этом файле, где находятся его файлы LICENSE.

Позже мы увидим и другие вещи, которые придётся настроить в этом файле, чтобы решить проблемы.