Commit Graph

34 Commits

Author SHA1 Message Date
Jarred Sumner
701d6ec45d rename _global -> bun 2022-03-08 18:54:54 -08:00
Jarred Sumner
114c0e8ed2 [bun.js] Implement setTimeout, setInterval, clearTimeout, clearInterval 2022-03-01 00:47:31 -08:00
Jarred Sumner
7576caa54a typegenerator 2022-02-27 01:53:34 -08:00
Jarred Sumner
806e406b67 Expose TextEncoder & TextDecoder globally 2022-02-24 00:15:17 -08:00
Jarred Sumner
5a80a2e216 [bun.js] Fix segfault when running many bun.js instances 2022-02-16 04:01:13 -08:00
Jarred Sumner
97f0cef391 [Bun.js] Fix TypedArray/ArrayBuffer <> Zig interop 2022-01-20 16:19:07 -08:00
Jarred Sumner
a09b995651 Bun.Transpiler – API for scanning imports/exports of JSX/TSX/TS/JS files 2022-01-19 23:07:03 -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
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
42c7d887d3 👶event loop 2021-12-17 02:44:35 -08:00
Jarred Sumner
88e7e12a50 Fix all the compile errors 2021-09-30 14:20:45 -07:00
Jarred Sumner
4cdc8939ab Wire up macro-injected imports and move some structs above the gigantic parser type to reduce bun compile time a little 2021-09-30 13:49:46 -07:00
Jarred Sumner
13f6297312 Access object properties from macros 2021-09-27 21:01:34 -07:00
Jarred Sumner
66ed7c1f30 Basic macro impl 2021-09-26 00:14:15 -07:00
Jarred Sumner
940570af59 skeleton code 2021-09-24 16:41:45 -07:00
Jarred Sumner
79c7fe0f7a [Bun.js] Add Bun.readFileBytes() to get a Uint8Array of the file's contents without copying. 2021-09-21 15:39:52 -07:00
Dov Alperin
c98e007ff7 Get bun ready for linux builds
Adds: conditional builds in makefile
Fixes: incorrect imports of 'JavaScriptCore.zig' (note the caps 's')
replaces with correct import of 'JavascriptCore.zig'
2021-09-17 08:43:15 -04:00
Jarred Sumner
b66ef23167 yay 2021-09-10 03:32:21 -07:00
Jarred Sumner
8a02ad48a5 fetc h!!! 2021-09-09 05:40:07 -07:00
Jarred Sumner
d18e73aa57 Fixes for AARCH64: 2021-09-08 01:03:08 -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
f59892f647 late
Former-commit-id: 1d598bb05a3bac62d86063125e1fe2962f0b5cc6
2021-08-13 02:01:41 -07:00
Jarred Sumner
f74771144e Split up + generate client & server bundles, support framework +router in GenerateNodeModulesBundle , read framework from package.json + rename "publicURL" to "origin" + add import.meta.filepath
Former-commit-id: 1e76ebb5375247231181ec19a6396c6acf4684fb
2021-08-09 02:21:31 -07:00
Jarred Sumner
6e4da63abe router almost works
Former-commit-id: a8b9d27bd0946f9c48bd8e4b5b5c2031aa434f28
2021-08-05 23:47:36 -07:00
Jarred Sumner
dbda84ff87 fix errors
Former-commit-id: ac66d6af52f6a2340c57a957bed078f94a8cf8ed
2021-08-02 21:22:58 -07:00
Jarred Sumner
85b6d448ce hm
Former-commit-id: 0dc1c1a74b845d037326f4f2facd786924ca722e
2021-08-01 19:04:38 -07:00
Jarred Sumner
4a8b254652 esmodules work?
Former-commit-id: 5cb5af4416c12518eb195d1b310990fc5c94d6c8
2021-07-28 20:56:29 -07:00
Jarred Sumner
79cd2fbfe0 WIP bindings
Former-commit-id: 74e75d6925
2021-07-18 02:12:58 -07:00
Jarred Sumner
49ba78767c wip
Former-commit-id: 3f2a2e25ce
2021-07-14 13:11:03 -07:00
Jarred Sumner
d92a3861c9 ts
Former-commit-id: f4381bb297
2021-07-14 00:14:11 -07:00
Jarred Sumner
fea9faaf4c alright
Former-commit-id: ab73c7b323
2021-07-13 10:32:57 -07:00
Jarred Sumner
b1b459435f WIP
Former-commit-id: 6ba2feb8d2
2021-07-11 15:40:14 -07:00
Jarred Sumner
b7d7fac635 this kind of works, but there is a crash when bundling. I think its missing a Stmt.Data.Store.reset()
Former-commit-id: 88aad6aeb1
2021-07-01 05:12:15 -07:00
Jarred Sumner
516f264138 latest
Former-commit-id: cb2ee39bfa
2021-06-30 02:38:23 -07:00