extism 0.0.1 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fc9f148ba2f810e78a5969f3b16802e3f2f825feb68a8aa21210384c79f30711
4
- data.tar.gz: 512aa65c0397314755e4c6e45fa115f451aa78b052771d825e8f51448266b18d
3
+ metadata.gz: a0cad81a83dcdc58020a5a0bffa909efcb1f56c8eff664282d64c5f286bc081b
4
+ data.tar.gz: 16670ad1f0600f434abd8f5bfb61a0c58be4dae1d32d29152fa1df0550031d65
5
5
  SHA512:
6
- metadata.gz: 9c0718a98ec65e5e271812574371ad1202f41a8e783aaa14d8d570bfdf5052ecae793b628b474de83769d16a4e87555c652ea7b87b7b61ddc2ef1453775b93c2
7
- data.tar.gz: 86c8567bb7cdbf5ef8ce054ce9d03383d168fb9a409733bd83801faf4129093849195a86939eeec653537260c97963e3e7af6956e3407841726a096d5a7663de
6
+ metadata.gz: cb352c2bdea03716671c44c0b476eddf37312cbf088969d28cd7fd7a4242b1445fa745094f7b88f5d493196ec0406a50b15a5cfc5d09aee65282173639c1b94e
7
+ data.tar.gz: b33aacb1b9d3253e8bc85fe408be763ffe3aa8176103f7f4d760ca5190878eafdbd669d70d0fb34045aa020266aff2d658fb8b2ff7e935cfe58d227756d5a252
data/Gemfile CHANGED
@@ -11,5 +11,5 @@ gem "ffi", "~> 1.15.5"
11
11
  group :development do
12
12
  gem "yard", "~> 0.9.28"
13
13
  gem "rufo", "~> 0.13.0"
14
- gem "minitest", "~> 5.16.3"
14
+ gem "minitest", "~> 5.17.0"
15
15
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Extism
4
- VERSION = "0.0.1"
4
+ VERSION = "0.2.0"
5
5
  end
data/lib/extism.rb CHANGED
@@ -131,7 +131,7 @@ module Extism
131
131
  end
132
132
  code = FFI::MemoryPointer.new(:char, wasm.bytesize)
133
133
  code.put_bytes(0, wasm)
134
- @plugin = C.extism_plugin_new(context.pointer, code, wasm.bytesize, wasi)
134
+ @plugin = C.extism_plugin_new(context.pointer, code, wasm.bytesize, nil, 0, wasi)
135
135
  if @plugin < 0
136
136
  err = C.extism_error(@context.pointer, -1)
137
137
  if err&.empty?
@@ -161,7 +161,7 @@ module Extism
161
161
  end
162
162
  code = FFI::MemoryPointer.new(:char, wasm.bytesize)
163
163
  code.put_bytes(0, wasm)
164
- ok = C.extism_plugin_update(@context.pointer, @plugin, code, wasm.bytesize, wasi)
164
+ ok = C.extism_plugin_update(@context.pointer, @plugin, code, wasm.bytesize, nil, 0, wasi)
165
165
  if !ok
166
166
  err = C.extism_error(@context.pointer, @plugin)
167
167
  if err&.empty?
@@ -230,8 +230,8 @@ module Extism
230
230
  ffi_lib "extism"
231
231
  attach_function :extism_context_new, [], :pointer
232
232
  attach_function :extism_context_free, [:pointer], :void
233
- attach_function :extism_plugin_new, [:pointer, :pointer, :uint64, :bool], :int32
234
- attach_function :extism_plugin_update, [:pointer, :int32, :pointer, :uint64, :bool], :bool
233
+ attach_function :extism_plugin_new, [:pointer, :pointer, :uint64, :pointer, :uint64, :bool], :int32
234
+ attach_function :extism_plugin_update, [:pointer, :int32, :pointer, :uint64, :pointer, :uint64, :bool], :bool
235
235
  attach_function :extism_error, [:pointer, :int32], :string
236
236
  attach_function :extism_plugin_call, [:pointer, :int32, :string, :pointer, :uint64], :int32
237
237
  attach_function :extism_plugin_function_exists, [:pointer, :int32, :string], :bool
metadata CHANGED
@@ -1,15 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: extism
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - zach
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-11-29 00:00:00.000000000 Z
12
- dependencies: []
11
+ date: 2023-01-19 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: ffi
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: 1.0.0
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: 1.0.0
13
27
  description: A library for loading and executing WASM plugins
14
28
  email:
15
29
  - zachshipko@gmail.com