Skip to main content Link Search Menu Expand Document (external link)

index overview

Root entrypoint: absolute path getters with zero external dependencies.

Added in v0.16.300


Table of contents


utils

CRSQLITE_VERSION

Bundled upstream cr-sqlite version.

Signature

export declare const CRSQLITE_VERSION: "0.16.3"

Added in v0.16.300

Platform (type alias)

Supported platform-arch identifiers.

Signature

export type Platform = _Platform

Added in v0.16.300

SUPPORTED_PLATFORMS

List of supported platforms.

Signature

export declare const SUPPORTED_PLATFORMS: readonly _Platform[]

Added in v0.16.300

getCrSqliteExtensionPathSync

Synchronous absolute path resolution for the cr-sqlite extension binary.

  • Returns an absolute path string that you can pass to db.loadExtension().
  • Throws native Error with code set to ERR_PLATFORM_UNSUPPORTED or ERR_EXTENSION_NOT_FOUND.

Signature

export declare const getCrSqliteExtensionPathSync: (platform?: Platform) => string

Example

import { getCrSqliteExtensionPathSync } from "@effect-native/libcrsql"

const path = getCrSqliteExtensionPathSync()
console.log(path)

Added in v0.16.300

pathToCrSqliteExtension

Absolute path to the cr-sqlite binary for the current platform, computed at import time.

  • Useful for the simplest use cases: just import and load.
  • Throws on unsupported platform or if the binary is not present.

Signature

export declare const pathToCrSqliteExtension: string

Example

import { pathToCrSqliteExtension } from "@effect-native/libcrsql"
console.log(pathToCrSqliteExtension)

Added in v0.16.300