MOre pre vtable changes
parent: tbd commit: 9cfa135
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 | unsafe |
46 | println!; |
47 | |
48 | |
49 | |
50 | pub extern "C" |
51 | fmt |
52 | .pretty |
53 | .with_thread_names |
54 | .with_max_level |
55 | .init; |
56 | |
57 | println!; |
58 | let runtime = new_multi_thread |
59 | .enable_all |
60 | .build |
61 | .unwrap; |
62 | |
63 | let _guard = runtime.enter; |
64 | |
65 | forget; |
66 | |
67 | PluginState |
68 | inner: Box into_raw, |
69 | |
70 | |
71 | |
72 | |
73 | pub extern "C" |
74 | state: *mut PluginInitializationState, |
75 | *mut PluginInitializationState |
76 | let _guard: EnteredSpan = trace_span! .entered; |
77 | let init_vtable = INIT_VTABLE.get .unwrap; |
78 | let mut builder = new; |
79 | |
80 | builder.; | .
81 | builder.operation; |
82 | builder.value; |
83 | builder.setting_getter; |
84 | |
85 | state |
86 | |
87 | |
88 | async |
89 | _state: , |
90 | object: Instance, |
91 | operation: ObjectRequest, |
92 | |
93 | info!; |
94 | |
95 | info!; |
96 | |
97 | Ok |
98 | |
99 | |
100 | async |
101 | _state: , |
102 | _object: User, |
103 | |
104 | info!; |
105 | |
106 | Ok |
107 | |
108 | |
109 | async |
110 | _state: , |
111 | _object: User, |
112 | |
113 | info!; |
114 | |
115 | Ok |
116 | |
117 |