Skip to content
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

Add support for @libsql/client package #3407

Closed
nikitavoloboev opened this issue Jun 25, 2023 · 4 comments
Closed

Add support for @libsql/client package #3407

nikitavoloboev opened this issue Jun 25, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@nikitavoloboev
Copy link

nikitavoloboev commented Jun 25, 2023

What version of Bun is running?

0.6.10

What platform is your computer?

Darwin 22.5.0 arm64 arm

What steps can reproduce the bug?

try use this package: https://www.npmjs.com/package/@libsql/client

i.e. try run this code:

import { createClient } from "@libsql/client"

const config = {
  url: "file:local.db",
}
const db = createClient(config)
const rs = await db.execute("select 1")
console.log(rs)

with tsx works:

tsx run.ts
{
  columns: [ '1' ],
  rows: [ { '1': 1 } ],
  rowsAffected: 0,
  lastInsertRowid: undefined
}

with bun get this:

bun run.ts
[0.33ms] ".env"
dyld[57530]: missing symbol called
fish: Job 1, 'bun run.ts' terminated by signal SIGKILL (Forced quit)

Really love using this lib and would love to use it with bun.

@nikitavoloboev nikitavoloboev added the bug Something isn't working label Jun 25, 2023
@Jarred-Sumner
Copy link
Collaborator

This is happening because better-sqlite3 which is a dependency of @libsql/client is using V8 C++ bindings and that is difficult for Bun to support (as Bun uses JavaScriptCore)

@Hebilicious
Copy link

Hebilicious commented Aug 27, 2023

@Jarred-Sumner is better-sqlite3 support on the roadmap for v1 or is there a workaround ?
Should we add bun support in @libsql/client directly?

Just changing the import here should work https://github.com/libsql/libsql-client-ts/blob/main/src/sqlite3.ts
#2336 this would be really great to have for these scenarios.

Edit : This was more complicated, made a PR there to add support for bun:sqlite tursodatabase/libsql-client-ts#71

@Electroid
Copy link
Contributor

This isn't something we're considering right now. Also, going to close as a duplicate for another tracking issue.

@Electroid
Copy link
Contributor

Duplicate of #4290

@Electroid Electroid marked this as a duplicate of #4290 Feb 6, 2024
@Electroid Electroid closed this as not planned Won't fix, can't repro, duplicate, stale Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants