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
mod blobs;
mod gen;
mod helpers;
mod pe;
mod strings;
mod tables;
use blobs::*;

pub use gen::*;
use helpers::*;
use std::collections::*;
use strings::*;
use tables::*;

pub fn test() {
    let mut tables = Tables::new();
    tables.module.push(Module::new("test.winmd"));
    tables.type_def.push(TypeDef::module());

    let mut stringable = TypeDef::winrt_interface("IStringable", "Windows.Foundation");
    stringable.method_list.push(MethodDef::new("ToString"));
    tables.type_def.push(stringable);

    let mut closable = TypeDef::winrt_interface("IClosable", "Windows.Foundation");
    closable.method_list.push(MethodDef::new("Close"));
    tables.type_def.push(closable);

    pe::write("/git/test.winmd", tables);
}