@@ -100,10 +100,7 @@ static MonoArray* stdb_buffer_consume(Buffer buf);
100100// return out;
101101// }
102102
103- #define STDB_IMPORT_MODULE_MINOR (minor ) "spacetime_6." #minor
104- #define STDB_IMPORT_MODULE STDB_IMPORT_MODULE_MINOR(0)
105-
106- __attribute__((import_module (STDB_IMPORT_MODULE ),
103+ __attribute__((import_module ("spacetime" ),
107104 import_name ("_get_table_id" ))) extern uint16_t
108105_get_table_id (const char * name , size_t name_len , uint32_t * out );
109106
@@ -120,7 +117,7 @@ static uint32_t stdb_get_table_id(MonoString* name_) {
120117 return out ;
121118}
122119
123- __attribute__((import_module (STDB_IMPORT_MODULE ),
120+ __attribute__((import_module ("spacetime" ),
124121 import_name ("_create_index" ))) extern uint16_t
125122_create_index (const char * index_name ,
126123 size_t index_name_len ,
@@ -144,7 +141,7 @@ static void stdb_create_index(MonoString* index_name_,
144141 check_result (result );
145142}
146143
147- __attribute__((import_module (STDB_IMPORT_MODULE ),
144+ __attribute__((import_module ("spacetime" ),
148145 import_name ("_iter_by_col_eq" ))) extern uint16_t
149146_iter_by_col_eq (uint32_t table_id ,
150147 uint32_t col_id ,
@@ -166,7 +163,7 @@ static MonoArray* stdb_iter_by_col_eq(uint32_t table_id,
166163 return stdb_buffer_consume (out );
167164}
168165
169- __attribute__((import_module (STDB_IMPORT_MODULE ),
166+ __attribute__((import_module ("spacetime" ),
170167 import_name ("_insert" ))) extern uint16_t
171168_insert (uint32_t table_id , uint8_t * row , size_t row_len );
172169
@@ -178,7 +175,7 @@ static void stdb_insert(uint32_t table_id, MonoArray* row_) {
178175 check_result (result );
179176}
180177
181- // __attribute__((import_module(STDB_IMPORT_MODULE ),
178+ // __attribute__((import_module("spacetime" ),
182179// import_name("_delete_pk"))) extern uint16_t
183180// _delete_pk(uint32_t table_id, const uint8_t* pk, size_t pk_len);
184181
@@ -190,7 +187,7 @@ static void stdb_insert(uint32_t table_id, MonoArray* row_) {
190187// check_result(result);
191188// }
192189
193- // __attribute__((import_module(STDB_IMPORT_MODULE ),
190+ // __attribute__((import_module("spacetime" ),
194191// import_name("_delete_value"))) extern uint16_t
195192// _delete_value(uint32_t table_id, const uint8_t* row, size_t row_len);
196193
@@ -202,7 +199,7 @@ static void stdb_insert(uint32_t table_id, MonoArray* row_) {
202199// check_result(result);
203200// }
204201
205- __attribute__((import_module (STDB_IMPORT_MODULE ),
202+ __attribute__((import_module ("spacetime" ),
206203 import_name ("_delete_by_col_eq" ))) extern uint16_t
207204_delete_by_col_eq (uint32_t table_id ,
208205 uint32_t col_id ,
@@ -224,7 +221,7 @@ static uint32_t stdb_delete_by_col_eq(uint32_t table_id,
224221 return out ;
225222}
226223
227- // __attribute__((import_module(STDB_IMPORT_MODULE ),
224+ // __attribute__((import_module("spacetime" ),
228225// import_name("_delete_range"))) extern uint16_t
229226// _delete_range(uint32_t table_id,
230227// uint32_t col_id,
@@ -251,7 +248,7 @@ static uint32_t stdb_delete_by_col_eq(uint32_t table_id,
251248// return out;
252249// }
253250
254- __attribute__((import_module (STDB_IMPORT_MODULE ),
251+ __attribute__((import_module ("spacetime" ),
255252 import_name ("_iter_start" ))) extern uint16_t
256253_iter_start (uint32_t table_id , BufferIter * out );
257254
@@ -261,7 +258,7 @@ static void stdb_iter_start(uint32_t table_id, BufferIter* iter) {
261258 check_result (result );
262259}
263260
264- __attribute__((import_module (STDB_IMPORT_MODULE ),
261+ __attribute__((import_module ("spacetime" ),
265262 import_name ("_iter_start_filtered" ))) extern uint16_t
266263_iter_start_filtered (uint32_t table_id ,
267264 const uint8_t * filter ,
@@ -279,7 +276,7 @@ static void stdb_iter_start_filtered(uint32_t table_id,
279276 check_result (result );
280277}
281278
282- __attribute__((import_module (STDB_IMPORT_MODULE ),
279+ __attribute__((import_module ("spacetime" ),
283280 import_name ("_iter_next" ))) extern uint16_t
284281_iter_next (BufferIter iter , Buffer * out );
285282
@@ -292,7 +289,7 @@ static MonoArray* stdb_iter_next(BufferIter iter) {
292289 return stdb_buffer_consume (out );
293290}
294291
295- __attribute__((import_module (STDB_IMPORT_MODULE ),
292+ __attribute__((import_module ("spacetime" ),
296293 import_name ("_iter_drop" ))) extern uint16_t
297294_iter_drop (BufferIter iter );
298295
@@ -310,7 +307,7 @@ static void stdb_iter_drop(BufferIter* iter) {
310307 check_result (result );
311308}
312309
313- __attribute__((import_module (STDB_IMPORT_MODULE ),
310+ __attribute__((import_module ("spacetime" ),
314311 import_name ("_console_log" ))) extern void
315312_console_log (uint8_t level ,
316313 const char * target ,
@@ -338,7 +335,7 @@ static void stdb_console_log(MonoString* text_,
338335 free_string (filename );
339336}
340337
341- __attribute__((import_module (STDB_IMPORT_MODULE ),
338+ __attribute__((import_module ("spacetime" ),
342339 import_name ("_schedule_reducer" ))) extern void
343340_schedule_reducer (const char * name ,
344341 size_t name_len ,
@@ -363,19 +360,19 @@ static void stdb_schedule_reducer(
363360 free_string (name );
364361}
365362
366- __attribute__((import_module (STDB_IMPORT_MODULE ),
363+ __attribute__((import_module ("spacetime" ),
367364 import_name ("_cancel_reducer" ))) extern void
368365_cancel_reducer (ScheduleToken token );
369366
370367static void stdb_cancel_reducer (ScheduleToken * token ) {
371368 _cancel_reducer (* token );
372369}
373370
374- __attribute__((import_module (STDB_IMPORT_MODULE ),
371+ __attribute__((import_module ("spacetime" ),
375372 import_name ("_buffer_len" ))) extern size_t
376373_buffer_len (Buffer buf );
377374
378- __attribute__((import_module (STDB_IMPORT_MODULE ),
375+ __attribute__((import_module ("spacetime" ),
379376 import_name ("_buffer_consume" ))) extern void
380377_buffer_consume (Buffer buf , uint8_t * into , size_t len );
381378
@@ -390,7 +387,7 @@ static MonoArray* stdb_buffer_consume(Buffer buf) {
390387 return result ;
391388}
392389
393- __attribute__((import_module (STDB_IMPORT_MODULE ),
390+ __attribute__((import_module ("spacetime" ),
394391 import_name ("_buffer_alloc" ))) extern Buffer
395392_buffer_alloc (const uint8_t * data , size_t data_len );
396393
@@ -779,3 +776,8 @@ __attribute__((export_name("__preinit__10_init_csharp"))) void
779776__preinit__10_init_csharp () {
780777 _start ();
781778}
779+
780+ // __attribute__((export_name("SPACETIME_ABI_VERSION"))) -
781+ // doesn't work on non-functions, must specify on command line
782+ const uint32_t SPACETIME_ABI_VERSION = /* 5.0 */ (5 << 16 ) | 0 ;
783+ const uint8_t SPACETIME_ABI_VERSION_IS_ADDR = 1 ;
0 commit comments