* Add a basic rust-toolchain.toml
Matches the one in Zebra, although I think pinning to a specific release
(e.g., `channel = "1.82"`) would help with consistency, perhaps avoiding
issues like
https://github.com/ZcashFoundation/zcash_script/pull/174#issuecomment-2445336306
* Remove redundant toolchain info from GH workflow
[actions-rs/toolchain doesn’t support TOML-formatted
rust-toolchain files](actions-rs/toolchain#126), but it’s unnecessary anyway.
- actions-rs/cargo will pick up the rust-toolchain.toml, so we usually
don’t need to mention the toolchain at all;
- the Windows build just runs `rustup target add x86_64-pc-windows-msvc`
directly; and
- where we want to build with multiple toolchains (in a matrix), there
are some slightly-awkward conditionals.
This also makes some other changes:
- `fail-fast` is disabled because it hides useful & distinct build
results; and
- `rustup component add` for clippy and rustfmt are removed because
they’re in the rust-toolchain.toml toolchain, and we want to make sure
they are, so that they’re available to developers.
* Pin rustup channel to "1.81"
Newer versions until 1.85 (current nightly) have some breakage wrt C++
linking.
* Have bindgen target correct rustc version
It should match the version in rust-toolchain.toml. Unfortunately, it’s
not possible to reference that directly, so this adds comments to remind
contributors to update them together.
* Address Str4d’s comments on #171
Notably, `HashType` has changed incompatibly, so
ZcashFoundation/zebra#8751 will need to be updated.
* Apply suggestions from code review
Co-authored-by: Jack Grigg <thestr4d@gmail.com>
* Restrict bitflags used for `HashType` in v5 tx
---------
Co-authored-by: Jack Grigg <thestr4d@gmail.com>
* Move C++ bindings out of lib.rs
Have lib.rs re-export them, but make room for the upcoming Rust implementation.
* Provide a Rustier wrapper for zcash_script
This adds a `Script` trait that exposes slightly Rustier types in order
to have a common interface for the existing C++ implementation as well
as the upcoming Rust implementation (and a third instance that runs both
and checks that the Rust result matches the C++ one).
The module structure (interpreter.rs, zcash_script.rs) and locations of
definitions are intended to mirror the structure of the C++ code, especially as
we get the Rust implementation in place, for easier comparison. That
organization is very likely to change once everything has been checked.
* Address review feedback
Thanks to @nuttycom and @arya2 for getting the closure to work.
* Additional cleanup
* Use `try_from`/`_into` instead of `as`
* Address review feedback
* Widen the `Unknown` error type
This should fix the Windows build.
* switch to MSVC, fixes to support it
* fix linking errors
* document how to patch zcash source
* update hash due to nightly breakage; don't use deprecated bindgen function
* update patch with str4d's upstream suggestion
---------
Co-authored-by: Alfredo Garcia <oxarbitrage@gmail.com>
* Update dependencies to match zcashd v5.5.0
* Update dependencies to match Zebra main branch
* Update release instructions
* Add module docs for the build script to avoid warnings
* Update bridge file list to match the latest zcashd
* Ignore some emacs temporary files
* Standardise directory include paths in Cargo.toml
* Add extra info to cxx_gen errors
* Add additional Rust dependencies needed to compile
* Ignore some expected clippy lints
* Silence a C compiler macro redefinition warning
* Standardise directory paths in build.rs
* fix cxxbridge code generation
* Update Cargo.lock
* Use include!() for bridge.rs
* Add a changelog entry for the next release
* Fix a warning by adding docs for the crate
* Remove previous depend/zcash
* Squashed 'depend/zcash/' content from commit eb80047476
git-subtree-dir: depend/zcash
git-subtree-split: eb80047476e9c0db3524f647d412faf8d4a584ee
* Update depend/zcash to v5.5.0
```sh
git subtree add -P depend/zcash https://github.com/zcash/zcash.git v5.5.0 --squash
git rm depend/zcash/Cargo.toml
```
---------
Co-authored-by: Conrado Gouvea <conradoplg@gmail.com>
* Add extra dependency update steps to the README
* Use correct dependency steps from Cargo.toml
* Explain how to make new dependencies work
* Simplify instructions
* Add "check all open PRs before releasing"
* Add "run cargo-release" to the release instructions
Co-authored-by: Arya <aryasolhi@gmail.com>
---------
Co-authored-by: Arya <aryasolhi@gmail.com>
* delete previous version
* Squashed 'depend/zcash/' content from commit f98166f7f5
git-subtree-dir: depend/zcash
git-subtree-split: f98166f7f556ee9b9f597d45275c32843a87b0b6
* update to zcash 5.2.0
* remove Windows support for now, see #38
* update zcash to new V5 API; add tests
* try using x86_64-pc-windows-gnu on windows
* Expand README
* update zcash
* retrigger build
* update zcash to current nu5-consensus branch
* use Zcash v4.7.0
* add support for zcash_script_transparent_output_address()
* try using x86_64-pc-windows-gnu on windows
* update zcash to version which returns address type