oven-sh/bun · error
Usage
Error message
Usage: %s <file>
What it means
Usage guard in cold-jsc-start's main(): printed to stderr when the tool is invoked without a file argument (argc < 2). It fires purely as a CLI-usage message telling the operator to pass the JavaScript file used to measure JSC cold-start time.
Solutions
- Invoke the binary as: cold-jsc-start <file.js>
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at misctools/cold-jsc-start.cpp:65 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of oven-sh/bun@8c5296ac45 (2026-08-16).
Data as JSON: /api/errors/b26cb695013cf045.
Report an issue: GitHub.
Appendix: source
Thrown at misctools/cold-jsc-start.cpp:65
if (auto *buffer = jsDynamicCast<JSC::JSArrayBufferView *>(toWriteArg)) {
auto *data = buffer->vector();
auto length = buffer->byteLength();
auto written = write(fd, data, length);
return JSValue::encode(jsNumber(written));
}
auto string = toWriteArg.toWTFString(globalObject);
RETURN_IF_EXCEPTION(scope, {});
auto utf8 = string.utf8();
auto length = utf8.length();
auto written = write(fd, utf8.data(), length);
return JSValue::encode(jsNumber(written));
}
int main(int argc, char **argv) {
if (argc < 2) {
fprintf(stderr, "Usage: %s <file>\n", argv[0]);
return 1;
}
#ifdef VERBOSE
auto stopwatch = Stopwatch::create();
stopwatch->start();
#endif
{
WTF::initializeMainThread();
JSC::initialize();
{
JSC::Options::AllowUnfinalizedAccessScope scope;
JSC::Options::useConcurrentJIT() = true;
// JSC::Options::useSigillCrashAnalyzer() = true;
JSC::Options::useWebAssembly() = true;
JSC::Options::useSourceProviderCache() = true;
// JSC::Options::useUnlinkedCodeBlockJettisoning() = false;View on GitHub (pinned to 8c5296ac45)