aboutsummaryrefslogtreecommitdiff
path: root/test/bun.js/ffi.test.js (follow)
AgeCommit message (Collapse)AuthorFilesLines
2022-12-28Upgrade to latest Zig (#1610)Gravatar Jarred Sumner 1-256/+251
* @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-11-09Add bun-types, add typechecking, add `child_process` types (#1475)Gravatar Colin McDonnell 1-18/+18
* Add bun-types to packages * Improve typing * Fix types in tests * Fix dts tests * Run formatter * Fix all type errors * Add strict mode, fix type errors * Add ffi changes * Move workflows to root * Add workflows * Remove labeler * Add child_process types * Fix synthetic defaults issue * Remove docs * Move scripts * Run prettier * Include examples in typechecking * captureStackTrace types * moved captureStackTrace types to globals * Address reviews Co-authored-by: Colin McDonnell <colinmcd@alum.mit.edu> Co-authored-by: Dylan Conway <dylan.conway567@gmail.com>
2022-11-02[bun:ffi] Add `threadsafe` option to callbacksGravatar Jarred Sumner 1-11/+26
2022-11-02[bun:ffi] Implement `JSCallback` so C can call into JSGravatar Jarred Sumner 1-97/+67
2022-09-09[bun:ffi] Add `f32`, `f64`, `i64`, u64` to `read`Gravatar Jarred Sumner 1-2/+11
2022-09-08Last commit was missing some codeGravatar Jarred Sumner 1-23/+22
2022-09-08[bun:ffi] Implement `read.{u8,i8,i16,i32,u16,u32,ptr,intptr}`Gravatar Jarred Sumner 1-0/+23
`read` in `bun:ffi` lets you read data from a pointer without creating a new DataView/ArrayBufferView ``` import {read} from 'bun:ffi'; expect(read.i8(ptr_, i)).toBe(view.getInt8(i, true)); expect(read.i16(ptr_, i)).toBe(view.getInt16(i, true)); expect(read.i32(ptr_, i)).toBe(view.getInt32(i, true)); expect(read.u8(ptr_, i)).toBe(view.getUint8(i, true)); expect(read.u16(ptr_, i)).toBe(view.getUint16(i, true)); expect(read.u32(ptr_, i)).toBe(view.getUint32(i, true)); } ```
2022-09-06workaround test failureGravatar Jarred Sumner 1-31/+33
2022-08-28support pass null as NULL ptr (#1160)Gravatar Zilin Zhu 1-0/+7
2022-08-27Fix ffi uint64_t parameter (#1158)Gravatar Zilin Zhu 1-30/+56
2022-08-12Update WebKitGravatar Jarred Sumner 1-13/+14
2022-08-10Fix console.log with typed arraysGravatar Jarred Sumner 1-16/+16
2022-08-09[bun:ffi] Re-enable most of the testsGravatar Jarred Sumner 1-543/+582
2022-06-22change the directory structurejarred/renameGravatar Jarred Sumner 1-0/+543