module
bun:jsc
The 'bun:jsc' module is APIs for interacting with JavaScriptCore, the JavaScript engine that powers Bun. These APIs are mostly for advanced use cases, and are not needed for most applications.
Functions 28
- callerSourceOrigin()
- deserialize()
Convert an ArrayBuffer or Buffer to a JavaScript value compatible with the HTML Structured Clone Algorithm.
- drainMicrotasks()
- edenGC()
- estimateShallowMemoryUsageOf()
Non-recursively estimate the memory usage of an object, excluding the memory usage of properties or other objects it references.
- fullGC()
- gcAndSweep()
- getProtectedObjects()
This returns objects which native code has explicitly protected from being garbage collected
- getRandomSeed()
- heapSize()
- heapStats()
- isRope()
- jscDescribe()
This used to be called "describe" but it could be confused with the test runner.
- jscDescribeArray()
- memoryUsage()
- noFTL()
- noOSRExitFuzzing()
- numberOfDFGCompiles()
- optimizeNextInvocation()
- profile()
Run JavaScriptCore's sampling profiler for a particular function
- releaseWeakRefs()
- reoptimizationRetryCount()
- serialize()
Convert a JavaScript value to a binary representation that can be sent to another Bun instance.
- setRandomSeed()
- setTimeZone()
Set the timezone used by Intl, Date, etc.
- startRemoteDebugger()
Start a remote debugging socket server on the given port.
- startSamplingProfiler()
Run JavaScriptCore's sampling profiler
- totalCompileTime()