diff --git a/lib/orb.ex b/lib/orb.ex index bb9104d..35408bf 100644 --- a/lib/orb.ex +++ b/lib/orb.ex @@ -925,7 +925,8 @@ defmodule Orb do @doc """ Declare a WebAssembly import for a function or global. """ - defmacro importw(mod, entries) when is_atom(mod) and is_list(entries) do + @deprecated "Use importw/2 instead" + defmacro wasm_import(mod, entries) when is_atom(mod) and is_list(entries) do quote do @wasm_imports (for {name, type} <- unquote(entries) do %Orb.Import{module: unquote(mod), name: name, type: type} diff --git a/test/orb_test.exs b/test/orb_test.exs index 36fbc43..a8bca01 100644 --- a/test/orb_test.exs +++ b/test/orb_test.exs @@ -260,12 +260,12 @@ defmodule OrbTest do importw(Echo, :echo) - importw(:log, + wasm_import(:log, int32: funcp(name: :log_i32, params: I32), int64: funcp(name: :log_i64, params: I64) ) - importw(:time, + wasm_import(:time, seconds_since_unix_epoch: funcp(name: :unix_time, result: I64) )