Skip to content

Instantly share code, notes, and snippets.

@peterjoel
Created March 26, 2016 00:27
Show Gist options
  • Save peterjoel/ab296c74d54ce60ac133 to your computer and use it in GitHub Desktop.
Save peterjoel/ab296c74d54ce60ac133 to your computer and use it in GitHub Desktop.
peter$ cargo run
Compiling crypto_test v0.1.0 (file:///Users/peter/dev/rust/crypto_test)
error: linking with `cc` failed: exit code: 1
note: "cc" "-m64" "-L" "/Users/peter/.multirust/toolchains/nightly/lib/rustlib/x86_64-apple-darwin/lib" "/Users/peter/dev/rust/crypto_test/target/debug/crypto_test.0.o" "-o" "/Users/peter/dev/rust/crypto_test/target/debug/crypto_test" "-Wl,-dead_strip" "-nodefaultlibs" "-L" "/Users/peter/dev/rust/crypto_test/target/debug" "-L" "/Users/peter/dev/rust/crypto_test/target/debug/deps" "-L" "/Users/peter/.multirust/toolchains/nightly/lib/rustlib/x86_64-apple-darwin/lib" "/Users/peter/dev/rust/crypto_test/target/debug/deps/libsecrets-0014f6abd3757ae1.rlib" "/Users/peter/dev/rust/crypto_test/target/debug/deps/liblibc-dd3420cb049117bb.rlib" "/Users/peter/.multirust/toolchains/nightly/lib/rustlib/x86_64-apple-darwin/lib/libstd-fd663c41.rlib" "/Users/peter/.multirust/toolchains/nightly/lib/rustlib/x86_64-apple-darwin/lib/libcollections-fd663c41.rlib" "/Users/peter/.multirust/toolchains/nightly/lib/rustlib/x86_64-apple-darwin/lib/librustc_unicode-fd663c41.rlib" "/Users/peter/.multirust/toolchains/nightly/lib/rustlib/x86_64-apple-darwin/lib/librand-fd663c41.rlib" "/Users/peter/.multirust/toolchains/nightly/lib/rustlib/x86_64-apple-darwin/lib/liballoc-fd663c41.rlib" "/Users/peter/.multirust/toolchains/nightly/lib/rustlib/x86_64-apple-darwin/lib/liballoc_jemalloc-fd663c41.rlib" "/Users/peter/.multirust/toolchains/nightly/lib/rustlib/x86_64-apple-darwin/lib/liblibc-fd663c41.rlib" "/Users/peter/.multirust/toolchains/nightly/lib/rustlib/x86_64-apple-darwin/lib/libcore-fd663c41.rlib" "-l" "sodium" "-l" "c" "-l" "m" "-l" "System" "-l" "pthread" "-l" "c" "-l" "m" "-Wl,-rpath,@loader_path/../../../../../.multirust/toolchains/nightly/lib/rustlib/x86_64-apple-darwin/lib" "-Wl,-rpath,/usr/local/lib/rustlib/x86_64-apple-darwin/lib" "-l" "compiler-rt"
note: ld: library not found for -lsodium
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: aborting due to previous error
Could not compile `crypto_test`.
To learn more, run the command again with --verbose.
extern crate secrets;
use secrets::Secret;
type Secret256 = Secret<[u8; 32]>;
fn main() {
let secret = Secret256::random();
println!("{:?}", secret);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment