These are chat archives for rust-lang/rust

22nd
Jan 2019
John
@onFireForGod_gitlab
Jan 22 04:35
How easy is it to reverse engineer rust executable? I am thinking of putting a docker container in public with a rust rocket executable in it and I dont want people seeing the actual code. Well, or is it hard enough so people wont bother to do it
I dont think docker provides any security mechanisms against the host it is running in
Tim Robinson
@1tgr
Jan 22 05:41
Provided you strip symbols (which is the default for --release) it’s very difficult to reverse engineer
Similar to a C or C++ program, a motivated ($$$) attacker can do it, but typically it’s not worth it
John
@onFireForGod_gitlab
Jan 22 05:52
K so cargo run —bin app —release should be sufficient? Just not really sure what you mean by strip symbols
Tim Robinson
@1tgr
Jan 22 06:16
Yep that’s it
John
@onFireForGod_gitlab
Jan 22 06:16
ok got it. thanks
Tim Robinson
@1tgr
Jan 22 06:16
There’s a config option not to strip symbols, which makes it easier if you need to debug a release guild, but makes it also easier for other people to debug (ie reverse engineer) your program
John
@onFireForGod_gitlab
Jan 22 06:17
ok
will keep that in mind
Ogulcan Erduran
@erduranogulcan
Jan 22 13:20
Is there any timer in rust ? I want to use it for request pooling
toxicafunk
@toxicafunk
Jan 22 13:36
why didn't I know this book existed!!!
Victor Lopes
@vlopes11
Jan 22 15:24
@toxicafunk It's quite recent :)
David Holroyd
@dholroyd
Jan 22 21:43
anyone know of a crate that provides an optimised xor(a: &[u8], b: &[u8]) sort of thing?
...assuming its possible to do better than for (a, b) in a.iter_mut().zip(b.iter()) { *a ^= b } of course! :)
toxicafunk
@toxicafunk
Jan 22 21:49
I know rust has bitxor
Denis Lisov
@tanriol
Jan 22 21:49
@dholroyd I'd expect Rust to optimize this on release to (close to) optimal code. I wouldn't work on optimizing this line unless I'm sure this is a bottleneck.
David Holroyd
@dholroyd
Jan 22 21:49
I had the compiler options wrong when I checked :(
on rechecking, it is using xorps %xmm0, %xmm2 etc
sorry!