Sha256: 76b84d32c84f9a56ed94f113355ae6fd5fed26b7139cda72f48ba2361c680485
Contents?: true
Size: 454 Bytes
Versions: 1
Compression:
Stored size: 454 Bytes
Contents
require './lib/extism' require 'json' # a Context provides a scope for plugins to be managed within. creating multiple contexts # is expected and groups plugins based on source/tenant/lifetime etc. ctx = Extism::Context.new Extism::with_context {|ctx| manifest = { :wasm => [{:path => "../wasm/code.wasm"}] } plugin = ctx.plugin(manifest) res = JSON.parse(plugin.call("count_vowels", ARGV[0] || "this is a test")) puts res['count'] }
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
extism-0.0.1.rc4 | example.rb |