Build separate native and WASI pipelines with shared multicall names
Checkpoint before integration and package validation. Assisted-by: SurmAgent:unknown [read] [edit] [bash]
This commit is contained in:
@@ -0,0 +1,82 @@
|
||||
/* File generated automatically by the QuickJS-ng compiler. */
|
||||
|
||||
#include "quickjs-libc.h"
|
||||
|
||||
const uint32_t qjsc_function_source_size = 342;
|
||||
|
||||
const uint8_t qjsc_function_source[342] = {
|
||||
0x1d, 0x95, 0xc4, 0x5d, 0x54, 0x05, 0x01, 0x30,
|
||||
0x74, 0x65, 0x73, 0x74, 0x73, 0x2f, 0x66, 0x75,
|
||||
0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73,
|
||||
0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x6a, 0x73,
|
||||
0x01, 0x0c, 0x61, 0x63, 0x74, 0x75, 0x61, 0x6c,
|
||||
0x01, 0x02, 0x66, 0x01, 0x0c, 0x65, 0x78, 0x70,
|
||||
0x65, 0x63, 0x74, 0x01, 0x34, 0x66, 0x75, 0x6e,
|
||||
0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x66, 0x28,
|
||||
0x29, 0x20, 0x7b, 0x20, 0x72, 0x65, 0x74, 0x75,
|
||||
0x72, 0x6e, 0x20, 0x34, 0x32, 0x20, 0x7d, 0x0d,
|
||||
0xe2, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c,
|
||||
0x20, 0x0a, 0x01, 0xa8, 0x01, 0x00, 0x05, 0x00,
|
||||
0x03, 0x02, 0x02, 0x01, 0x74, 0x05, 0xe4, 0x03,
|
||||
0x02, 0x00, 0x30, 0xe6, 0x03, 0x04, 0x00, 0x70,
|
||||
0x01, 0xe4, 0x03, 0x04, 0x02, 0x70, 0x00, 0x10,
|
||||
0x00, 0x01, 0x00, 0xf2, 0x01, 0x00, 0x01, 0x00,
|
||||
0xe8, 0x03, 0x00, 0x1e, 0xe6, 0x03, 0x01, 0x06,
|
||||
0x0c, 0x43, 0x0a, 0x01, 0xe6, 0x03, 0x00, 0x00,
|
||||
0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0xc2,
|
||||
0x2a, 0x28, 0xe2, 0x03, 0x03, 0x01, 0x00, 0x1a,
|
||||
0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e,
|
||||
0x20, 0x66, 0x28, 0x29, 0x20, 0x7b, 0x20, 0x72,
|
||||
0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x34, 0x32,
|
||||
0x20, 0x7d, 0x0c, 0x03, 0xc8, 0x04, 0x08, 0xd2,
|
||||
0x08, 0xf0, 0x05, 0xc5, 0x00, 0xe8, 0x29, 0x04,
|
||||
0xf5, 0x00, 0x00, 0x00, 0xe7, 0x60, 0x00, 0x00,
|
||||
0xe4, 0x41, 0x3b, 0x00, 0x00, 0x00, 0x24, 0x00,
|
||||
0x00, 0xcf, 0x61, 0x00, 0x00, 0x64, 0x00, 0x00,
|
||||
0xae, 0xf0, 0x0b, 0x38, 0x9f, 0x00, 0x00, 0x00,
|
||||
0x61, 0x00, 0x00, 0xf5, 0x30, 0x60, 0x02, 0x00,
|
||||
0x60, 0x01, 0x00, 0x38, 0x3e, 0x00, 0x00, 0x00,
|
||||
0x64, 0x00, 0x00, 0x04, 0xf3, 0x00, 0x00, 0x00,
|
||||
0x9c, 0x32, 0x01, 0x00, 0x03, 0x00, 0xd0, 0x61,
|
||||
0x01, 0x00, 0x41, 0x3b, 0x00, 0x00, 0x00, 0x24,
|
||||
0x00, 0x00, 0xd1, 0x61, 0x02, 0x00, 0x64, 0x00,
|
||||
0x00, 0xae, 0xf0, 0x0b, 0x38, 0x9f, 0x00, 0x00,
|
||||
0x00, 0x61, 0x02, 0x00, 0xf5, 0x30, 0x67, 0x02,
|
||||
0x00, 0x67, 0x01, 0x00, 0x06, 0x2f, 0xe2, 0x03,
|
||||
0x01, 0x01, 0x22, 0x00, 0x16, 0x0a, 0x26, 0x20,
|
||||
0x04, 0x17, 0x19, 0x11, 0x16, 0x20, 0x1c, 0x1b,
|
||||
0x0c, 0x00, 0x0b, 0x08, 0x31, 0x1b, 0x0a, 0x11,
|
||||
0x12, 0x3f, 0x11, 0x2a, 0x04, 0x17, 0x19, 0x11,
|
||||
0x16, 0x20, 0x1c, 0x1b, 0x0c, 0x00,
|
||||
};
|
||||
|
||||
static JSContext *JS_NewCustomContext(JSRuntime *rt)
|
||||
{
|
||||
JSContext *ctx = JS_NewContext(rt);
|
||||
if (!ctx)
|
||||
return NULL;
|
||||
return ctx;
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
int r;
|
||||
JSRuntime *rt;
|
||||
JSContext *ctx;
|
||||
r = 0;
|
||||
rt = JS_NewRuntime();
|
||||
js_std_set_worker_new_context_func(JS_NewCustomContext);
|
||||
js_std_init_handlers(rt);
|
||||
JS_SetModuleLoaderFunc2(rt, NULL, js_module_loader, js_module_check_attributes, NULL);
|
||||
ctx = JS_NewCustomContext(rt);
|
||||
js_std_add_helpers(ctx, argc, argv);
|
||||
js_std_eval_binary(ctx, qjsc_function_source, qjsc_function_source_size, 0);
|
||||
r = js_std_loop(ctx);
|
||||
if (r) {
|
||||
js_std_dump_error(ctx);
|
||||
}
|
||||
js_std_free_handlers(rt);
|
||||
JS_FreeContext(ctx);
|
||||
JS_FreeRuntime(rt);
|
||||
return r;
|
||||
}
|
||||
Reference in New Issue
Block a user