#23881: Implement a way to utilise tor's logging system from Rust code
------------------------------+------------------------------------
Reporter: isis | Owner: chelseakomlo
Type: enhancement | Status: needs_review
Priority: High | Milestone: Tor: 0.3.3.x-final
Component: Core Tor/Tor | Version:
Severity: Normal | Resolution:
Keywords: rust, rust-pilot | Actual Points:
Parent ID: | Points: 3
Reviewer: | Sponsor:
------------------------------+------------------------------------
Comment (by chelseakomlo):
Replying to [comment:18 manish.earth]:
> Alternatively, have a `static FOO: *const YourType = 0 as *const _;` and
allocate it at the beginning of the test program. That's basically what
lazy_static does, except lazily.
Good suggestion- I took a stab at implementing something similar to what
lazy_static does (declare a static mutable pointer and allocate data on
the heap during assignment). As this code is purely for testing, I don't
have as many safety checks, but open to feedback.
See commit 4cdf0c8899796582b058d289bcd21b95dd1bd452.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/23881#comment:20>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
[email protected]
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs