Commit Graph

96 Commits

Author SHA1 Message Date
Jarred Sumner
bc85dd2330 the events, they loop 2022-03-20 04:38:04 -07:00
Jarred Sumner
d6831cf801 [Bun.js] Implement HTMLRewriter
https://developers.cloudflare.com/workers/runtime-apis/html-rewriter
2022-03-12 01:14:45 -08:00
Jarred Sumner
0456845256 Add VLQ bench, improve decodeVLQ perf 2022-03-07 21:02:29 -08:00
Jarred Sumner
7c5c6cd519 source maps work for app code in bun dev! 2022-03-06 07:35:16 -08:00
Jarred Sumner
bb64920cf0 add datetime package 2022-03-04 00:21:08 -08:00
Jarred Sumner
50560e169c WASM 2022-02-27 23:20:10 -08:00
Jarred Sumner
4cedceaae2 Update build.zig 2022-02-27 04:15:42 -08:00
Jarred Sumner
f8b48ebec6 Save LLVM IR in debug build 2022-02-16 04:03:35 -08:00
Jarred SUmner
ecea12d206 No io_uring for Ubuntu 20.04 2022-01-24 19:12:58 -08:00
Jarred Sumner
d3a93d5273 fs.*Sync(), bun wiptest, and More ™ (#106)
* very very wip

* almost ready to fix the errors

* Update identity_context.zig

* Update base.zig

* [bun test] It runs successfully

* Remove unnecessary call

* [Bun.js] Improve JS <> Zig unicode string interop

This fixes longstanding unicode bugs with `console.log` & `fetch`.

I believe @evanwashere reported this first awhile ago

* [Bun.js] Implement `Object.is()` binding and a way to set a timeout for script execution

* Update PLCrashReport.zig

* [Bun.js] Make `console.log` more closely match Node.js and Deno

* [Bun.js] Implement formatting specifier for console.*

* Implement `console.clear()`

* bug fix

* Support console.clear()

* Buffer stderr

* [bun test] Begin implementing Node.js `fs`

* Update darwin_c.zig

* Implement more of `fs`

* `mkdir`, `mkdir` recursive, `mkdtemp`

* `open`, `read` (and pread)

* Move some things into more files

* Implement readdir

* `readFile`, `readLink`, and `realpath`

* `writeFile`, `symlink`, `chown`, `rename`, `stat`, `unlink`, `truncate`

* `lutimes`

* Implement `SystemError` and begin wiring up the `fs` module

* `"fs"` - Most of the arguments / validation

* `fs` - Rest of the arguments / validations

* Begin wiring up the `fs` module

* Fix all the build errors

* support printing typed arrays in console.log

* It...works?

* Support `require("fs")`, `import fs from 'fs';`, `import * as fs from 'fs'`

* Fix a couple bugs

* get rid of the crash reporter for now

* Update fs.exports.js

* [bun.js] slight improvement to startup time

* [bun.js] Improve error message printing

* [Bun.js] Add `Bun.gc()` to run the garbage collector manually and report heap size

* [Bun.js] Add Bun.generateHeapSnapshot to return what JS types are using memory

* [Bun.js] Add `Bun.shrink()` to tell JSC to shrink the VM size

* Improve encoding reader

* [bun.js] Improve callback & microtask performance

* Update node_fs.zig

* Implement `console.assert`

* simple test

* [Bun.js] Prepare for multiple globals/realms to support testing

* Create callbacks-overhead.mjs

* Update http.zig

* [Bun.js] Implement `queueMicrotask`

* Add test for queueMicrotask

* 😪

* [Bun.js] Implement `process.versions`, `process.pid`, `process.ppid`, `process.nextTick`, `process.versions`,

* Implement `process.env.toJSON()`

* [Bun.js] Improve performance of `fs.existsSync`

* 💅

* [Bun.js] Implement `process.chdir(str)` and `process.cwd()`, support up to 4 args in `process.nextTick`

* Make creating Zig::Process lazy

* Split processi nto separte file

* [Bun.js] Node.js Streams - Part 1/?

* [Bun.js] Node.js streams 2/?

* WIP streams

* fix crash

* Reduce allocations in many places

* swap

* Make `bun` start 2ms faster

* Always use an apiLock()

* libBacktrace doesn't really work yet

* Fix crash in the upgrade checker

* Clean up code for importing the runtime when not bundling

* 📷

* Update linker.zig

* 68!

* backtrace

* no, really backtrace

* Fix

* Linux fixes

* Fixes on Linux

* Update mimalloc

* [bun test] Automatically scan for {.test,_test,.spec,_spec}.{jsx,tsx,js,cts,mts,ts,cjs}
2022-01-19 02:29:07 -08:00
Jarred Sumner
0960f3d6d1 Implement a crash reporter and improve some error handling in bun install 2022-01-03 22:17:34 -08:00
Jarred SUmner
8148b8824f Improve debugging symbols on Linux 2022-01-03 01:46:11 -08:00
luke miles
7f33846005 copy: replace Bun with bun (#99)
Most CLI tools have the style convention of referring to themselves in
lowercase. It is, after all, the name that users type in when using
the tool. This PR maintains that convention in bun.

"Drop the uppercase B, it's cleaner"
2022-01-02 03:09:51 -08:00
Jarred Sumner
83004f0a0a Update build.zig 2021-12-31 18:24:28 -08:00
Jarred Sumner
c42fbbd10e Set to an explicit glibc 2021-12-31 18:23:59 -08:00
Jarred Sumner
efb8c4e36b Remove network_thread 2021-12-30 22:04:35 -08:00
Jarred Sumner
e75c711c68 Upgrade to latest Zig, remove dependency on patched version of Zig (#96)
* Prepare to upgrade zig

* zig fmt

* AllocGate

* Update data_url.zig

* wip

* few files

* just headers now?

* I think everything works?

* Update mimalloc

* Update hash_map.zig

* Perf improvements to compensate for Allocgate

* Bump

* 📷

* Update bun.lockb

* Less branching

* [js parser] Slightly reduce memory usage

* Update js_parser.zig

* WIP remove unused

* [JS parser] WIP support for `with` keyword

* Remove more dead code

* Fix all the build errors!

* cleanup

* Move `network_thread` up

* Bump peechy

* Update README.md
2021-12-30 21:12:32 -08:00
Jarred Sumner
336a4b6ac2 Prepare to run unit tests & remove some dead code (#92)
* Remove some dead code

* 💀 code

* Fix the zig tests

* [JS Printer] Print integers faster & less scientific notation on decimals

* 💀 dead code

* skip

* Run all the unit tests
2021-12-27 18:06:31 -08:00
Jarred Sumner
cff83a3fec Add dead code in build.zig for linking object files 2021-12-26 16:47:59 -08:00
Jarred Sumner
b73e7a9732 Add VSCode devcontainer environment for easy contributing 2021-12-23 18:40:03 -08:00
Jarred Sumner
ff99155f7d --dump-limits flag to inspect what the max file descriptor & stack size is 2021-12-21 18:48:52 -08:00
Jarred Sumner
ed02a24e0e Update build.zig 2021-12-21 00:12:03 -08:00
Jarred Sumner
e712d3458c Update build.zig 2021-12-21 00:05:47 -08:00
Jarred Sumner
685681dedc system libiconv 2021-12-21 00:03:15 -08:00
Jarred Sumner
eab99b3bae Remove references to s2n 2021-12-18 21:06:15 -08:00
Jarred Sumner
e2d6c692c4 Use new http in bun upgrade 2021-12-18 20:03:00 -08:00
Jarred Sumner
d4c55557c3 Implement hop archive format 2021-12-17 23:06:56 -08:00
Jarred SUmner
74ea36ac1c WIP hop 2021-12-17 15:47:24 -08:00
Jarred Sumner
267e926a38 [internal] Use more packages 2021-12-17 02:42:55 -08:00
Jarred Sumner
6a5dd6ed58 Update build.zig 2021-12-16 19:18:51 -08:00
Jarred Sumner
461c769ac4 Track peer dependencies but don't install them 2021-12-16 19:18:51 -08:00
Jarred Sumner
5d2cb27562 Start to restructure code 2021-12-16 19:18:51 -08:00
Jarred Sumner
9f1946ce70 [npm install] Use BoringSSL for https:// requests 2021-12-16 19:18:51 -08:00
Jarred Sumner
4af743766d [bun install] Begin to add io_uring (via tigerbeetle/@kprotty's interface) 2021-12-16 19:18:51 -08:00
Jarred Sumner
d19a6199ea Revert "Merge pull request #70 from Jarred-Sumner/lithdew/picohttp-mimalloc"
This reverts commit e8925e47b0, reversing
changes made to f82aa92c38.
2021-11-25 17:08:22 -08:00
Kenta Iwasaki
cc712668f0 mimalloc: patch malloc/free 2021-11-24 21:05:15 +00:00
Kenta Iwasaki
f7dbf5ac38 deps: add missing mimalloc dep to jsc bindings header generator 2021-11-24 17:26:02 +00:00
Kenta Iwasaki
283a01493c deps: build picohttp and mimalloc using zig
Reduce the amount of dependencies which need to be externally built
before Bun can be built.

Remove clause to enforce that Bash syntax is used in Makefile, as the
clause only works on a few Linux distros which assume bash is located at
/bin/bash.
2021-11-24 17:09:54 +00:00
Jarred Sumner
34771aad22 [build] Improve error messages for build failures 2021-11-06 19:24:04 -07:00
Jarred Sumner
109d53d461 [macOS] Fix minimum OS target
Closes https://github.com/Jarred-Sumner/bun/issues/55
2021-11-06 19:23:15 -07:00
Jarred Sumner
417c4e0faa - Fix consistentcy issue with runtime hash
- Fix edgecases in strings.eqlComptime by simplifying the implementation
2021-10-28 19:03:49 -07:00
Jarred Sumner
a44cb9708f New subcommand: bun upgrade. It upgrades bun to the latest version. 2021-10-28 05:34:38 -07:00
Jarred SUmner
a0f086ba85 Fix Linux x64 build 2021-10-26 22:37:03 -07:00
Jarred Sumner
42c264bf7b Fix all known string encoding bugs 2021-10-25 00:52:07 -07:00
Jarred Sumner
449c8b5f36 [internal] Tweak build system to better support unit tests in Zig 2021-10-24 06:18:42 -07:00
Jarred Sumner
0c769d0f61 No more iguanaTLS 2021-10-23 16:15:44 -07:00
Jarred Sumner
bf2732599c update makefile 2021-10-15 20:08:21 -07:00
Jarred Sumner
ba5f9887fb Update build.zig 2021-10-13 00:28:31 -07:00
Jarred Sumner
24c567086f Add OpenSSL 😢 2021-10-11 20:15:15 -07:00
Jarred SUmner
82bf89a946 1% perf improvements on Linux 2021-10-03 18:49:31 -07:00