Marlowe Lang

An experimental Rust implementation of the Marlowe DSL for Cardano smart (financial) contracts. It allows you to create Marlowe contracts from Rust rather than using Marlowe directly.

It is used by the MarloweLSP VSCode Extention (Syntax highlighting for Marlowe in VSCode).

Main Features

Planned features

Disclaimers

Example usage

```rust use marlowelang::types::marlowe::*; use marlowelang::parsing::{ deserialization::deserialize, serialization::serialize, };

let mycontract = Contract::When { cases: vec![ Case { action: Action::Notify { notifyif: Observation::TrueObs }, contract: Contract::Close.boxed() } ], timeout: Timeout::TimeParam("test".into()), timeout_continuation: Contract::Close.boxed(), };

let serialized = serialize(my_contract); let deserialized : Contract = deserialize(&serialized).unwrap(); println!("{serialized}"); ```

Where 'println!("{serialized}")' would output this:

text When [ Case (Notify (TrueObs)) Close ] (TimeParam "test") Close