mechtron 0.3.2

Part of http://thecosmicinitiative.io This package--MECHTRON--provides an API and framework that allows a Wasm component to send and receive messages from other Wasm components.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use crate::membrane::mechtron_consume_string;
use crate::{mechtron_timestamp, mechtron_uuid};
use cosmic_space::loc;
use cosmic_space::wasm::Timestamp;

#[no_mangle]
extern "C" fn cosmic_uuid() -> loc::Uuid {
    loc::Uuid::from_unwrap(mechtron_consume_string(unsafe { mechtron_uuid() }).unwrap())
}

#[no_mangle]
extern "C" fn cosmic_timestamp() -> Timestamp {
    Timestamp::new(unsafe { mechtron_timestamp() })
}