[tor-bugs] #24249 [Core Tor/Tor]: Create automated mechanism for C/Rust types to stay in sync

Tor Bug Tracker & Wiki blackhole at torproject.org
Sat Nov 11 21:59:01 UTC 2017


#24249: Create automated mechanism for C/Rust types to stay in sync
------------------------------+--------------------
     Reporter:  chelseakomlo  |      Owner:  (none)
         Type:  enhancement   |     Status:  new
     Priority:  Medium        |  Milestone:
    Component:  Core Tor/Tor  |    Version:
     Severity:  Normal        |   Keywords:  rust
Actual Points:                |  Parent ID:
       Points:                |   Reviewer:
      Sponsor:                |
------------------------------+--------------------
 In transitioning parts of tor to Rust, some parts of the code will either
 need to temporarily exist in both C and Rust (such as protover), or will
 be highly coupled (such as enums that are passed between the FFI
 boundary).

 It would be good to automatically verify these areas of the code don't get
 out of sync. This could either be a post-hoc verifier, or a generator that
 takes a higher-level specification and generates both C and Rust headers.

 Ideally, the coupling between C and Rust will be as minimal as possible,
 so this probably does not need to be a heavyweight solution.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/24249>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list