Beispiel #1
0
 def func_wrapper(*args, **kwargs):
     if wasm:
         _src_dir = os.path.dirname(os.path.abspath(__file__))
         cpp2wast.set_src_path(_src_dir)
         cpp2wast.build_native('db.cpp', 'db')
         lib_file = os.path.join(_src_dir, 'libdb.dylib')
         _debug.set_debug_contract('db', lib_file)
     return func(*args, **kwargs)
Beispiel #2
0
def build_native(account, full_src_path):
    _src_dir = os.path.dirname(os.path.abspath(full_src_path))
    cpp2wast.set_src_path(_src_dir)
    cpp2wast.build_native(account+'.cpp', account)
    lib_file = os.path.join(_src_dir, 'lib{0}.dylib'.format(account))
    debug.set_debug_contract(account, lib_file)
Beispiel #3
0
def build_native():
    _src_dir = os.path.dirname(os.path.abspath(__file__))
    cpp2wast.set_src_path(_src_dir)
    cpp2wast.build_native('lab.cpp', 'lab', debug=False)
    lib_file = os.path.join(_src_dir, 'liblab.dylib')
    debug.set_debug_contract('lab', lib_file)