Skip to content

Commit

Permalink
Merge pull request #6 from naqvis/fix/issue4
Browse files Browse the repository at this point in the history
chore: updated to work with latest crystal version. closes #4
  • Loading branch information
naqvis authored Nov 1, 2024
2 parents cc87bbe + 5279bda commit 258ddd2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ it's the best place for a complete introduction!
<br/>

> **_NOTE:_**
Shard assumes you have [wasmer](https://github.com/wasmerio/wasmer) runtime installed and environment variable **`WASMER_DIR`** is setup properly, or you will encounter issues during compilation.
Shard assumes you have [wasmer](https://github.com/wasmerio/wasmer) runtime version 2.XX installed and environment variable **`WASMER_DIR`** is setup properly, or you will encounter issues during compilation.

<br/>

Expand Down
2 changes: 1 addition & 1 deletion shard.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: wasmer
version: 0.2.2
version: 0.2.3

authors:
- Ali Naqvi <[email protected]>
Expand Down
5 changes: 3 additions & 2 deletions src/wasmer/function.cr
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,10 @@ module Wasmer

private def initialize(store : Store, type : FunctionType, env : UserEnv, func : HostFunction)
host = HostFunc.new(store, func, env)
@env = FuncEnv.new(@@func_store.store(host))
fenv = FuncEnv.new(@@func_store.store(host))
@env = fenv
@ptr = LibWasmer.wasm_func_new_with_env(store, type,
->Function.trampoline, Box(FuncEnv).box(@env), ->Function.env_finalizer)
->Function.trampoline, Box(FuncEnv).box(fenv), ->Function.env_finalizer)
end

# :nodoc:
Expand Down

0 comments on commit 258ddd2

Please sign in to comment.