@@ -337,34 +337,34 @@ typedef package_type_t PackageType;
337
337
typedef wasm_section_t WASMSection , AOTSection ;
338
338
339
339
/* See wasm_export.h for description */
340
- bool
340
+ WASM_RUNTIME_API_EXTERN bool
341
341
wasm_runtime_init (void );
342
342
343
343
/* See wasm_export.h for description */
344
- bool
344
+ WASM_RUNTIME_API_EXTERN bool
345
345
wasm_runtime_full_init (RuntimeInitArgs * init_args );
346
346
347
347
/* See wasm_export.h for description */
348
- void
348
+ WASM_RUNTIME_API_EXTERN void
349
349
wasm_runtime_destroy (void );
350
350
351
351
/* See wasm_export.h for description */
352
- PackageType
352
+ WASM_RUNTIME_API_EXTERN PackageType
353
353
get_package_type (const uint8 * buf , uint32 size );
354
354
355
355
356
356
/* See wasm_export.h for description */
357
- WASMModuleCommon *
357
+ WASM_RUNTIME_API_EXTERN WASMModuleCommon *
358
358
wasm_runtime_load (const uint8 * buf , uint32 size ,
359
359
char * error_buf , uint32 error_buf_size );
360
360
361
361
/* See wasm_export.h for description */
362
- WASMModuleCommon *
362
+ WASM_RUNTIME_API_EXTERN WASMModuleCommon *
363
363
wasm_runtime_load_from_sections (WASMSection * section_list , bool is_aot ,
364
364
char * error_buf , uint32 error_buf_size );
365
365
366
366
/* See wasm_export.h for description */
367
- void
367
+ WASM_RUNTIME_API_EXTERN void
368
368
wasm_runtime_unload (WASMModuleCommon * module );
369
369
370
370
/* Internal API */
@@ -379,58 +379,58 @@ wasm_runtime_deinstantiate_internal(WASMModuleInstanceCommon *module_inst,
379
379
bool is_sub_inst );
380
380
381
381
/* See wasm_export.h for description */
382
- WASMModuleInstanceCommon *
382
+ WASM_RUNTIME_API_EXTERN WASMModuleInstanceCommon *
383
383
wasm_runtime_instantiate (WASMModuleCommon * module ,
384
384
uint32 stack_size , uint32 heap_size ,
385
385
char * error_buf , uint32 error_buf_size );
386
386
387
387
/* See wasm_export.h for description */
388
- void
388
+ WASM_RUNTIME_API_EXTERN void
389
389
wasm_runtime_deinstantiate (WASMModuleInstanceCommon * module_inst );
390
390
391
391
/* See wasm_export.h for description */
392
- WASMFunctionInstanceCommon *
392
+ WASM_RUNTIME_API_EXTERN WASMFunctionInstanceCommon *
393
393
wasm_runtime_lookup_function (WASMModuleInstanceCommon * const module_inst ,
394
394
const char * name , const char * signature );
395
395
396
396
/* See wasm_export.h for description */
397
- WASMExecEnv *
397
+ WASM_RUNTIME_API_EXTERN WASMExecEnv *
398
398
wasm_runtime_create_exec_env (WASMModuleInstanceCommon * module_inst ,
399
399
uint32 stack_size );
400
400
401
401
/* See wasm_export.h for description */
402
- void
402
+ WASM_RUNTIME_API_EXTERN void
403
403
wasm_runtime_destroy_exec_env (WASMExecEnv * exec_env );
404
404
405
405
/* See wasm_export.h for description */
406
- WASMModuleInstanceCommon *
406
+ WASM_RUNTIME_API_EXTERN WASMModuleInstanceCommon *
407
407
wasm_runtime_get_module_inst (WASMExecEnv * exec_env );
408
408
409
409
/* See wasm_export.h for description */
410
- void *
410
+ WASM_RUNTIME_API_EXTERN void *
411
411
wasm_runtime_get_function_attachment (WASMExecEnv * exec_env );
412
412
413
413
/* See wasm_export.h for description */
414
- void
414
+ WASM_RUNTIME_API_EXTERN void
415
415
wasm_runtime_set_user_data (WASMExecEnv * exec_env , void * user_data );
416
416
417
417
/* See wasm_export.h for description */
418
- void *
418
+ WASM_RUNTIME_API_EXTERN void *
419
419
wasm_runtime_get_user_data (WASMExecEnv * exec_env );
420
420
421
421
/* See wasm_export.h for description */
422
- bool
422
+ WASM_RUNTIME_API_EXTERN bool
423
423
wasm_runtime_call_wasm (WASMExecEnv * exec_env ,
424
424
WASMFunctionInstanceCommon * function ,
425
425
uint32 argc , uint32 argv []);
426
426
427
- bool
427
+ WASM_RUNTIME_API_EXTERN bool
428
428
wasm_runtime_call_wasm_a (WASMExecEnv * exec_env ,
429
429
WASMFunctionInstanceCommon * function ,
430
430
uint32 num_results , wasm_val_t * results ,
431
431
uint32 num_args , wasm_val_t * args );
432
432
433
- bool
433
+ WASM_RUNTIME_API_EXTERN bool
434
434
wasm_runtime_call_wasm_v (WASMExecEnv * exec_env ,
435
435
WASMFunctionInstanceCommon * function ,
436
436
uint32 num_results , wasm_val_t * results ,
@@ -464,85 +464,85 @@ wasm_runtime_create_exec_env_and_call_wasm(WASMModuleInstanceCommon *module_inst
464
464
uint32 argc , uint32 argv []);
465
465
466
466
/* See wasm_export.h for description */
467
- bool
467
+ WASM_RUNTIME_API_EXTERN bool
468
468
wasm_application_execute_main (WASMModuleInstanceCommon * module_inst ,
469
469
int32 argc , char * argv []);
470
470
471
471
/* See wasm_export.h for description */
472
- bool
472
+ WASM_RUNTIME_API_EXTERN bool
473
473
wasm_application_execute_func (WASMModuleInstanceCommon * module_inst ,
474
474
const char * name , int32 argc , char * argv []);
475
475
476
476
/* See wasm_export.h for description */
477
- void
477
+ WASM_RUNTIME_API_EXTERN void
478
478
wasm_runtime_set_exception (WASMModuleInstanceCommon * module ,
479
479
const char * exception );
480
480
481
481
/* See wasm_export.h for description */
482
- const char *
482
+ WASM_RUNTIME_API_EXTERN const char *
483
483
wasm_runtime_get_exception (WASMModuleInstanceCommon * module );
484
484
485
485
/* See wasm_export.h for description */
486
- void
486
+ WASM_RUNTIME_API_EXTERN void
487
487
wasm_runtime_clear_exception (WASMModuleInstanceCommon * module_inst );
488
488
489
489
/* See wasm_export.h for description */
490
- void
490
+ WASM_RUNTIME_API_EXTERN void
491
491
wasm_runtime_set_custom_data (WASMModuleInstanceCommon * module_inst ,
492
492
void * custom_data );
493
493
494
494
/* See wasm_export.h for description */
495
- void *
495
+ WASM_RUNTIME_API_EXTERN void *
496
496
wasm_runtime_get_custom_data (WASMModuleInstanceCommon * module_inst );
497
497
498
498
/* See wasm_export.h for description */
499
- uint32
499
+ WASM_RUNTIME_API_EXTERN uint32
500
500
wasm_runtime_module_malloc (WASMModuleInstanceCommon * module_inst , uint32 size ,
501
501
void * * p_native_addr );
502
502
503
503
/* See wasm_export.h for description */
504
- void
504
+ WASM_RUNTIME_API_EXTERN void
505
505
wasm_runtime_module_free (WASMModuleInstanceCommon * module_inst , uint32 ptr );
506
506
507
507
/* See wasm_export.h for description */
508
- uint32
508
+ WASM_RUNTIME_API_EXTERN uint32
509
509
wasm_runtime_module_dup_data (WASMModuleInstanceCommon * module_inst ,
510
510
const char * src , uint32 size );
511
511
512
512
/* See wasm_export.h for description */
513
- bool
513
+ WASM_RUNTIME_API_EXTERN bool
514
514
wasm_runtime_validate_app_addr (WASMModuleInstanceCommon * module_inst ,
515
515
uint32 app_offset , uint32 size );
516
516
517
517
/* See wasm_export.h for description */
518
- bool
518
+ WASM_RUNTIME_API_EXTERN bool
519
519
wasm_runtime_validate_app_str_addr (WASMModuleInstanceCommon * module_inst ,
520
520
uint32 app_str_offset );
521
521
522
522
/* See wasm_export.h for description */
523
- bool
523
+ WASM_RUNTIME_API_EXTERN bool
524
524
wasm_runtime_validate_native_addr (WASMModuleInstanceCommon * module_inst ,
525
525
void * native_ptr , uint32 size );
526
526
527
527
/* See wasm_export.h for description */
528
- void *
528
+ WASM_RUNTIME_API_EXTERN void *
529
529
wasm_runtime_addr_app_to_native (WASMModuleInstanceCommon * module_inst ,
530
530
uint32 app_offset );
531
531
532
532
/* See wasm_export.h for description */
533
- uint32
533
+ WASM_RUNTIME_API_EXTERN uint32
534
534
wasm_runtime_addr_native_to_app (WASMModuleInstanceCommon * module_inst ,
535
535
void * native_ptr );
536
536
537
537
/* See wasm_export.h for description */
538
- bool
538
+ WASM_RUNTIME_API_EXTERN bool
539
539
wasm_runtime_get_app_addr_range (WASMModuleInstanceCommon * module_inst ,
540
540
uint32 app_offset ,
541
541
uint32 * p_app_start_offset ,
542
542
uint32 * p_app_end_offset );
543
543
544
544
/* See wasm_export.h for description */
545
- bool
545
+ WASM_RUNTIME_API_EXTERN bool
546
546
wasm_runtime_get_native_addr_range (WASMModuleInstanceCommon * module_inst ,
547
547
uint8 * native_ptr ,
548
548
uint8 * * p_native_start_addr ,
@@ -563,7 +563,7 @@ wasm_runtime_set_llvm_stack(WASMModuleInstanceCommon *module_inst,
563
563
uint32 llvm_stack );
564
564
565
565
#if WASM_ENABLE_MULTI_MODULE != 0
566
- void
566
+ WASM_RUNTIME_API_EXTERN void
567
567
wasm_runtime_set_module_reader (const module_reader reader ,
568
568
const module_destroyer destroyer );
569
569
@@ -616,19 +616,19 @@ wasm_exec_env_set_aux_stack(WASMExecEnv *exec_env,
616
616
617
617
#if WASM_ENABLE_LIBC_WASI != 0
618
618
/* See wasm_export.h for description */
619
- void
619
+ WASM_RUNTIME_API_EXTERN void
620
620
wasm_runtime_set_wasi_args (WASMModuleCommon * module ,
621
621
const char * dir_list [], uint32 dir_count ,
622
622
const char * map_dir_list [], uint32 map_dir_count ,
623
623
const char * env_list [], uint32 env_count ,
624
624
char * argv [], int argc );
625
625
626
626
/* See wasm_export.h for description */
627
- bool
627
+ WASM_RUNTIME_API_EXTERN bool
628
628
wasm_runtime_is_wasi_mode (WASMModuleInstanceCommon * module_inst );
629
629
630
630
/* See wasm_export.h for description */
631
- WASMFunctionInstanceCommon *
631
+ WASM_RUNTIME_API_EXTERN WASMFunctionInstanceCommon *
632
632
wasm_runtime_lookup_wasi_start_function (WASMModuleInstanceCommon * module_inst );
633
633
634
634
bool
@@ -666,13 +666,13 @@ bool
666
666
wasm_runtime_enlarge_memory (WASMModuleInstanceCommon * module , uint32 inc_page_count );
667
667
668
668
/* See wasm_export.h for description */
669
- bool
669
+ WASM_RUNTIME_API_EXTERN bool
670
670
wasm_runtime_register_natives (const char * module_name ,
671
671
NativeSymbol * native_symbols ,
672
672
uint32 n_native_symbols );
673
673
674
674
/* See wasm_export.h for description */
675
- bool
675
+ WASM_RUNTIME_API_EXTERN bool
676
676
wasm_runtime_register_natives_raw (const char * module_name ,
677
677
NativeSymbol * native_symbols ,
678
678
uint32 n_native_symbols );
0 commit comments