proxy.golang.org : github.com/tursodatabase/turso-go
Go bindings for the turso database. This file implements library embedding and extraction at runtime, a pattern also used in several other Go projects that need to distribute native binaries: github.com/kluctl/go-embed-python: Embeds a full Python distribution in Go binaries, extracting to temporary directories at runtime. The approach used here was directly inspired by its embed_util implementation. github.com/kluctl/go-jinja2: Uses the same pattern to embed Jinja2 and related Python libraries, allowing Go applications to use Jinja2 templates without external dependencies. This approach has several advantages: - Allows distribution of a single, self-contained binary - Eliminates the need for users to set LD_LIBRARY_PATH or other environment variables - Works cross-platform with the same codebase - Preserves backward compatibility with existing methods - Extracts libraries only once per execution via sync.Once The embedded library is extracted to a user-specific temporary directory and loaded dynamically. If extraction fails, the code falls back to the traditional method of searching system paths.
Registry
-
Source
- Documentation
- JSON
purl: pkg:golang/github.com/tursodatabase/turso-go
Keywords:
bindings
, go
, sqlite3
, turso-db
License: MIT
Latest release: 23 days ago
First release: about 1 month ago
Namespace: github.com/tursodatabase
Stars: 15 on GitHub
Forks: 4 on GitHub
See more repository details: repos.ecosyste.ms
Last synced: 3 days ago