[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [tor-bugs] #22106 [Core Tor/Tor]: Initial Rust support



#22106: Initial Rust support
--------------------------+------------------------------------
 Reporter:  Sebastian     |          Owner:
     Type:  defect        |         Status:  needs_revision
 Priority:  Medium        |      Milestone:  Tor: 0.3.2.x-final
Component:  Core Tor/Tor  |        Version:
 Severity:  Normal        |     Resolution:
 Keywords:                |  Actual Points:
Parent ID:                |         Points:
 Reviewer:                |        Sponsor:
--------------------------+------------------------------------

Comment (by teor):

 Replying to [comment:7 Sebastian]:
 > Replying to [comment:5 teor]:
 > > > 1) Just commit them along with the Rust and C source code
 > >
 > > We typically have tightly-bound dependencies in src/ext, this would be
 a good place for tor_util and maybe tiny_keccak (as we already have a C
 keccak in ext).
 >
 > I am not sure about that. if we want to use cargo for this (and I think
 we do, otherwise we have to mirror all the dependencies etc in our make
 system), there's a support to have a local crates.io "mirror". Having that
 in a separate location seems good (maybe ext/rust/ would be good).
 >
 > > I think it's ok to expect people to install rust's libc: we already do
 this with libevent and {open,libre,*}SSL. They'll have to install rust, so
 installing libc is a reasonable ask.
 >
 > I don't know what you mean with install rust'c libc. It's a crate that
 needs to be available during building, not a dynamic library you can link
 to or something. The crate provides bindings for different host libc
 implementations.

 Oh, ok, then yes, a local crates mirror seems sensible.
 And a make target to set it up. I can't quite work out how to do it!

 > > Specific commits:
 > >
 > > 9a96733a2dab56342d6b3de1f2c2915429b21725
 > >
 > > Should we run the following rust tests during make check?
 > > * tiny_keccak (yes, if we include it in ext)
 > > * libc (no, but we might want to run it on platforms with poor rust
 support, so let's say that in the instructions)
 >
 > often, crates have more dependencies for running their tests or might
 even require an unstable version of the compiler to run them. Maybe we
 should add a new make target to run tests for rust dependencies?

 Seems like a good idea.

 Is there a linter (?) or style checker (make check-spaces) that we might
 want to run?

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/22106#comment:8>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs