@aztec-foundation/bb 6.0.0-nightly.20260902
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -0
- package/bin.js +20 -0
- package/package.json +27 -0
- package/platform.js +35 -0
package/README.md
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
# @aztec-foundation/bb
|
|
2
|
+
|
|
3
|
+
The `bb` binary from [AztecProtocol/aztec-packages](https://github.com/AztecProtocol/aztec-packages), one npm package per platform (linux-x64, linux-arm64, darwin-x64, darwin-arm64, win32-x64) behind this meta package, which installs the one for your platform as an optional dependency and exposes it as the `bb` command. The bytes are identical to the binary in the GitHub release tarball of the same version, and `bb --version` reports that version. Set `BB_BINARY_PATH` to use a local build instead.
|
package/bin.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { spawnSync } from 'node:child_process';
|
|
3
|
+
import { BINARY_ENV_VAR, findBinary, platformPackage } from './platform.js';
|
|
4
|
+
|
|
5
|
+
const binary = findBinary();
|
|
6
|
+
if (!binary) {
|
|
7
|
+
const pkg = platformPackage();
|
|
8
|
+
console.error(
|
|
9
|
+
pkg
|
|
10
|
+
? `bb: native binary not found; install ${pkg} or set ${BINARY_ENV_VAR}.`
|
|
11
|
+
: `bb: no prebuilt binary for ${process.platform}-${process.arch}; set ${BINARY_ENV_VAR} to a local build.`,
|
|
12
|
+
);
|
|
13
|
+
process.exit(1);
|
|
14
|
+
}
|
|
15
|
+
const result = spawnSync(binary, process.argv.slice(2), { stdio: 'inherit' });
|
|
16
|
+
if (result.error) {
|
|
17
|
+
console.error(result.error.message);
|
|
18
|
+
process.exit(1);
|
|
19
|
+
}
|
|
20
|
+
process.exit(result.status ?? 1);
|
package/package.json
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@aztec-foundation/bb",
|
|
3
|
+
"version": "6.0.0-nightly.20260902",
|
|
4
|
+
"description": "The bb prover/verifier CLI",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"bin": {
|
|
8
|
+
"bb": "bin.js"
|
|
9
|
+
},
|
|
10
|
+
"files": [
|
|
11
|
+
"bin.js",
|
|
12
|
+
"platform.js",
|
|
13
|
+
"README.md"
|
|
14
|
+
],
|
|
15
|
+
"optionalDependencies": {
|
|
16
|
+
"@aztec-foundation/bb-linux-x64": "6.0.0-nightly.20260902",
|
|
17
|
+
"@aztec-foundation/bb-linux-arm64": "6.0.0-nightly.20260902",
|
|
18
|
+
"@aztec-foundation/bb-darwin-x64": "6.0.0-nightly.20260902",
|
|
19
|
+
"@aztec-foundation/bb-darwin-arm64": "6.0.0-nightly.20260902",
|
|
20
|
+
"@aztec-foundation/bb-win32-x64": "6.0.0-nightly.20260902"
|
|
21
|
+
},
|
|
22
|
+
"repository": {
|
|
23
|
+
"type": "git",
|
|
24
|
+
"url": "git+https://github.com/AztecProtocol/aztec-packages.git",
|
|
25
|
+
"directory": "barretenberg/ts/bb-cli"
|
|
26
|
+
}
|
|
27
|
+
}
|
package/platform.js
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
// Resolves the native bb shipped by the matching @aztec-foundation/bb-<platform> package.
|
|
2
|
+
import fs from 'node:fs';
|
|
3
|
+
import path from 'node:path';
|
|
4
|
+
import { createRequire } from 'node:module';
|
|
5
|
+
import { fileURLToPath } from 'node:url';
|
|
6
|
+
|
|
7
|
+
const PLATFORM_PACKAGES = {
|
|
8
|
+
'linux-x64': '@aztec-foundation/bb-linux-x64',
|
|
9
|
+
'linux-arm64': '@aztec-foundation/bb-linux-arm64',
|
|
10
|
+
'darwin-x64': '@aztec-foundation/bb-darwin-x64',
|
|
11
|
+
'darwin-arm64': '@aztec-foundation/bb-darwin-arm64',
|
|
12
|
+
'win32-x64': '@aztec-foundation/bb-win32-x64',
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export const BINARY_ENV_VAR = 'BB_BINARY_PATH';
|
|
16
|
+
|
|
17
|
+
export function platformPackage() {
|
|
18
|
+
return PLATFORM_PACKAGES[`${process.platform}-${process.arch}`] ?? null;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export function findBinary() {
|
|
22
|
+
const override = process.env[BINARY_ENV_VAR];
|
|
23
|
+
if (override) return override;
|
|
24
|
+
const pkg = platformPackage();
|
|
25
|
+
if (!pkg) return null;
|
|
26
|
+
const file = process.platform === 'win32' ? 'bb.exe' : 'bb';
|
|
27
|
+
const require = createRequire(import.meta.url);
|
|
28
|
+
try {
|
|
29
|
+
return path.join(path.dirname(require.resolve(pkg + '/package.json')), 'bin', file);
|
|
30
|
+
} catch {
|
|
31
|
+
// A checkout of this repository: the platform packages sit next to this file.
|
|
32
|
+
const sibling = path.join(path.dirname(fileURLToPath(import.meta.url)), 'packages', pkg.split('/').pop(), 'bin', file);
|
|
33
|
+
return fs.existsSync(sibling) ? sibling : null;
|
|
34
|
+
}
|
|
35
|
+
}
|