12 releases

0.1.11 May 3, 2023
0.1.10 Apr 27, 2023

#1 in #mashin

29 downloads per month
Used in 3 crates (2 directly)

MIT license

52KB
577 lines

License: MIT Docs Latest crates.io

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 and Resource traits for implementing custom providers and resources
  • construct_provider! and resource macros for simplifying provider and resource creation
  • ProviderState for managing provider state data
  • ResourceResult for handling serialized resource state
  • CliLogger 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

~9–20MB
~226K SLoC