loam-sdk-macro

Crates.ioloam-sdk-macro
lib.rsloam-sdk-macro
version
sourcesrc
created_at2023-08-31 18:44:23.670814
updated_at2025-01-22 19:06:13.025735
descriptionMacros needed by loam-sdk
homepage
repositoryhttps://github.com/loambuild/loam/tree/main/crates/loam-sdk-macro
max_upload_size
id960293
Cargo.toml error:TOML parse error at line 17, column 1 | 17 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include`
size0
Willem Wyndham (willemneal)

documentation

README

loam-sdk-macro

This crate contains the source for the macros that all subcontracts depend on, such as the #[subcontract] macro itself. Rust macros generate code, allowing users to write less. These macros generate the code necessary for all Subcontracts, and do so in a way that makes it easy to author your own Subcontracts.

#[subcontract] is an attribute procedural macro (proc macro) that you need when you create your own subcontracts.

Aside from #[subcontract], this crate also contains the implementation for #[loamstorage], an attribute procedural macro that generates the interface for different Soroban storage types such as Persistent, Instance, and Temporary. It provides both Map and Store types for key-value pair storage or singletons. These are accessed via the loam PersistentMap, InstanceMap, TemporaryMap, PersistentItem, InstanceItem, and TemporaryItem types.

Deprecated The crate also contains the implementation for some derive macros such as IntoKey, which structs in the subcontract need to derive in order to lazily load and store their state on the blockchain. Deprecated in favor of #[loamstorage].

For more information about how to use and author Subcontracts, see the loam-sdk README.

See lib.rs for the implementations of subcontract, IntoKey, and other macros.

Commit count: 0

cargo fmt