This lets you have better control over backpressure in your server. You can also enable/disable compression per message with the compress option: // this will compress ws.send("Hello".repeat(1000), true); WebSocket.send returns undefined and does not indicate backpressure, which can cause iss...
“Two Brave Men Who Ate Nothing but Meat for an Entire Year.” Inhuman Experiment. 10 Sept 2009. Web. 8 Nov 2013. Union of Concerned Scientists. “Heads They Win, Tails We Lose: How Corporations Corrupt Science at the Public’s Expense.” Cambridge: UCS Publications, 2012. ...
That platform is theInvictus Games- a competition of wounded service men and women from around the world. Prince Harry launched the games fromLondon in 2014. After two years of preparations, the games are making theirAmerican debutand he admits that the expectations are high, reports...
I had to sell it in 2000 because of a ridiculous change in Dutch tax laws, and hoped to quickly buy something else instead (the new law would tax the equity gains for properties that were also used for one’s business at the personal tax rate, which was over 60% then). But despite ...
Use it to implement database clients, game servers – anything that needs to communicate over TCP (instead of HTTP). This is a low-level API intended for library authors and for advanced use cases. Start a TCP server with Bun.listen: // The server Bun.listen({ hostname: "localhost", ...
While filesystem lookups are faster than HTTP requests, there’s still overhead. What is .bun? Note: This format may change soon The .bun file contains: all the bundled source code all the bundled source code metadata project metadata & configuration Here are some of the questions .bun ...
Low-overhead FFI 3ns to go from JavaScript <> native code with bun:ffi (on my machine, an M1 Pro with 64GB of RAM) 5x faster than napi (Node v17.7.1) 100x faster than Deno v1.21.1 As measured in this simple benchmark Why is bun:ffi fast? Bun generates & just-in-time compil...
Use it to implement database clients, game servers – anything that needs to communicate over TCP (instead of HTTP). This is a low-level API intended for library authors and for advanced use cases. Start a TCP server with Bun.listen: // The server Bun.listen({ hostname: "localhost", ...
JavaScript engines allocate a separate BigInt which means they can't just fit in a regular javascript value. If you pass a BigInt to a function, it will be converted to a number To convert from a TypedArray to a pointer: import {ptr} from 'bun:ffi'; let myTypedArray = new Uint8...
This lets you have better control over backpressure in your server. You can also enable/disable compression per message with the compress option: // this will compress ws.send("Hello".repeat(1000), true); WebSocket.send returns undefined and does not indicate backpressure, which can cause iss...