Files
extism/ruby/example.rb
Steve Manuel e27fae9193 v0.0.1 alpha
Co-authored-by: Zach Shipko <zach@dylib.so>
2022-08-25 14:36:47 -06:00

11 lines
222 B
Ruby

require './lib/extism'
require 'json'
manifest = {
:wasm => [{:path => "../wasm/code.wasm"}]
}
plugin = Plugin.new(manifest)
res = JSON.parse(plugin.call("count_vowels", ARGV[0] || "this is a test"))
puts res['count']