Link Rust Tests to C Dependencies in Tor (allow integration testing from Rust to C)
currently, it is not possible to call C Tor, directly or indirectly, from rust tests. one of the following must be done:
provide rust stubs for all C functions that may be needed for tests (impractical)
test rust functions from C (so we will have C tests calling Rust functions calling C functions)
link C functions into rust doctests (preferred)
never call C-using rust functions in tests (leads to poor test coverage, very bad)
my branch https://cgit.alxu.ca/tor.git/commit/?h=fix-rust-tests implements option 3 poorly. this is a bad solution firstly because it is very ugly, and secondly because it does not properly pass the system linking arguments, e.g. -L/opt/ssl. thirdly, it may hide problems in or cause to be compiled incorrectly dependency crates.
this ticket blocks a number of rust improvements, since of course we would like to actually test the improvements, and doctests are the best way to do it in rust.