Skip to content

Commit 9de7539

Browse files
Remove get_js_plugins and related types+functions (#6879)
Co-authored-by: Amaury Chamayou <[email protected]>
1 parent 0a3ba2b commit 9de7539

File tree

9 files changed

+0
-109
lines changed

9 files changed

+0
-109
lines changed

CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -282,8 +282,6 @@ set(CCF_JS_SOURCES
282282
${CCF_DIR}/src/js/core/wrapped_value.cpp
283283
${CCF_DIR}/src/js/core/runtime.cpp
284284
${CCF_DIR}/src/js/core/context.cpp
285-
${CCF_DIR}/src/js/no_plugins.cpp
286-
${CCF_DIR}/src/js/ffi_plugins.cpp
287285
${CCF_DIR}/src/js/extensions/console.cpp
288286
${CCF_DIR}/src/js/extensions/math/random.cpp
289287
${CCF_DIR}/src/js/extensions/snp_attestation.cpp

doc/build_apps/api.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ A CCF application is composed of the following:
55

66
- The :ref:`Application Entry Point <build_apps/api:Application Entry Point>` which creates the application in CCF.
77
- A collection of :cpp:class:`endpoints <ccf::endpoints::Endpoint>` handling HTTP requests and grouped in a single :cpp:class:`registry <ccf::endpoints::EndpointRegistry>`. An :cpp:class:`endpoint <ccf::endpoints::Endpoint>` reads and writes to the key-value store via the :ref:`Key-Value Store API <build_apps/kv/api:Key-Value Store API>`.
8-
- An optional set of :ref:`JavaScript FFI Plugins <build_apps/api:JavaScript FFI Plugins>` that can be registered to extend the built-in JavaScript API surface.
98

109
Application Entry Point
1110
-----------------------

include/ccf/app_interface.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
#include "ccf/ccf_deprecated.h"
66
#include "ccf/common_endpoint_registry.h"
7-
#include "ccf/js_plugin.h"
87
#include "ccf/node_context.h"
98

109
#include <memory>
@@ -54,11 +53,4 @@ namespace ccf
5453
std::unique_ptr<ccf::endpoints::EndpointRegistry> make_user_endpoints(
5554
ccf::AbstractNodeContext& context);
5655
// SNIPPET_END: app_interface
57-
58-
/** To be implemented by the application.
59-
*
60-
* @return Vector of JavaScript FFI plugins
61-
*/
62-
CCF_DEPRECATED("Deprecated from 6.0.0")
63-
std::vector<ccf::js::FFIPlugin> get_js_plugins();
6456
}

include/ccf/js_plugin.h

Lines changed: 0 additions & 21 deletions
This file was deleted.

src/enclave/enclave.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
#include "indexing/enclave_lfs_access.h"
1616
#include "indexing/historical_transaction_fetcher.h"
1717
#include "interface.h"
18-
#include "js/ffi_plugins.h"
1918
#include "js/interpreter_cache.h"
2019
#include "node/acme_challenge_frontend.h"
2120
#include "node/historical_queries.h"
@@ -197,13 +196,6 @@ namespace ccf
197196
rpc_map->register_frontend<ccf::ActorsType::acme_challenge>(
198197
std::make_unique<ccf::ACMERpcFrontend>(network, *context));
199198

200-
// Suppress error about use of deprecated get_js_plugins(). This call, and all
201-
// references to FFIPlugins, should be removed after 6.0.0
202-
#pragma clang diagnostic push
203-
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
204-
ccf::js::register_ffi_plugins(ccf::get_js_plugins());
205-
#pragma clang diagnostic pop
206-
207199
LOG_TRACE_FMT("Initialize node");
208200
node->initialize(
209201
consensus_config,

src/js/core/context.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
#include "ccf/js/extensions/console.h"
1010
#include "ccf/js/tx_access.h"
1111
#include "enclave/enclave_time.h"
12-
#include "js/ffi_plugins.h"
1312
#include "js/global_class_ids.h"
1413

1514
#include <chrono>
@@ -64,12 +63,6 @@ namespace ccf::js::core
6463
}
6564
JS_SetContextOpaque(ctx, this);
6665

67-
for (auto& plugin : ffi_plugins)
68-
{
69-
LOG_DEBUG_FMT("Extending JS context with plugin {}", plugin.name);
70-
plugin.extend(*this);
71-
}
72-
7366
JS_SetModuleLoaderFunc(rt, nullptr, load_module_via_context, this);
7467
}
7568

src/js/ffi_plugins.cpp

Lines changed: 0 additions & 26 deletions
This file was deleted.

src/js/ffi_plugins.h

Lines changed: 0 additions & 22 deletions
This file was deleted.

src/js/no_plugins.cpp

Lines changed: 0 additions & 14 deletions
This file was deleted.

0 commit comments

Comments
 (0)