Crates.io | zcash_script |
lib.rs | zcash_script |
version | 0.2.0 |
source | src |
created_at | 2020-08-14 00:05:13.191813 |
updated_at | 2024-06-10 15:33:32.112421 |
description | ffi bindings to zcashd's zcash_script library |
homepage | |
repository | https://github.com/ZcashFoundation/zcash_script |
max_upload_size | |
id | 276384 |
size | 5,522,696 |
Rust bindings to the ECC's zcash_script
C++ library.
This crate works by manually including the zcash_script
.h and .cpp files,
using bindgen
to generate Rust bindings, and compiling everything together
into a single library.
depend/zcash
with the latest tagged version of zcashd
, using the instructions belowcargo test
. If you get any compiling errors, see
the troubleshooting section below.depend/zcash
We keep a copy of the zcash source in depend/zcash
, but it has diverged
in 0.2.0 release (based on zcashd 5.9.0) with the following changes:
Cargo.toml
was be deleted, since otherwise cargo will ignore the
entire folder when publishing the crate (see
https://github.com/rust-lang/cargo/issues/8597).The simplified API now mostly require files that are truly required for script verification. These are unlikely to change so this crate no longers need to keep the zcashd source in sync, unless there was some bug fix in script verification.
If updating zcashd source is required, you will need to manually update the
depend/zcash
source tree and reapply changes that have been made to it. If
you do that, please document the process in detail in this file.
Releases for zcash-script
are made with the help of cargo release.
CHANGELOG.md
to document any major changes since the last releasecargo release <level>
to commit the release version bump (but not actually publish), <level>
can be patch
, minor
or major
zcash_script
PR with the changes, get it reviewed, and wait for CI to passcargo release --execute <level>
NOTE: It's important to specify the level when using cargo release because of the way it implements the substitutions. We specify a number of automatic substitutions in Cargo.toml
but they will only be applied if cargo release
also handles incrementing the version itself, do not increment the version by hand and then run cargo release
or cargo release -- release
, or it will not correctly update all version references in the codebase.
name
"This likely means that a .c
file is not being included in build.rs
.
Search for name
in the zcashd source tree to find which file contains it,
and add it to a file()
call inside build.rs
.
file
: No such file or directory"This likely means that a .h
file is not being found.
Seach for a file with the given name and add its folder to a .include()
call in build.rs
. If the file does not exist there it's likely from
a 3rd-party dependency that is downloaded at build time. Search for
the file name on some search engine to attempt to find what project
it belongs to, cross-referencing the depends/packages
folder
in zcashd
. Then you may need to copy those files to a folder
inside zcash_script
like we did in depend/expected
.