1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
//! Bend Interface Module
//!
//! This module provides functionality for running Bend books and commands.
//! It includes a `run` function that executes a command on a given Bend book
//! and returns the result along with diagnostics.
//!
//! # Dependencies
//!
//! - `bend::diagnostics`: For handling diagnostics during execution
//! - `bend::fun`: For working with Bend books and terms
//! - `bend`: For compilation and runtime options
use ;
use ;
use ;
/**
Runs a command on a book and returns the result.
# Arguments
* `book` - The book to run in the HVM.
* `cmd` - The runtime to run the book on: Rust, C or CUDA.
# Returns
An `Option` containing a tuple with the following elements:
* `Term` - The resulting term.
* `String` - The output of the command.
* `Diagnostics` - Any diagnostics generated during the execution.
# Panics
This function will panic if the HVM execution fails.
*/