12 releases
0.1.11 | May 3, 2023 |
---|---|
0.1.10 | Apr 27, 2023 |
#1995 in Web programming
Used in 3 crates
(2 directly)
52KB
577 lines
mashin_sdk
The Mashin SDK is a Rust library for creating custom providers and resources that can be used with the Mashin engine. It provides a set of traits and macros that simplify the process of developing new providers and resources, making it easy for developers to extend the functionality of Mashin.
Features
Provider
andResource
traits for implementing custom providers and resourcesconstruct_provider!
andresource
macros for simplifying provider and resource creationProviderState
for managing provider state dataResourceResult
for handling serialized resource stateCliLogger
for easy provider and resource logging- Utility functions for merging JSON and deserializing state fields
Getting Started
To get started with the Mashin SDK, add it as a dependency to your Cargo.toml:
[dependencies]
mashin_sdk = "0.1"
Then, you can start building your custom provider or resource by implementing the appropriate traits and using the provided macros.
Example
Here's a simple example of how to create a custom provider and resource using the Mashin SDK:
/// Construct the provider and register resources
mashin_sdk::construct_provider!(
my_provider,
config = {},
resources = [my_resource],
);
/// Create a resource
#[mashin_sdk::resource]
pub mod my_resource {
#[mashin::config]
pub struct Config {}
#[mashin::resource]
pub struct Resource {}
#[mashin::calls]
impl mashin_sdk::Resource for Resource {}
}
Documentation
For more information on how to use the Mashin SDK see the documentation.
About us
Nutshimit is an innovative software company specializing in Infrastructure as Code (IaC) solutions. Our flagship product, Mashin, empowers developers to streamline infrastructure management with a secure, user-friendly, and efficient scripting engine. Built on top of Deno and Rust, Mashin combines the power of TypeScript with the flexibility and safety of a sandboxed environment.
Join us as we revolutionize the way developers create and manage cloud infrastructure.
Dependencies
~10–20MB
~246K SLoC