File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -925,7 +925,8 @@ defmodule Orb do
925
925
@ doc """
926
926
Declare a WebAssembly import for a function or global.
927
927
"""
928
- defmacro importw ( mod , entries ) when is_atom ( mod ) and is_list ( entries ) do
928
+ @ deprecated "Use importw/2 instead"
929
+ defmacro wasm_import ( mod , entries ) when is_atom ( mod ) and is_list ( entries ) do
929
930
quote do
930
931
@ wasm_imports ( for { name , type } <- unquote ( entries ) do
931
932
% Orb.Import { module: unquote ( mod ) , name: name , type: type }
Original file line number Diff line number Diff line change @@ -260,12 +260,12 @@ defmodule OrbTest do
260
260
261
261
importw ( Echo , :echo )
262
262
263
- importw ( :log ,
263
+ wasm_import ( :log ,
264
264
int32: funcp ( name: :log_i32 , params: I32 ) ,
265
265
int64: funcp ( name: :log_i64 , params: I64 )
266
266
)
267
267
268
- importw ( :time ,
268
+ wasm_import ( :time ,
269
269
seconds_since_unix_epoch: funcp ( name: :unix_time , result: I64 )
270
270
)
271
271
You can’t perform that action at this time.
0 commit comments