aboutsummaryrefslogtreecommitdiff
path: root/src/linux_c.zig (follow)
AgeCommit message (Collapse)AuthorFilesLines
2023-06-21upgrade zig to `v0.11.0-dev.3737+9eb008717` (#3374)Gravatar Dylan Conway 1-6/+6
* progress * finish `@memset/@memcpy` update * Update build.zig * change `@enumToInt` to `@intFromEnum` and friends * update zig versions * it was 1 * add link to issue * add `compileError` reminder * fix merge * format * upgrade to llvm 16 * Revert "upgrade to llvm 16" This reverts commit cc930ceb1c5b4db9614a7638596948f704544ab8. --------- Co-authored-by: Jarred Sumner <jarred@jarredsumner.com> Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-04-27Don't preallocate unless its profitableGravatar Jarred Sumner 1-0/+1
2023-04-27very slightly faster open() and writeFileSync() (#2759)Gravatar Jarred Sumner 1-0/+79
* Make open() slightly faster on macOS * Support using `writeFileSync` from native code * Add `openat$NOCANCEL` symbol * fixups for linux * do benchmark --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-04-19Fix broken autocompleteGravatar Jarred Sumner 1-1/+1
2023-03-02Add a zig fmt action (#2277)Gravatar Jarred Sumner 1-2/+1
* Add a zig fmt action * add failing file * Setup prettier better * Update prettier-fmt.yml * Fail on error * Update prettier-fmt.yml * boop * boop2 * tar.gz * Update zig-fmt.yml * Update zig-fmt.yml * Update zig-fmt.yml * Update zig-fmt.yml * Update zig-fmt.yml * boop * Update prettier-fmt.yml * tag * newlines * multiline * fixup * Update zig-fmt.yml * update it * fixup * both * w * Update prettier-fmt.yml * prettier all the things * Update package.json * zig fmt * ❌ ✅ * bump * . * quotes * fix prettier ignore * once more * Update prettier-fmt.yml * Update fallback.ts * consistentcy --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-02-27Feat/os.network interfaces (#2142)Gravatar Justin Whear 1-0/+12
2023-02-24prefer `bun.copy()` over `std.mem.copy()` (#2152)Gravatar Alex Lam S.L 1-2/+2
2023-01-26Remove usages of assumeSentinelGravatar Jarred SUmner 1-2/+2
2023-01-09Cleanup error handling in Bun.listenGravatar Jarred Sumner 1-0/+14
2022-12-28Upgrade to latest Zig (#1610)Gravatar Jarred Sumner 1-11/+2
* @min and @max * builtins and some trivial ones * Most of them * more * more! * More Progress * wip * Update tagged_pointer.zig * Update http_client_async.zig * Most of the iterable dir changes * alright * Remove usages of deprecated formatters * :camera: * fmt * Update shimmer.zig * wip * wip * wip * progress * more * Latest * stuck on error * latest * workaround stage2 * wip * Update string_immutable.zig * wip * Migrate `Dirent` and `require("fs')` to use JSC<>Zig bindings * Fix build errors * Fixup most of the test failures * Fix `make headers` * Fix "outside package path" error * Fixup aligned alloc * Add missing file * linux * More linux fixes * use latest peechy * Fix transpiler test failure * Forgot about these * Fixup test failure * Update node-timers.test.ts * [node:htt] Fix `undefined is not an object` error Fixes https://github.com/oven-sh/bun/issues/1618 * Update http.exports.js * Make this test less flaky * fix hashes * Fix hex formatting and zls issues * Download zig version * Update Dockerfile * Update Dockerfile * Update uws * Update Dockerfile * Set llvm version * Update README.md * Update uws * Update Dockerfile * Update io_linux.zig * Update bun.zig * Log output * workaround strange @cInclude error * Make ffi tests better * Don't use cImport * Update c.zig * Update c-bindings.cpp * call setOutputDir * Update Dockerfile * Use a longer name * latest * Update serve.test.ts Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> Co-authored-by: Veikka Tuominen <git@vexu.eu>
2022-12-06Fix glibc symbol version issues preventing `bun install` from being used in ↵Gravatar Jarred Sumner 1-4/+15
older glibc versions (#1580) * Prevent integer overflow in connectError * Add missing deepEquals() type to Bun * fix missing glibc symbols * Fix missing symbol issues * Try this * Update glibc-versions-hack.cpp * Update glibc-versions-hack.cpp * Update glibc-versions-hack.cpp Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2022-11-14Bugfixes and perf improvements to child_processGravatar Jarred SUmner 1-0/+2
2022-09-25Make Linux implementation workGravatar Jarred SUmner 1-26/+56
2022-09-25Linux implementationGravatar Jarred Sumner 1-0/+57
2022-08-28Remove code that doesn't workGravatar Jarred Sumner 1-1/+0
2022-08-27fix compile error (#1157)Gravatar Zilin Zhu 1-2/+2
2022-08-26Remove pointer to stack buffer in `os` module and fix build issueGravatar Jarred Sumner 1-4/+2
We cannot have pointers to stack memory returned in the same scope because that memory is no longer valid at the end of the scope cc @xHyroM
2022-08-25feat: implement native os module (#1115)Gravatar Hyro 1-0/+81
* feat: implement os module * revert(bun-error): package-lock.json * feat: implement EOL * feat: implement EOL * feat: implement arch function * feat: implement homedir function * add comptime to homedir if * feat: add platform function * feat: implement type function * feat: add hostname (not sure iff works on all platforms) * chore: make requested changes * fix: change toValueGC into toValue in arch function * add EOL, devNull constant variables * fix: store only string * feat: add tests * feat: add endianness * ususe toValue for devNull & EOL * feat: implement endianness & fix release * revert javascript.zig fix * feat: implement tmpdir * feat: implement totalmem, freemem, uptime * feat: loadavg * feat: implement version * feat: add userInfo * feat: implement totalmem for macos * feat: add getPriority (not finished, waiting for dc response) * feat: finish userInfo implementation * feat: implement cpus, not done * feat: finish getPriority implementation & stats cpus() * feat: implement setPriority * reemove test.c * feat: implement constants.dlope.xn, constants.priority.x, constants.UV_UDP_REUSEADDR * feat: implement signals, errno * updated cpus function, stilldoesnt work * increase object length * feat: add t more ests * feat: add cpus() * remov some files * fix: handle empty array * started working on interface addresses (in C) ill use C++ after it work * fix interface_addresses * Improved getCpuInfo code, decreased ram usage, increased speed * getCpuTime optimizations * started working on networkInterfaces * feat: networkInterfaces implementation * delete unnecessary files * add benchs & fix code * add tests * add missing benchs * Increased buffer of getCpuInfo to 2048, it should skip few iterations * remove hardcoded constants * feat: implement errno constants * fix getWindowsErrorConstant * feat: add signal constants * feat: implement priority constants * remove duplications * fix: change value to ?i16 * fix(__defineConstant): make some parameters comptime, change value to ?i32 * fix: add E to ERRNO constants, add SIG to SIG constants * feat: add dlopen constants * change functions to private * feat: add UV_UDP_REUSEADDR * fix typo * simplify functions * rename functions in bindings * feat: implement loadavg for darwin * feat: implement system uptime * feat: implement get free memory for darwin * fix system memory bindings * feat: implement network interfaces for darwin * code cleanup * feat: support for macos version & release * some fixes * MacOS support for CpuInfo * Fixed minor mistake in getCpuInfo_B * Delete test.zig * Update c_cpp_properties.json * Update tasks.json * feat: implement scopeid * feat: implement cidr 🚀 * remove unnecesarry changes * remove unnecesarry changes * chore: requested changes Co-authored-by: Jarred Sumner <jarred@jarredsumner.com> * chore: requested changes Co-authored-by: Jarred Sumner <jarred@jarredsumner.com> * chore: requested changes Co-authored-by: Jarred Sumner <jarred@jarredsumner.com> * chore: requested changes Co-authored-by: Jarred Sumner <jarred@jarredsumner.com> * chore: requested changes Co-authored-by: Jarred Sumner <jarred@jarredsumner.com> * chore: requested changes Co-authored-by: Jarred Sumner <jarred@jarredsumner.com> * chore: requested changes Co-authored-by: Jarred Sumner <jarred@jarredsumner.com> * fix: import string * fix: change IPV6 to IPv6 * fix some things * chore: make requested changes * revert: launch.json * fix test * Fixed few memory leaks * testing * again * added len * another test * improved parsing * added small check * Bonk * FINISH 🚀🚀🚀🚀🚀🚀 * Update tasks.json * NetworkInterface test * FINISH 🚀🚀🚀 Co-authored-by: Fire-The-Fox <gajdos.jan77@gmail.com> Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
2022-04-06[bun.js] Add stdout, stderr, stdin to Bun and support sendfile() + splice()Gravatar Jarred SUmner 1-0/+17
2022-02-10Update linux_c.zigGravatar Jarred Sumner 1-0/+4
2022-01-19`fs.*Sync()`, `bun wiptest`, and More ™ (#106)Gravatar Jarred Sumner 1-0/+278
* 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 * :sleepy: * [Bun.js] Implement `process.versions`, `process.pid`, `process.ppid`, `process.nextTick`, `process.versions`, * Implement `process.env.toJSON()` * [Bun.js] Improve performance of `fs.existsSync` * :nail_care: * [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 * :camera: * 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}