More progress :)
parent: tbd commit: 92c3f32
1 | use ; |
2 | |
3 | use |
4 | , | OperationError
5 | , | Instance
6 | , |
7 | , |
8 | ; |
9 | use |
10 | , | PluginInitializationState
11 | , |
12 | , |
13 | ; |
14 | use PluginStackBuilder; |
15 | use ; |
16 | |
17 | static INIT_VTABLE: = new; |
18 | |
19 | |
20 | pub extern "C" |
21 | const PLUGIN_NAME: &str = "Example Plugin"; |
22 | const PLUGIN_VERSION: &str = "1.0.0"; |
23 | |
24 | FFIPluginMeta |
25 | name: PLUGIN_NAME.as_ptr, |
26 | name_len: PLUGIN_NAME.len, |
27 | version: PLUGIN_VERSION.as_ptr, |
28 | version_len: PLUGIN_VERSION.len, |
29 | |
30 | |
31 | |
32 | |
33 | pub extern "C" |
34 | println!; |
35 | |
36 | |
37 | |
38 | pub extern "C" |
39 | INIT_VTABLE.set .unwrap; |
40 | println!; |
41 | |
42 | |
43 | |
44 | pub extern "C" |
45 | fmt |
46 | .pretty |
47 | .with_thread_names |
48 | .with_max_level |
49 | .init; |
50 | |
51 | println!; |
52 | let runtime = new_multi_thread |
53 | .enable_all |
54 | .build |
55 | .unwrap; |
56 | |
57 | let _guard = runtime.enter; |
58 | |
59 | forget; |
60 | |
61 | PluginState |
62 | inner: Box into_raw, |
63 | |
64 | |
65 | |
66 | |
67 | pub extern "C" |
68 | state: *mut PluginInitializationState, |
69 | *mut PluginInitializationState |
70 | let _guard: EnteredSpan = trace_span! .entered; |
71 | let init_vtable = INIT_VTABLE.get .unwrap; |
72 | let mut builder = new; |
73 | |
74 | builder.; | .
75 | builder.operation; |
76 | builder.value; |
77 | builder.setting_getter; |
78 | |
79 | state |
80 | |
81 | |
82 | async |
83 | _state: , |
84 | object: Instance, |
85 | operation: ObjectRequest, |
86 | |
87 | info!; |
88 | |
89 | info!; |
90 | |
91 | Ok |
92 | |
93 | |
94 | async |
95 | _state: , |
96 | _object: User, |
97 | |
98 | info!; |
99 | |
100 | Ok |
101 | |
102 | |
103 | async |
104 | _state: , |
105 | _object: User, |
106 | |
107 | info!; |
108 | |
109 | Ok |
110 | |
111 |