Skip to content

Commit

Permalink
Merge pull request #6 from eosrio/3.3-staging
Browse files Browse the repository at this point in the history
v3.3
  • Loading branch information
igorls committed Apr 12, 2024
2 parents 08075ef + f8ace1a commit 33858c2
Show file tree
Hide file tree
Showing 20 changed files with 246 additions and 3,367 deletions.
Binary file added .cache/jb/UpdateWork.dat
Binary file not shown.
1 change: 1 addition & 0 deletions .cache/jb/version.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(ssh://git@git.jetbrains.team/llvm/llvm-project.git eeb64a79f164f241d539c0a3f0491b50a854ead9 based on LLVM a01392cc95a03e97d8dc19cc3b3484daf9a4f19e revision)
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "abieos"]
path = abieos
url = https://github.com/igorls/abieos.git
26 changes: 20 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,30 +1,44 @@
cmake_minimum_required (VERSION 3.24)
project(node_abieos VERSION 2.2 LANGUAGES CXX C)
project(node_abieos VERSION 3.2.1 LANGUAGES CXX C)

add_definitions(-DNAPI_VERSION=8)
# add_definitions(-DNAPI_EXPERIMENTAL)
add_definitions(-DNAPI_VERSION=9)

include_directories(${CMAKE_JS_INC})

set(default_build_type "Release")

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS ON)

option(ABIEOS_NO_INT128 "disable use of __int128" OFF)
option(ABIEOS_ONLY_LIBRARY "define and build the ABIEOS library" OFF)

if(NOT DEFINED SKIP_SUBMODULE_CHECK)
execute_process(COMMAND git submodule status --recursive
COMMAND grep -c "^[+\-]"
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
OUTPUT_VARIABLE submodule_status
OUTPUT_STRIP_TRAILING_WHITESPACE)
if(submodule_status GREATER 0)
message(FATAL_ERROR "git submodules are not up to date.
Please run the command 'git submodule update --init --recursive'.")
endif()
endif()

find_package(Threads)
include(GNUInstallDirs)

add_library(abieos STATIC src/abi.cpp src/crypto.cpp include/eosio/fpconv.c)
target_include_directories(abieos PUBLIC include)
add_library(abieos STATIC abieos/src/abi.cpp abieos/src/crypto.cpp abieos/include/eosio/fpconv.c)
target_include_directories(abieos PUBLIC abieos/include abieos/external/rapidjson/include)

if(ABIEOS_NO_INT128)
target_compile_definitions(abieos PUBLIC ABIEOS_NO_INT128)
endif()

set_target_properties(abieos PROPERTIES POSITION_INDEPENDENT_CODE ON)

add_library(${PROJECT_NAME} SHARED src/main.cpp src/abieos.cpp)
add_library(${PROJECT_NAME} SHARED src/main.cpp abieos/src/abieos.cpp)
set_target_properties(${PROJECT_NAME} PROPERTIES PREFIX "" SUFFIX ".node")
target_link_libraries(${PROJECT_NAME} ${CMAKE_JS_LIB};abieos;${CMAKE_THREAD_LIBS_INIT})
target_compile_options(${PROJECT_NAME} PRIVATE -Wall -Wextra -Wno-unused-parameter)
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# node-abieos

![Node-API v9 Badge](https://github.com/nodejs/abi-stable-node/blob/doc/assets/Node-API%20v9%20Badge.svg)
[![NPM version](https://img.shields.io/npm/v/@eosrio/node-abieos.svg?style=flat)](https://www.npmjs.com/package/@eosrio/node-abieos)

Node.js native binding for [abieos](https://github.com/EOSIO/abieos), with some improvements:

- Contracts can be directly updated on the map
Expand Down
1 change: 1 addition & 0 deletions abieos
Submodule abieos added at 23007c
Binary file added bun.lockb
Binary file not shown.
Binary file modified dist/abieos.node
100644 → 100755
Binary file not shown.

0 comments on commit 33858c2

Please sign in to comment.