rust-secp256k1-unsafe-fast/secp256k1-sys
Tobin C. Harding 47aa740c74
Improve the README files
Improve the secp256k1 readme by:

- Use a top level markdown header (level 1)
- Add a link to the SECG's website (www.secg.org)
- Add a link for `secp256k1` to bitcoin.it explaining the curve

Improve the secp256k1-sys readme by:

- Mirror secp256k1 readme badges, heading, docs link
- Basic cleanup
 - Use 100 column width
 - Use backticks
 - Use capitals
2023-05-16 08:49:03 +10:00
..
depend secp-sys: update README for new vendoring script 2023-03-30 12:40:18 +00:00
src Merge rust-bitcoin/rust-secp256k1#609: Introduce SPDX license identifiers 2023-05-04 18:17:24 +00:00
wasm Move WASM const definitions to a source file 2022-03-30 10:22:37 +11:00
CHANGELOG.md Bump MSRV to 1.48 2023-03-31 09:43:50 +11:00
Cargo.toml Use doc_auto_cfg 2023-05-03 12:06:25 +10:00
LICENSE Add secp256k1-sys README and LICENSE files 2019-11-27 21:02:44 +00:00
README.md Improve the README files 2023-05-16 08:49:03 +10:00
build.rs Introduce SPDX license identifiers 2023-05-03 11:37:07 +10:00
vendor-libsecp.sh secp-sys: update README for new vendoring script 2023-03-30 12:40:18 +00:00

README.md

Rust secp256k1-sys

Crate Info CC0 1.0 Universal Licensed API Docs Rustc Version 1.48.0+

Provides low-level bindings to the C FFI exposed by libsecp256k1.

Vendoring

The default build process is to build using the vendored libsecp256k1 sources in the depend directory. These sources are prefixed with a special rust-secp256k1-sys-specific prefix rustsecp256k1_v1_2_3_.

This prefix ensures that no symbol collision can happen:

  • When a Rust project has two different versions of rust-secp256k1 in its depepdency tree, or
  • When rust-secp256k1 is used for building a static library in a context where existing libsecp256k1 symbols are already linked.

To update the vendored sources, use the vendor-libsecp.sh script: ./vendor-libsecp.sh <rev>

  • Where <rev> is the git revision of libsecp256k1 to checkout. If you do not specify a revision, the script will simply clone the repo and use whatever revision the default branch is pointing to.

Linking to external symbols

Danger: doing this incorrectly may have catastrophic consequences!

This is mainly intended for applications consisting of various programming languages that intend to link the same library to save space, or bundles of multiple binaries coming from the same source. Do not use this to link to a random secp256k1 library you found in your OS! If you are packaging software that depends on rust-secp256k1, using this flag to link to another package, make sure you stay within the binary compatibility guarantees of that package. For example, in Debian if you need libsecp256k1 1.2.3, make sure your package requires a version strictly>= 1.2.3 << 1.2.4. Note also that unless you're packaging the library for an official repository you should prefix your package and the library with a string specific to you. E.g. if you have a set of packages called my-awesome-packages you should package libsecp256k1 as libmy-awesome-packages-secp256k1 and depend on that library/package name from your application.

If you want to compile this library without using the bundled symbols (which may be required for integration into other build systems), you can do so by adding --cfg=rust_secp_no_symbol_renaming' to your RUSTFLAGS variable.

Minimum Supported Rust Version

This library should always compile with any combination of features on Rust 1.48.0.