summaryrefslogtreecommitdiff
path: root/doc/HACKING
diff options
context:
space:
mode:
authorChelsea Holland Komlo <me@chelseakomlo.com>2017-11-11 22:26:22 -0500
committerChelsea Holland Komlo <me@chelseakomlo.com>2017-11-11 23:19:34 -0500
commit1c50331b9af28a691cb48e632ab71d9af83916ba (patch)
treee8716f521e6a1d5237a8bedbb877b9359a69a7ff /doc/HACKING
parent11eaf208c0aaa7c252ead6343ea65a3576227d69 (diff)
downloadtor-1c50331b9af28a691cb48e632ab71d9af83916ba.tar.gz
tor-1c50331b9af28a691cb48e632ab71d9af83916ba.zip
annotate where C and Rust need to stay in sync
Diffstat (limited to 'doc/HACKING')
-rw-r--r--doc/HACKING/GettingStartedRust.md8
1 files changed, 8 insertions, 0 deletions
diff --git a/doc/HACKING/GettingStartedRust.md b/doc/HACKING/GettingStartedRust.md
index a5253b46a6..3cd7fdc42c 100644
--- a/doc/HACKING/GettingStartedRust.md
+++ b/doc/HACKING/GettingStartedRust.md
@@ -125,6 +125,14 @@ is on our TODO list to try to cultivate good standing with various distro
maintainers of `rustc` and `cargo`, in order to ensure that whatever version we
solidify on is readily available.
+If parts of your Rust code needs to stay in sync with C code (such as handling
+enums across the FFI boundary), annonotate these places in a comment structured
+as follows:
+
+ /// C_RUST_COUPLED: <path_to_file> `<name_of_c_object>`
+
+Where <name_of_c_object> can be an enum, struct, constant, etc.
+
Adding your Rust module to Tor's build system
-----------------------------------------------