@@ -96,13 +96,13 @@ mod provider_fallback {
96
96
97
97
// Read API.
98
98
pub ( crate ) unsafe fn shopify_function_input_get ( context : ContextPtr ) -> Val {
99
- shopify_function_wasm_api_provider :: read:: shopify_function_input_get ( context)
99
+ shopify_function_provider :: read:: shopify_function_input_get ( context)
100
100
}
101
101
pub ( crate ) unsafe fn shopify_function_input_get_val_len (
102
102
context : ContextPtr ,
103
103
scope : Val ,
104
104
) -> usize {
105
- shopify_function_wasm_api_provider :: read:: shopify_function_input_get_val_len ( context, scope)
105
+ shopify_function_provider :: read:: shopify_function_input_get_val_len ( context, scope)
106
106
}
107
107
pub ( crate ) unsafe fn shopify_function_input_read_utf8_str (
108
108
context : ContextPtr ,
@@ -111,9 +111,7 @@ mod provider_fallback {
111
111
len : usize ,
112
112
) {
113
113
let src =
114
- shopify_function_wasm_api_provider:: read:: shopify_function_input_get_utf8_str_addr (
115
- context, src,
116
- ) ;
114
+ shopify_function_provider:: read:: shopify_function_input_get_utf8_str_addr ( context, src) ;
117
115
std:: ptr:: copy ( src as _ , out, len) ;
118
116
}
119
117
pub ( crate ) unsafe fn shopify_function_input_get_obj_prop (
@@ -122,7 +120,7 @@ mod provider_fallback {
122
120
ptr : * const u8 ,
123
121
len : usize ,
124
122
) -> Val {
125
- shopify_function_wasm_api_provider :: read:: shopify_function_input_get_obj_prop (
123
+ shopify_function_provider :: read:: shopify_function_input_get_obj_prop (
126
124
context, scope, ptr as _ , len,
127
125
)
128
126
}
@@ -131,7 +129,7 @@ mod provider_fallback {
131
129
scope : Val ,
132
130
interned_string_id : shopify_function_wasm_api_core:: InternedStringId ,
133
131
) -> Val {
134
- shopify_function_wasm_api_provider :: read:: shopify_function_input_get_interned_obj_prop (
132
+ shopify_function_provider :: read:: shopify_function_input_get_interned_obj_prop (
135
133
context,
136
134
scope,
137
135
interned_string_id,
@@ -142,16 +140,14 @@ mod provider_fallback {
142
140
scope : Val ,
143
141
index : usize ,
144
142
) -> Val {
145
- shopify_function_wasm_api_provider:: read:: shopify_function_input_get_at_index (
146
- context, scope, index,
147
- )
143
+ shopify_function_provider:: read:: shopify_function_input_get_at_index ( context, scope, index)
148
144
}
149
145
pub ( crate ) unsafe fn shopify_function_input_get_obj_key_at_index (
150
146
context : ContextPtr ,
151
147
scope : Val ,
152
148
index : usize ,
153
149
) -> Val {
154
- shopify_function_wasm_api_provider :: read:: shopify_function_input_get_obj_key_at_index (
150
+ shopify_function_provider :: read:: shopify_function_input_get_obj_key_at_index (
155
151
context, scope, index,
156
152
)
157
153
}
@@ -161,35 +157,33 @@ mod provider_fallback {
161
157
context : ContextPtr ,
162
158
bool : u32 ,
163
159
) -> WriteResult {
164
- shopify_function_wasm_api_provider :: write:: shopify_function_output_new_bool ( context, bool)
160
+ shopify_function_provider :: write:: shopify_function_output_new_bool ( context, bool)
165
161
}
166
162
pub ( crate ) unsafe fn shopify_function_output_new_null ( context : ContextPtr ) -> WriteResult {
167
- shopify_function_wasm_api_provider :: write:: shopify_function_output_new_null ( context)
163
+ shopify_function_provider :: write:: shopify_function_output_new_null ( context)
168
164
}
169
165
pub ( crate ) unsafe fn shopify_function_output_finalize ( context : ContextPtr ) -> WriteResult {
170
- shopify_function_wasm_api_provider :: write:: shopify_function_output_finalize ( context)
166
+ shopify_function_provider :: write:: shopify_function_output_finalize ( context)
171
167
}
172
168
pub ( crate ) unsafe fn shopify_function_output_new_i32 (
173
169
context : ContextPtr ,
174
170
int : i32 ,
175
171
) -> WriteResult {
176
- shopify_function_wasm_api_provider :: write:: shopify_function_output_new_i32 ( context, int)
172
+ shopify_function_provider :: write:: shopify_function_output_new_i32 ( context, int)
177
173
}
178
174
pub ( crate ) unsafe fn shopify_function_output_new_f64 (
179
175
context : ContextPtr ,
180
176
float : f64 ,
181
177
) -> WriteResult {
182
- shopify_function_wasm_api_provider :: write:: shopify_function_output_new_f64 ( context, float)
178
+ shopify_function_provider :: write:: shopify_function_output_new_f64 ( context, float)
183
179
}
184
180
pub ( crate ) unsafe fn shopify_function_output_new_utf8_str (
185
181
context : ContextPtr ,
186
182
ptr : * const u8 ,
187
183
len : usize ,
188
184
) -> WriteResult {
189
185
let result =
190
- shopify_function_wasm_api_provider:: write:: shopify_function_output_new_utf8_str (
191
- context, len,
192
- ) ;
186
+ shopify_function_provider:: write:: shopify_function_output_new_utf8_str ( context, len) ;
193
187
let write_result =
194
188
WriteResult :: from_repr ( ( result >> usize:: BITS ) as usize ) . expect ( "Invalid write result" ) ;
195
189
let dst = result as usize ;
@@ -202,27 +196,25 @@ mod provider_fallback {
202
196
context : ContextPtr ,
203
197
id : shopify_function_wasm_api_core:: InternedStringId ,
204
198
) -> WriteResult {
205
- shopify_function_wasm_api_provider:: write:: shopify_function_output_new_interned_utf8_str (
206
- context, id,
207
- )
199
+ shopify_function_provider:: write:: shopify_function_output_new_interned_utf8_str ( context, id)
208
200
}
209
201
pub ( crate ) unsafe fn shopify_function_output_new_object (
210
202
context : ContextPtr ,
211
203
len : usize ,
212
204
) -> WriteResult {
213
- shopify_function_wasm_api_provider :: write:: shopify_function_output_new_object ( context, len)
205
+ shopify_function_provider :: write:: shopify_function_output_new_object ( context, len)
214
206
}
215
207
pub ( crate ) unsafe fn shopify_function_output_finish_object ( context : ContextPtr ) -> WriteResult {
216
- shopify_function_wasm_api_provider :: write:: shopify_function_output_finish_object ( context)
208
+ shopify_function_provider :: write:: shopify_function_output_finish_object ( context)
217
209
}
218
210
pub ( crate ) unsafe fn shopify_function_output_new_array (
219
211
context : ContextPtr ,
220
212
len : usize ,
221
213
) -> WriteResult {
222
- shopify_function_wasm_api_provider :: write:: shopify_function_output_new_array ( context, len)
214
+ shopify_function_provider :: write:: shopify_function_output_new_array ( context, len)
223
215
}
224
216
pub ( crate ) unsafe fn shopify_function_output_finish_array ( context : ContextPtr ) -> WriteResult {
225
- shopify_function_wasm_api_provider :: write:: shopify_function_output_finish_array ( context)
217
+ shopify_function_provider :: write:: shopify_function_output_finish_array ( context)
226
218
}
227
219
228
220
// Other.
@@ -231,8 +223,7 @@ mod provider_fallback {
231
223
ptr : * const u8 ,
232
224
len : usize ,
233
225
) -> usize {
234
- let result =
235
- shopify_function_wasm_api_provider:: shopify_function_intern_utf8_str ( context, len) ;
226
+ let result = shopify_function_provider:: shopify_function_intern_utf8_str ( context, len) ;
236
227
let id = ( result >> usize:: BITS ) as usize ;
237
228
let dst = result as usize ;
238
229
std:: ptr:: copy ( ptr as _ , dst as _ , len) ;
@@ -498,11 +489,7 @@ impl Context {
498
489
#[ cfg( not( target_family = "wasm" ) ) ]
499
490
pub fn new_with_input ( input : serde_json:: Value ) -> Self {
500
491
let bytes = rmp_serde:: to_vec ( & input) . unwrap ( ) ;
501
- Self (
502
- shopify_function_wasm_api_provider:: shopify_function_context_new_from_msgpack_bytes (
503
- bytes,
504
- ) ,
505
- )
492
+ Self ( shopify_function_provider:: shopify_function_context_new_from_msgpack_bytes ( bytes) )
506
493
}
507
494
508
495
/// Get the top-level value of the input.
0 commit comments