From 767ae87191934148284ec79700899422eb73158c Mon Sep 17 00:00:00 2001 From: David Adam Date: Wed, 6 Nov 2024 23:27:04 +0800 Subject: [PATCH] CONTRIBUTING.rst: update for Rust --- CONTRIBUTING.rst | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 26984c3e5..767cd7d69 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -42,8 +42,8 @@ Guidelines In short: -- Be conservative in what you need (``C++11``, few dependencies) -- Use automated tools to help you (including ``make test``, ``build_tools/style.fish`` and ``make lint``) +- Be conservative in what you need (keep to the agreed minimum supported Rust version, limit new dependencies) +- Use automated tools to help you (including ``make test`` and ``build_tools/style.fish``) Contributing completions ======================== @@ -101,7 +101,7 @@ To ensure your changes conform to the style rules run before committing your change. That will run our autoformatters: -- ``git-clang-format`` for c++ +- ``rustfmt`` for Rust - ``fish_indent`` (shipped with fish) for fish script - ``black`` for python @@ -322,12 +322,12 @@ Setting Code Up For Translations -------------------------------- All non-debug messages output for user consumption should be marked for -translation. In C++, this requires the use of the ``_`` (underscore) -macro: +translation. In Rust, this requires the use of the ``wgettext!`` or ``wgettext_fmt!`` +macros: :: - streams.out.append_format(_(L"%ls: There are no jobs\n"), argv[0]); + streams.out.append(wgettext_fmt!("%ls: There are no jobs\n", argv[0])); All messages in fish script must be enclosed in single or double quote characters for our message extraction script to find them.