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
///
/// This example shows a basic usage of the runtime
/// with Typescript modules
///
/// They will get transpiled automatically into JS, but
/// provide no type checking at this time
///
/// The call to Runtime::execute_module is a one liner which:
/// - Creates a new runtime with the given options
/// - Loads the modules passed in
/// - Calls the module's entrypoint function
/// - Either a default passed as an option
/// - Or the module's default export
/// - Or a call in JS to rustyscript.register_entrypoint
/// - Returns the result
///
/// Instead of just vec![], one could pass in other JS modules
/// which could be imported using `import './filename.js';`
///
use ;