Commit Graph

97 Commits

Author SHA1 Message Date
Alexander
7d1c9fa1a4 Migrate to Zig v0.10.0 2022-07-09 05:09:16 -07:00
Jarred Sumner
d3ba6f0f12 Rename defaultErrorHandler to runErrorHandler 2022-07-02 01:36:04 -07:00
Jarred Sumner
729d445b68 change the directory structure 2022-06-22 23:21:48 -07:00
Jarred Sumner
dbde52504d ArrayBufferSink works and it's good. 2022-06-12 21:40:45 -07:00
Jarred Sumner
701d6ec45d rename _global -> bun 2022-03-08 18:54:54 -08:00
Jarred Sumner
88b60e6f10 add is_bindgen stub 2022-03-02 21:12:02 -08:00
Jarred Sumner
d89aa9a9e6 Update main.zig 2022-01-23 20:10:55 -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
0edf6fd1e4 Improve error handling when out of file handles 2022-01-04 18:29:21 -08:00
Jarred Sumner
5311219de7 dead code 2022-01-03 22:26:24 -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
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
8d031f13c0 zig fmt 2021-12-29 02:49:25 -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
b1660fa468 [bun install] async http request works I think? 2021-12-16 19:18:51 -08:00
Jarred Sumner
7e159cb5cd ❇️ 2021-10-14 22:10:08 -07:00
Jarred SUmner
f4a4e793aa Add Three.js benchmark 2021-10-03 02:22:00 -07:00
Jarred SUmner
cdabcfd9d0 Linux works now. 2021-10-02 22:54:19 -07:00
Jarred Sumner
350569655b Support bundling dynamically imported modules. 2021-09-12 00:39:57 -07:00
Jarred Sumner
e2b9f23231 Add display name field to frameworks, improve logging, add counters, add
Former-commit-id: b2cf011b6c6405a786fe22367e1cd4e6c2c4c90f
2021-08-31 23:07:03 -07:00
Jarred Sumner
8c67007926 Use mimalloc for a 10% boost
Former-commit-id: 044e11d720bc6742dc53b30b4e88e8be7e76c419
2021-08-23 02:29:07 -07:00
Jarred Sumner
574be79253 alright thats the rename
Former-commit-id: 0faf61249e76382dfb1aa8721249474eae920753
2021-08-17 01:44:30 -07:00
Jarred Sumner
3b684308c3 ok
Former-commit-id: e7d0ff27193defd870ae29bd9b4d4c2044488eac
2021-08-03 16:01:15 -07:00
Jarred Sumner
84d7234f24 cool
Former-commit-id: a7214ab61c
2021-07-26 16:39:40 -07:00
Jarred Sumner
3b8cabcc81 Generate summary
Former-commit-id: cdb9af36c1
2021-06-08 02:54:50 -07:00
Jarred Sumner
21a1134de3 okl
Former-commit-id: 0fb2584f15
2021-06-02 20:37:04 -07:00
Jarred Sumner
da0bb118dc HTTP fixes + buffer stdout/in + a little HTTP caching
Former-commit-id: d49df1df57
2021-06-02 16:39:40 -07:00
Jarred Sumner
324784cd6e update
Former-commit-id: a5f1670e92
2021-05-11 18:39:00 -07:00
Jarred Sumner
fc75a0dea6 asdasdasdasd
Former-commit-id: 2b3c0584c6
2021-05-10 20:05:53 -07:00
Jarred Sumner
caa747ba71 wip
Former-commit-id: f4267e2d1f
2021-05-07 14:12:56 -07:00
Jarred Sumner
fad34bb4ab cool
Former-commit-id: 96ff169e46
2021-05-07 01:26:26 -07:00
Jarred Sumner
41c9896e11 I think that fixes the scopes bug
Former-commit-id: 2cbd4c9d80
2021-05-05 19:02:14 -07:00
Jarred Sumner
ca2a3f69ff hm
Former-commit-id: 1d44b63675
2021-05-03 20:29:38 -07:00
Jarred Sumner
97cb54de2e classes work, excluding name and constructor/super
Former-commit-id: 818d014931
2021-05-02 13:04:55 -07:00
Jarred Sumner
3050d5a1a4 Assorted bugfixes but the next step really is porting tests and fixing
Former-commit-id: f59ec8d6c0
2021-05-01 01:28:40 -07:00
Jarred Sumner
2961b7c8ca inching closure
Former-commit-id: 107310d785
2021-04-30 15:34:31 -07:00
Jarred Sumner
24d1479ea8 hm
Former-commit-id: 2567243c8d
2021-04-29 20:22:25 -07:00
Jarred Sumner
cabe773a4f wip
Former-commit-id: b37acf309c
2021-04-28 21:58:02 -07:00
Jarred Sumner
55674a6add export default json 2021-04-27 12:07:52 -07:00
Jarred Sumner
02fbb8e82a json works in CLI sort of 2021-04-27 12:00:10 -07:00
Jarred Sumner
70b6f889c7 lots 2021-04-26 19:22:17 -07:00
Jarred Sumner
568db047a3 wap 2021-04-26 00:34:45 -07:00
Jarred Sumner
99918c35ec it prints true and false 2021-04-25 18:47:09 -07:00
Jarred Sumner
ad46a05ea5 hm 2021-04-21 16:40:34 -07:00
Jarred Sumner
5ae24b75ae lots 2021-04-19 20:53:54 -07:00
Jarred Sumner
41367499de wip wip 2021-04-18 15:24:24 -07:00
Jarred Sumner
025fe36def woot 2021-04-17 15:21:31 -07:00