Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
rust_sodium
Rust bindings to libsodium.
This project is largely based on sodiumoxide. Some main differences are:
- this project builds or downloads libsodium by default, favouring a statically-built, fixed version of the native library
- offers the ability to initialise libsodium with a psuedorandom number generator, allowing for reproducible data to be generated, which can be useful in the context of tests
- implements a test to ensure the FFI bindings match the native library's interface
- runs CI tests on Windows (AppVeyor), OS X and Linux (Travis)
Crate | Documentation | Linux/macOS | Windows | Issues |
---|---|---|---|---|
MaidSafe website | SAFE Dev Forum | SAFE Network Forum |
---|
Note for building on Linux
Certain situations may require building libsodium configured with --disable-pie
. To enable this,
set an environment variable RUST_SODIUM_DISABLE_PIE
while building, e.g.
RUST_SODIUM_DISABLE_PIE=1
To use your own copy of libsodium
If you already have a copy of libsodium, you can choose to link this rather than having rust_sodium
download and build libsodium for you. You should ensure that it is the same version as is specified
in VERSION
of
our build.rs file.
Set an environment variable RUST_SODIUM_LIB_DIR
to the folder where libsodium exists. A static
version of libsodium will be preferred unless you also set RUST_SODIUM_SHARED
to any value.
Alternatively, you can use pkgconfig if appropriate to locate libsodium by setting
RUST_SODIUM_USE_PKG_CONFIG
to any value. In this case, RUST_SODIUM_SHARED
has no effect, and
generally a shared version of libsodium will be used.
Cross-Compiling
Cross-Compiling for ARM
-
Install dependencies and toolchain:
-
Add the following to a .cargo/config file:
[target.armv7-unknown-linux-gnueabihf] linker = "arm-linux-gnueabihf-gcc"
-
Build by running:
Cross-Compiling for 32-bit Linux
-
Install dependencies and toolchain:
-
Build by running:
License
This SAFE Network library is dual-licensed under the Modified BSD (LICENSE-BSD https://opensource.org/licenses/BSD-3-Clause) or the MIT license (LICENSE-MIT https://opensource.org/licenses/MIT) at your option.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.