8000 feat: add bun support by DjDeveloperr · Pull Request #47 · denosaurs/deno_python · GitHub
[go: up one dir, main page]

Skip to content

feat: add bun support #47

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 15 commits into from
Sep 21, 2023
Prev Previous commit
Next Next commit
fix
  • Loading branch information
DjDeveloperr committed Sep 12, 2023
commit 0c128284a049e63d91665157000d463b0686249f
6 changes: 4 additions & 2 deletions src/bun_compat.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { type } from "node:os";

if (!("Deno" in globalThis) && "Bun" in globalThis) {
const { dlopen, FFIType, CString, JSCallback, ptr } = await import("bun:ffi");
const { dlopen, FFIType, CString, JSCallback, ptr } = Bun.FFI;
class Deno {
static env = {
get(name) {
Expand All @@ -8,7 +10,7 @@ if (!("Deno" in globalThis) && "Bun" in globalThis) {
};

static build = {
os: "darwin",
os: type().toLowerCase(),
};

static transformFFIType(type) {
Expand Down
0