Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: download msgpack #2885

Merged
merged 23 commits into from
Oct 17, 2023
Merged
Show file tree
Hide file tree
Changes from 22 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
efe4ae1
feat: download msgpack on build
ludamad0 Oct 16, 2023
8f092c1
feat: merge msgpack master
ludamad0 Oct 16, 2023
a36bd6f
feat: add msgpack
ludamad0 Oct 16, 2023
f6dc990
fix: msgpack formatting
ludamad0 Oct 16, 2023
a69a9c4
revert yarn-project
ludamad0 Oct 16, 2023
17b4490
Merge branch 'master' into feat/bump-msgpack
ludamad Oct 16, 2023
602ded0
Merge github.com:AztecProtocol/aztec-packages into feat/bump-msgpack
ludamad0 Oct 16, 2023
09a1467
Merge remote-tracking branch 'origin/feat/bump-msgpack' into ad/feat/…
ludamad0 Oct 16, 2023
cbfe941
chore: remove bundled msgpack
ludamad0 Oct 16, 2023
619b82a
Downloading
ludamad0 Oct 16, 2023
cd638c3
Fix union parsing
ludamad0 Oct 16, 2023
c875c21
Merge remote-tracking branch 'origin/feat/bump-msgpack' into feat/bum…
ludamad0 Oct 16, 2023
fe0b98c
Update bindings
ludamad0 Oct 16, 2023
03f5d5f
Merge remote-tracking branch 'origin/feat/bump-msgpack' into ad/feat/…
ludamad0 Oct 16, 2023
a6d09e9
Remove bberg generators. Download msgpack in circuits
ludamad0 Oct 17, 2023
cbeed2b
Better dep on msgpack-c
ludamad0 Oct 17, 2023
d6fe483
Forgotten file
ludamad0 Oct 17, 2023
836e441
fix clang-tidy
ludamad0 Oct 17, 2023
a16b10f
Merge branch 'master' into ad/feat/download-msgpack
ludamad Oct 17, 2023
7c8829f
Merge branch 'master' into feat/bump-msgpack
ludamad Oct 17, 2023
2fe218e
Merge remote-tracking branch 'origin/feat/bump-msgpack' into ad/feat/…
ludamad0 Oct 17, 2023
5d9cfcc
Merge remote-tracking branch 'origin/ad/feat/download-msgpack' into a…
ludamad0 Oct 17, 2023
751f75e
Merge github.com:AztecProtocol/aztec-packages into ad/feat/download-m…
ludamad0 Oct 17, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions barretenberg/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ include(cmake/threading.cmake)
include(cmake/gtest.cmake)
include(cmake/benchmark.cmake)
include(cmake/module.cmake)
include(cmake/msgpack.cmake)
add_subdirectory(src)
if (ENABLE_ASAN AND NOT(FUZZING))
find_program(LLVM_SYMBOLIZER_PATH NAMES llvm-symbolizer-16)
Expand Down
10 changes: 10 additions & 0 deletions barretenberg/cpp/cmake/module.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ function(barretenberg_module MODULE_NAME)
${ARGN}
${TBB_IMPORTED_TARGETS}
)

# enable msgpack downloading via dependency (solves race condition)
add_dependencies(${MODULE_NAME} msgpack-c)
add_dependencies(${MODULE_NAME}_objects msgpack-c)
list(APPEND lib_targets ${MODULE_NAME})

set(MODULE_LINK_NAME ${MODULE_NAME})
Expand Down Expand Up @@ -117,6 +121,9 @@ function(barretenberg_module MODULE_NAME)
${TBB_IMPORTED_TARGETS}
)

# enable msgpack downloading via dependency (solves race condition)
add_dependencies(${MODULE_NAME}_test_objects msgpack-c)
add_dependencies(${MODULE_NAME}_tests msgpack-c)
if(NOT WASM AND NOT CI)
# If collecting coverage data, set profile
# For some reason processor affinity doesn't work, so the developer has to set it manually anyway
Expand Down Expand Up @@ -219,6 +226,9 @@ function(barretenberg_module MODULE_NAME)
${TBB_IMPORTED_TARGETS}
)

# enable msgpack downloading via dependency (solves race condition)
add_dependencies(${MODULE_NAME}_bench_objects msgpack-c)
add_dependencies(${MODULE_NAME}_bench msgpack-c)
add_custom_target(
run_${MODULE_NAME}_bench
COMMAND ${MODULE_NAME}_bench
Expand Down
16 changes: 16 additions & 0 deletions barretenberg/cpp/cmake/msgpack.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
include(ExternalProject)

# External project: Download msgpack-c from GitHu
set(MSGPACK_PREFIX "${CMAKE_BINARY_DIR}/_deps/msgpack-c")
set(MSGPACK_INCLUDE "${MSGPACK_PREFIX}/src/msgpack-c/include")

ExternalProject_Add(
msgpack-c
PREFIX ${MSGPACK_PREFIX}
GIT_REPOSITORY "https://github.com/AztecProtocol/msgpack-c.git"
GIT_TAG af447c28f0bafe761290a72754212436e530941b
CONFIGURE_COMMAND "" # No configure step
BUILD_COMMAND "" # No build step
INSTALL_COMMAND "" # No install step
UPDATE_COMMAND "" # No update step
)
5 changes: 2 additions & 3 deletions barretenberg/cpp/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,12 @@ if(WASM)
add_link_options(-Wl,--export-memory,--import-memory,--stack-first,-z,stack-size=1048576,--max-memory=4294967296)
endif()

include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/msgpack-c/include)

include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${MSGPACK_INCLUDE})

# I feel this should be limited to ecc, however it's currently used in headers that go across libraries,
# and there currently isn't an easy way to inherit the DDISABLE_SHENANIGANS parameter.
if(DISABLE_ASM)
message(STATUS "Using fallback non-assembly methods for field multiplications.")
message("Using fallback non-assembly methods for field multiplications.")
add_definitions(-DDISABLE_SHENANIGANS=1)
else()
message(STATUS "Using optimized assembly for field arithmetic.")
Expand Down
1 change: 0 additions & 1 deletion barretenberg/cpp/src/barretenberg/serialize/cbind.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
#include "msgpack_impl/schema_impl.hpp"
#include "msgpack_impl/schema_name.hpp"
#include "msgpack_impl/struct_map_impl.hpp"
#include "msgpack_impl/variant_impl.hpp"

#include <cstring>
#include <type_traits>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#pragma once
// Note: Meant to only be included in compilation units that need msgpack
#include "struct_map_impl.hpp"
#include "variant_impl.hpp"
#include "struct_map_impl.hpp"
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include <sstream>
#include <string>
#define MSGPACK_NO_BOOST
#define MSGPACK_USE_STD_VARIANT_ADAPTOR
#include "concepts.hpp"
#include "drop_keys.hpp"
#include <msgpack.hpp>
Expand Down

This file was deleted.

2 changes: 0 additions & 2 deletions barretenberg/cpp/src/msgpack-c/.clang-format

This file was deleted.

72 changes: 0 additions & 72 deletions barretenberg/cpp/src/msgpack-c/.github/depends/boost.sh

This file was deleted.

51 changes: 0 additions & 51 deletions barretenberg/cpp/src/msgpack-c/.github/depends/zlib.sh

This file was deleted.

73 changes: 0 additions & 73 deletions barretenberg/cpp/src/msgpack-c/.github/workflows/coverage.yml

This file was deleted.

Loading