@@ -159,6 +159,14 @@ typedef struct {
159
159
} val ;
160
160
} fastly_world_result_tuple2_u32_fastly_compute_at_edge_http_req_response_fastly_compute_at_edge_http_req_error_t ;
161
161
162
+ typedef struct {
163
+ bool is_err ;
164
+ union {
165
+ fastly_world_tuple2_u32_fastly_compute_at_edge_http_req_response_t ok ;
166
+ fastly_compute_at_edge_http_req_send_error_detail_t err ;
167
+ } val ;
168
+ } fastly_world_result_tuple2_u32_fastly_compute_at_edge_http_req_response_fastly_compute_at_edge_http_req_send_error_detail_t ;
169
+
162
170
typedef struct {
163
171
bool is_err ;
164
172
union {
@@ -634,6 +642,9 @@ void __wasm_import_fastly_compute_at_edge_http_req_version_set(int32_t, int32_t,
634
642
__attribute__((__import_module__ ("fastly:compute-at-edge/http-req" ), __import_name__ ("send" )))
635
643
void __wasm_import_fastly_compute_at_edge_http_req_send (int32_t , int32_t , int32_t , int32_t , int32_t );
636
644
645
+ __attribute__((__import_module__ ("fastly:compute-at-edge/http-req" ), __import_name__ ("send-v2" )))
646
+ void __wasm_import_fastly_compute_at_edge_http_req_send_v2 (int32_t , int32_t , int32_t , int32_t , int32_t , int32_t , int32_t , int32_t , int32_t , int32_t );
647
+
637
648
__attribute__((__import_module__ ("fastly:compute-at-edge/http-req" ), __import_name__ ("send-async" )))
638
649
void __wasm_import_fastly_compute_at_edge_http_req_send_async (int32_t , int32_t , int32_t , int32_t , int32_t );
639
650
@@ -643,12 +654,21 @@ void __wasm_import_fastly_compute_at_edge_http_req_send_async_streaming(int32_t,
643
654
__attribute__((__import_module__ ("fastly:compute-at-edge/http-req" ), __import_name__ ("pending-req-poll" )))
644
655
void __wasm_import_fastly_compute_at_edge_http_req_pending_req_poll (int32_t , int32_t );
645
656
657
+ __attribute__((__import_module__ ("fastly:compute-at-edge/http-req" ), __import_name__ ("pending-req-poll-v2" )))
658
+ void __wasm_import_fastly_compute_at_edge_http_req_pending_req_poll_v2 (int32_t , int32_t , int32_t , int32_t , int32_t , int32_t , int32_t );
659
+
646
660
__attribute__((__import_module__ ("fastly:compute-at-edge/http-req" ), __import_name__ ("pending-req-wait" )))
647
661
void __wasm_import_fastly_compute_at_edge_http_req_pending_req_wait (int32_t , int32_t );
648
662
663
+ __attribute__((__import_module__ ("fastly:compute-at-edge/http-req" ), __import_name__ ("pending-req-wait-v2" )))
664
+ void __wasm_import_fastly_compute_at_edge_http_req_pending_req_wait_v2 (int32_t , int32_t , int32_t , int32_t , int32_t , int32_t , int32_t );
665
+
649
666
__attribute__((__import_module__ ("fastly:compute-at-edge/http-req" ), __import_name__ ("pending-req-select" )))
650
667
void __wasm_import_fastly_compute_at_edge_http_req_pending_req_select (int32_t , int32_t , int32_t );
651
668
669
+ __attribute__((__import_module__ ("fastly:compute-at-edge/http-req" ), __import_name__ ("pending-req-select-v2" )))
670
+ void __wasm_import_fastly_compute_at_edge_http_req_pending_req_select_v2 (int32_t , int32_t , int32_t );
671
+
652
672
__attribute__((__import_module__ ("fastly:compute-at-edge/http-req" ), __import_name__ ("close" )))
653
673
void __wasm_import_fastly_compute_at_edge_http_req_close (int32_t , int32_t );
654
674
@@ -759,7 +779,6 @@ void __wasm_import_fastly_compute_at_edge_uap_parse(int32_t, int32_t, int32_t);
759
779
760
780
__attribute__((__weak__ , __export_name__ ("cabi_realloc" )))
761
781
void * cabi_realloc (void * ptr , size_t old_size , size_t align , size_t new_size ) {
762
- (void ) old_size ;
763
782
if (new_size == 0 ) return (void * ) align ;
764
783
void * ret = realloc (ptr , new_size );
765
784
if (!ret ) abort ();
@@ -2606,6 +2625,36 @@ bool fastly_compute_at_edge_http_req_send(fastly_compute_at_edge_http_req_reques
2606
2625
}
2607
2626
}
2608
2627
2628
+ bool fastly_compute_at_edge_http_req_send_v2 (fastly_compute_at_edge_http_req_request_handle_t h , fastly_compute_at_edge_http_req_send_error_detail_t * s , fastly_compute_at_edge_http_req_body_handle_t b , fastly_world_string_t * backend , fastly_compute_at_edge_http_req_response_t * ret , fastly_compute_at_edge_http_req_error_t * err ) {
2629
+ __attribute__((__aligned__ (4 )))
2630
+ uint8_t ret_area [12 ];
2631
+ int32_t ptr = (int32_t ) & ret_area ;
2632
+ __wasm_import_fastly_compute_at_edge_http_req_send_v2 ((int32_t ) (h ), (int32_t ) (* s ).tag , (* s ).mask , (int32_t ) ((* s ).dns_error_rcode ), (int32_t ) ((* s ).dns_error_info_code ), (int32_t ) ((* s ).tls_alert_id ), (int32_t ) (b ), (int32_t ) (* backend ).ptr , (int32_t ) (* backend ).len , ptr );
2633
+ fastly_world_result_fastly_compute_at_edge_http_req_response_fastly_compute_at_edge_http_req_error_t result ;
2634
+ switch ((int32_t ) (* ((uint8_t * ) (ptr + 0 )))) {
2635
+ case 0 : {
2636
+ result .is_err = false;
2637
+ result .val .ok = (fastly_compute_at_edge_http_types_response_t ) {
2638
+ (uint32_t ) (* ((int32_t * ) (ptr + 4 ))),
2639
+ (uint32_t ) (* ((int32_t * ) (ptr + 8 ))),
2640
+ };
2641
+ break ;
2642
+ }
2643
+ case 1 : {
2644
+ result .is_err = true;
2645
+ result .val .err = (int32_t ) (* ((uint8_t * ) (ptr + 4 )));
2646
+ break ;
2647
+ }
2648
+ }
2649
+ if (!result .is_err ) {
2650
+ * ret = result .val .ok ;
2651
+ return 1 ;
2652
+ } else {
2653
+ * err = result .val .err ;
2654
+ return 0 ;
2655
+ }
2656
+ }
2657
+
2609
2658
bool fastly_compute_at_edge_http_req_send_async (fastly_compute_at_edge_http_req_request_handle_t h , fastly_compute_at_edge_http_req_body_handle_t b , fastly_world_string_t * backend , fastly_compute_at_edge_http_req_pending_request_handle_t * ret , fastly_compute_at_edge_http_req_error_t * err ) {
2610
2659
__attribute__((__aligned__ (4 )))
2611
2660
uint8_t ret_area [8 ];
@@ -2703,6 +2752,49 @@ bool fastly_compute_at_edge_http_req_pending_req_poll(fastly_compute_at_edge_htt
2703
2752
}
2704
2753
}
2705
2754
2755
+ bool fastly_compute_at_edge_http_req_pending_req_poll_v2 (fastly_compute_at_edge_http_req_pending_request_handle_t h , fastly_compute_at_edge_http_req_send_error_detail_t * s , fastly_world_option_fastly_compute_at_edge_http_req_response_t * ret , fastly_compute_at_edge_http_req_error_t * err ) {
2756
+ __attribute__((__aligned__ (4 )))
2757
+ uint8_t ret_area [16 ];
2758
+ int32_t ptr = (int32_t ) & ret_area ;
2759
+ __wasm_import_fastly_compute_at_edge_http_req_pending_req_poll_v2 ((int32_t ) (h ), (int32_t ) (* s ).tag , (* s ).mask , (int32_t ) ((* s ).dns_error_rcode ), (int32_t ) ((* s ).dns_error_info_code ), (int32_t ) ((* s ).tls_alert_id ), ptr );
2760
+ fastly_world_result_option_fastly_compute_at_edge_http_req_response_fastly_compute_at_edge_http_req_error_t result ;
2761
+ switch ((int32_t ) (* ((uint8_t * ) (ptr + 0 )))) {
2762
+ case 0 : {
2763
+ result .is_err = false;
2764
+ fastly_world_option_fastly_compute_at_edge_http_req_response_t option ;
2765
+ switch ((int32_t ) (* ((uint8_t * ) (ptr + 4 )))) {
2766
+ case 0 : {
2767
+ option .is_some = false;
2768
+ break ;
2769
+ }
2770
+ case 1 : {
2771
+ option .is_some = true;
2772
+ option .val = (fastly_compute_at_edge_http_types_response_t ) {
2773
+ (uint32_t ) (* ((int32_t * ) (ptr + 8 ))),
2774
+ (uint32_t ) (* ((int32_t * ) (ptr + 12 ))),
2775
+ };
2776
+ break ;
2777
+ }
2778
+ }
2779
+
2780
+ result .val .ok = option ;
2781
+ break ;
2782
+ }
2783
+ case 1 : {
2784
+ result .is_err = true;
2785
+ result .val .err = (int32_t ) (* ((uint8_t * ) (ptr + 4 )));
2786
+ break ;
2787
+ }
2788
+ }
2789
+ if (!result .is_err ) {
2790
+ * ret = result .val .ok ;
2791
+ return 1 ;
2792
+ } else {
2793
+ * err = result .val .err ;
2794
+ return 0 ;
2795
+ }
2796
+ }
2797
+
2706
2798
bool fastly_compute_at_edge_http_req_pending_req_wait (fastly_compute_at_edge_http_req_pending_request_handle_t h , fastly_compute_at_edge_http_req_response_t * ret , fastly_compute_at_edge_http_req_error_t * err ) {
2707
2799
__attribute__((__aligned__ (4 )))
2708
2800
uint8_t ret_area [12 ];
@@ -2733,6 +2825,36 @@ bool fastly_compute_at_edge_http_req_pending_req_wait(fastly_compute_at_edge_htt
2733
2825
}
2734
2826
}
2735
2827
2828
+ bool fastly_compute_at_edge_http_req_pending_req_wait_v2 (fastly_compute_at_edge_http_req_pending_request_handle_t h , fastly_compute_at_edge_http_req_send_error_detail_t * s , fastly_compute_at_edge_http_req_response_t * ret , fastly_compute_at_edge_http_req_error_t * err ) {
2829
+ __attribute__((__aligned__ (4 )))
2830
+ uint8_t ret_area [12 ];
2831
+ int32_t ptr = (int32_t ) & ret_area ;
2832
+ __wasm_import_fastly_compute_at_edge_http_req_pending_req_wait_v2 ((int32_t ) (h ), (int32_t ) (* s ).tag , (* s ).mask , (int32_t ) ((* s ).dns_error_rcode ), (int32_t ) ((* s ).dns_error_info_code ), (int32_t ) ((* s ).tls_alert_id ), ptr );
2833
+ fastly_world_result_fastly_compute_at_edge_http_req_response_fastly_compute_at_edge_http_req_error_t result ;
2834
+ switch ((int32_t ) (* ((uint8_t * ) (ptr + 0 )))) {
2835
+ case 0 : {
2836
+ result .is_err = false;
2837
+ result .val .ok = (fastly_compute_at_edge_http_types_response_t ) {
2838
+ (uint32_t ) (* ((int32_t * ) (ptr + 4 ))),
2839
+ (uint32_t ) (* ((int32_t * ) (ptr + 8 ))),
2840
+ };
2841
+ break ;
2842
+ }
2843
+ case 1 : {
2844
+ result .is_err = true;
2845
+ result .val .err = (int32_t ) (* ((uint8_t * ) (ptr + 4 )));
2846
+ break ;
2847
+ }
2848
+ }
2849
+ if (!result .is_err ) {
2850
+ * ret = result .val .ok ;
2851
+ return 1 ;
2852
+ } else {
2853
+ * err = result .val .err ;
2854
+ return 0 ;
2855
+ }
2856
+ }
2857
+
2736
2858
bool fastly_compute_at_edge_http_req_pending_req_select (fastly_world_list_fastly_compute_at_edge_http_req_pending_request_handle_t * h , fastly_world_tuple2_u32_fastly_compute_at_edge_http_req_response_t * ret , fastly_compute_at_edge_http_req_error_t * err ) {
2737
2859
__attribute__((__aligned__ (4 )))
2738
2860
uint8_t ret_area [16 ];
@@ -2766,6 +2888,45 @@ bool fastly_compute_at_edge_http_req_pending_req_select(fastly_world_list_fastly
2766
2888
}
2767
2889
}
2768
2890
2891
+ bool fastly_compute_at_edge_http_req_pending_req_select_v2 (fastly_world_list_fastly_compute_at_edge_http_req_pending_request_handle_t * h , fastly_world_tuple2_u32_fastly_compute_at_edge_http_req_response_t * ret , fastly_compute_at_edge_http_req_send_error_detail_t * err ) {
2892
+ __attribute__((__aligned__ (4 )))
2893
+ uint8_t ret_area [16 ];
2894
+ int32_t ptr = (int32_t ) & ret_area ;
2895
+ __wasm_import_fastly_compute_at_edge_http_req_pending_req_select_v2 ((int32_t ) (* h ).ptr , (int32_t ) (* h ).len , ptr );
2896
+ fastly_world_result_tuple2_u32_fastly_compute_at_edge_http_req_response_fastly_compute_at_edge_http_req_send_error_detail_t result ;
2897
+ switch ((int32_t ) (* ((uint8_t * ) (ptr + 0 )))) {
2898
+ case 0 : {
2899
+ result .is_err = false;
2900
+ result .val .ok = (fastly_world_tuple2_u32_fastly_compute_at_edge_http_req_response_t ) {
2901
+ (uint32_t ) (* ((int32_t * ) (ptr + 4 ))),
2902
+ (fastly_compute_at_edge_http_types_response_t ) {
2903
+ (uint32_t ) (* ((int32_t * ) (ptr + 8 ))),
2904
+ (uint32_t ) (* ((int32_t * ) (ptr + 12 ))),
2905
+ },
2906
+ };
2907
+ break ;
2908
+ }
2909
+ case 1 : {
2910
+ result .is_err = true;
2911
+ result .val .err = (fastly_compute_at_edge_http_types_send_error_detail_t ) {
2912
+ (int32_t ) (* ((uint8_t * ) (ptr + 4 ))),
2913
+ (int32_t ) (* ((uint8_t * ) (ptr + 5 ))),
2914
+ (uint16_t ) ((int32_t ) (* ((uint16_t * ) (ptr + 6 )))),
2915
+ (uint16_t ) ((int32_t ) (* ((uint16_t * ) (ptr + 8 )))),
2916
+ (uint8_t ) ((int32_t ) (* ((uint8_t * ) (ptr + 10 )))),
2917
+ };
2918
+ break ;
2919
+ }
2920
+ }
2921
+ if (!result .is_err ) {
2922
+ * ret = result .val .ok ;
2923
+ return 1 ;
2924
+ } else {
2925
+ * err = result .val .err ;
2926
+ return 0 ;
2927
+ }
2928
+ }
2929
+
2769
2930
bool fastly_compute_at_edge_http_req_close (fastly_compute_at_edge_http_req_request_handle_t h , fastly_compute_at_edge_http_req_error_t * err ) {
2770
2931
__attribute__((__aligned__ (1 )))
2771
2932
uint8_t ret_area [2 ];
0 commit comments