Skip to content

Commit 1226b62

Browse files
committed
integration: accept napi source relocation to kernel workspace
Resolves the modify/delete conflict from merging sea-napi-binding: sea-integration had the StatementInner ValidityFlag fix in native/sea/src/statement.rs (inherited via sea-operation merge), while sea-napi-binding wants those files deleted because the Rust source now lives in the kernel workspace at databricks-sql-kernel/napi/. Resolution: propagate the StatementInner fix to the kernel napi crate (commit a8d8df7 on krn-napi-binding), then accept the deletion here. Built artifacts (.node, .d.ts) are repopulated by `npm run build:native` which delegates to the kernel workspace. native/sea/ now contains only README.md and the generated index.d.ts; index.linux-x64-gnu.node sits next to it as a build artifact.
2 parents 4d80267 + d5ce0cd commit 1226b62

16 files changed

Lines changed: 44 additions & 1323 deletions

native/sea/.gitignore

Lines changed: 0 additions & 7 deletions
This file was deleted.

native/sea/Cargo.toml

Lines changed: 0 additions & 64 deletions
This file was deleted.

native/sea/README.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# `native/sea/` — consumer-side directory for the Rust napi binding
2+
3+
**The Rust binding source lives in the kernel repo** at
4+
`databricks-sql-kernel/napi/`, as a workspace sibling of `pyo3/`.
5+
See `databricks-sql-kernel`'s root `Cargo.toml` `[workspace] members`.
6+
7+
## Why
8+
9+
Per the architectural decision recorded in
10+
`sea-workflow/decisions.md` (D-006), every language binding (PyO3,
11+
napi-rs, future cgo) is a workspace member of the kernel crate. This
12+
keeps Arrow version pinning lockstep, the path dep clean (`path = ".."`),
13+
and CI single (`cargo build --workspace`). The pattern matches polars,
14+
ruff, arrow-rs.
15+
16+
## What lives here
17+
18+
- `index.d.ts` — generated TypeScript declarations consumed by `lib/sea/`
19+
- `index.linux-x64-gnu.node` (and other platform variants) — symlinked
20+
or copied build artifacts from the kernel workspace at run time
21+
22+
## How to build the binding for local dev
23+
24+
```bash
25+
# From the nodejs repo root:
26+
npm run build:native
27+
# which delegates to the kernel workspace:
28+
# cd $DATABRICKS_SQL_KERNEL_REPO/napi && napi build --release
29+
# and copies the artifact back here
30+
```
31+
32+
`$DATABRICKS_SQL_KERNEL_REPO` defaults to a path published with the
33+
release flow; for dev it points at a local checkout of
34+
`databricks-sql-kernel`.
35+
36+
## How to consume in production
37+
38+
At release time the kernel CI publishes `@databricks/sea-native-<triple>`
39+
npm packages with the `.node` binaries. The nodejs driver declares them
40+
as `optionalDependencies` in `package.json`; `SeaNativeLoader.ts`
41+
resolves the right one at runtime.

native/sea/build.rs

Lines changed: 0 additions & 17 deletions
This file was deleted.

0 commit comments

Comments
 (0)