Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions barretenberg/acir_tests/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "@aztec/bb.js@portal:../../ts::locator=bbjs-test%40workspace%3Abbjs-test"
dependencies:
"@aztec/ipc-runtime": "portal:../../ipc-runtime/ts"
comlink: "npm:^4.4.1"
commander: "npm:^12.1.0"
idb-keyval: "npm:^6.2.1"
Expand All @@ -39,6 +40,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "@aztec/bb.js@portal:../../ts::locator=browser-test-app%40workspace%3Abrowser-test-app"
dependencies:
"@aztec/ipc-runtime": "portal:../../ipc-runtime/ts"
comlink: "npm:^4.4.1"
commander: "npm:^12.1.0"
idb-keyval: "npm:^6.2.1"
Expand All @@ -50,6 +52,18 @@ __metadata:
languageName: node
linkType: soft

"@aztec/ipc-runtime@portal:../../ipc-runtime/ts::locator=%40aztec%2Fbb.js%40portal%3A..%2F..%2Fts%3A%3Alocator%3Dbbjs-test%2540workspace%253Abbjs-test":
version: 0.0.0-use.local
resolution: "@aztec/ipc-runtime@portal:../../ipc-runtime/ts::locator=%40aztec%2Fbb.js%40portal%3A..%2F..%2Fts%3A%3Alocator%3Dbbjs-test%2540workspace%253Abbjs-test"
languageName: node
linkType: soft

"@aztec/ipc-runtime@portal:../../ipc-runtime/ts::locator=%40aztec%2Fbb.js%40portal%3A..%2F..%2Fts%3A%3Alocator%3Dbrowser-test-app%2540workspace%253Abrowser-test-app":
version: 0.0.0-use.local
resolution: "@aztec/ipc-runtime@portal:../../ipc-runtime/ts::locator=%40aztec%2Fbb.js%40portal%3A..%2F..%2Fts%3A%3Alocator%3Dbrowser-test-app%2540workspace%253Abrowser-test-app"
languageName: node
linkType: soft

"@babel/code-frame@npm:^7.0.0":
version: 7.26.2
resolution: "@babel/code-frame@npm:7.26.2"
Expand Down
7 changes: 5 additions & 2 deletions barretenberg/cpp/src/barretenberg/bbapi/c_bind.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,15 @@ BBApiRequest global_request;

} // namespace bb::bbapi

// WASM-exported bbapi entry point. Takes msgpack-encoded `[ [name, payload] ]`
// WASM-exported FFI entry point. Takes msgpack-encoded `[ [name, payload] ]`
// (tuple-wrapped command in NamedUnion shape), returns msgpack-encoded
// `[name, payload]` (response in NamedUnion shape). The codegen-emitted
// dispatcher owns the command-name → handle_<method> table and runs the
// per-call deserialize / serialize / exception → ErrorResponse plumbing.
WASM_EXPORT void bbapi(const uint8_t* input_in, size_t input_len_in, uint8_t** output_out, size_t* output_len_out)
WASM_EXPORT void ipc_ffi_entry(const uint8_t* input_in,
size_t input_len_in,
uint8_t** output_out,
size_t* output_len_out)
{
auto handler = bb::bbapi::make_bb_handler(bb::bbapi::global_request);
std::vector<uint8_t> input(input_in, input_in + input_len_in);
Expand Down
4 changes: 2 additions & 2 deletions barretenberg/cpp/src/barretenberg/bbapi/c_bind.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#include "barretenberg/serialize/cbind_fwd.hpp"
#include <vector>

// WASM-exported bbapi entry point. Takes msgpack `[ [name, payload] ]`,
// WASM-exported FFI entry point. Takes msgpack `[ [name, payload] ]`,
// returns msgpack `[name, payload]`. See c_bind.cpp for the implementation
// (calls the codegen-emitted `make_bb_handler` dispatcher).
CBIND_DECL(bbapi)
CBIND_DECL(ipc_ffi_entry)
5 changes: 0 additions & 5 deletions barretenberg/rust/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,12 @@ rmp-serde = "1.1"
rmpv = "1.0"
serde = { version = "1.0", features = ["derive"] }

# Async runtime
tokio = { version = "1.35", features = ["full"] }

# IPC and system
libc = "0.2"
nix = { version = "0.27", features = ["socket", "uio"] }

# Testing
criterion = "0.5"

# Utilities
thiserror = "1.0"
tracing = "0.1"
hex = "0.4"
12 changes: 4 additions & 8 deletions barretenberg/rust/barretenberg-rs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,17 @@ rmp-serde.workspace = true
rmpv.workspace = true
serde.workspace = true

# Async runtime
tokio = { workspace = true, optional = true }

# IPC and system
libc.workspace = true
nix = { workspace = true, optional = true }

# UDS / MPSC-SHM transport for the codegen-generated Backend bridge.
ipc-runtime = { path = "../../../ipc-runtime/rust" }

# Utilities
thiserror.workspace = true
tracing = { workspace = true, optional = true }
hex.workspace = true

[features]
default = ["native", "ffi"]
native = ["tokio", "nix", "tracing"]
async = ["tokio"]
default = ["ffi"]
# FFI backend - links against libbarretenberg from cpp build
ffi = []
44 changes: 0 additions & 44 deletions barretenberg/rust/barretenberg-rs/src/backend.rs

This file was deleted.

163 changes: 0 additions & 163 deletions barretenberg/rust/barretenberg-rs/src/backends/ffi.rs

This file was deleted.

Loading
Loading