nim-eth-contracts/eth_contracts.nim

12 lines
353 B
Nim
Raw Normal View History

2018-07-05 08:39:04 +00:00
import macros
{.pragma: importwasm, importc, cdecl.}
proc getCallDataSize*(): uint32 {.importwasm.}
macro exportwasm*(p: untyped): untyped =
expectKind(p, nnkProcDef)
result = p
result.addPragma(newIdentNode("exportc"))
result.addPragma(newColonExpr(newIdentNode("codegenDecl"), newLit("__attribute__ ((visibility (\"default\"))) $# $#$#")))