linera-sdk

Crates.iolinera-sdk
lib.rslinera-sdk
version0.13.0
sourcesrc
created_at2023-04-29 21:52:03.998593
updated_at2024-11-01 15:16:26.56723
descriptionLibrary to support developping Linera applications in Rust.
homepagehttps://linera.dev
repositoryhttps://github.com/linera-io/linera-protocol
max_upload_size
id852322
size352,172
Andreas Fackler (afck)

documentation

https://docs.rs/linera-sdk/latest/linera_sdk/

README

This module provides an SDK for developing Linera applications using Rust.

A Linera application consists of two WebAssembly binaries: a contract and a service. Both binaries have access to the same application and chain specific storage. The service only has read-only access, while the contract can write to it. The storage should be used to store the application state, which is persisted across blocks. The state can be a custom type that uses linera-views, a framework that allows lazily loading selected parts of the state. This is useful if the application's state is large and doesn't need to be loaded in its entirety for every execution.

The contract binary should create a type to implement the Contract trait. The type can store the ContractRuntime and the state, and must have its implementation exported by using the contract! macro.

The service binary should create a type to implement the Service trait. The type can store the ServiceRuntime and the state, and must have its implementation exported by using the service! macro.

Examples

The examples directory contains some example applications.

Contributing

See the CONTRIBUTING file for how to help out.

License

This project is available under the terms of the Apache 2.0 license.

Commit count: 3628

cargo fmt