We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
initialize
RubyVM._instantiate
1 parent 507ac47 commit 56f0136Copy full SHA for 56f0136
1 file changed
packages/npm-packages/ruby-wasm-wasi/src/vm.ts
@@ -84,7 +84,9 @@ export class RubyVM {
84
this.exceptionFormatter = new RbExceptionFormatter();
85
}
86
87
- static async _instantiate(initComponent: (_: typeof RubyJsJsRuntime) => Promise<typeof RubyJsRubyRuntime>): Promise<RubyVM> {
+ static async _instantiate(initComponent: (_: typeof RubyJsJsRuntime) => Promise<typeof RubyJsRubyRuntime>, options: {
88
+ args?: string[],
89
+ }): Promise<RubyVM> {
90
const binding = new ComponentBinding()
91
const vm = new RubyVM(binding);
92
const component = await initComponent({
@@ -95,6 +97,7 @@ export class RubyVM {
95
97
JsAbiValue: Object,
96
98
});
99
binding.setUnderlying(component);
100
+ vm.initialize(options.args);
101
return vm
102
103
0 commit comments