Skip to content
This repository has been archived by the owner on Feb 24, 2023. It is now read-only.

Tech Preview 1

Pre-release
Pre-release
Compare
Choose a tag to compare
@jt-nti jt-nti released this 17 Sep 14:17
· 1 commit to master since this release
858a309

Welcome to the first tech preview of the Rust Fabric Contract API!

This is the API to use for writing Smart Contracts against Hyperledger Fabric - but in Rust! It's an evolution of the Contract API first seen in Node.js several releases ago. It takes feedback from that API and also the proposed Ledger API to present a coherent high-level approach to writing Smart Contracts.

Three examples are provided, an essential 'basic-contract', a version of the basic 'Asset Transfer' sample from the main Fabric-Samples repo. Also a version of the full 'Secure Asset Transfer' sample from Fabric-Samples; this is 'work-in-progress' so won't yet run, but it does show the expressive power of the updated API, and is under half the size of the corresponding Go version.

Experimental Features

🔬 Macros to define your Contracts and Transaction Functions as Rust structs
🔬 Support adding to, and getting from world state and private data collections with a unified API
🔬 Manage transient data in a more natural and easier approach
🔬 Use the power of Rust to easily define your own data types and serialization formats (examples use Serde)
🔬 Support key range query; rich query is not yet supported

Notes

⚠️ This is an early prototype: we want to hear what you think!