shape-runtime 0.2.0

Bytecode compiler, builtins, and runtime infrastructure for Shape
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// Distribution safety trait for remote execution.
// Types implementing Distributable can be safely transferred
// across node boundaries for distributed computing.

/// Describe whether a value can be moved across distributed execution
/// boundaries and how expensive that transfer is expected to be.
trait Distributable {
    /// Estimated wire size in bytes for transfer cost estimation
    wire_size(self): int

    /// Whether self value produces deterministic results
    /// (enables caching and result deduplication across nodes)
    is_deterministic(self): bool
}