Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions dev/release/rat_exclude_files.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,5 @@ r/*/cran-comments.md
r/*/.Rbuildignore
r/*/tests/testthat/_snaps/*
rust/Cargo.lock
rust/driver/snowflake/go
testing/*
12 changes: 12 additions & 0 deletions rust/driver/snowflake/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,18 @@ homepage.workspace = true
repository.workspace = true
keywords.workspace = true
categories.workspace = true
exclude = [
"go/adbc/driver/bigquery",
"go/adbc/driver/flightsql",
"go/adbc/driver/panicdummy",
"go/adbc/drivermgr",
"go/adbc/pkg/bigquery",
"go/adbc/pkg/flightsql",
"go/adbc/pkg/gen",
"go/adbc/pkg/panicdummy",
"go/adbc/sqldriver",
"go/adbc/validation",
]

[features]
default = ["bundled", "env", "dotenv"]
Expand Down
14 changes: 11 additions & 3 deletions rust/driver/snowflake/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,21 @@
use std::error::Error;

/// Build and link the Go driver statically.
///
/// This defaults to assuming the source of the ADBC Go implementation is
/// available via the `go` symlink. This can be overridden by setting the
/// `ADBC_GO_SRC_DIR` environment variable.
#[cfg(feature = "bundled")]
fn bundled() -> Result<(), Box<dyn Error>> {
use std::{env, path::PathBuf, process::Command};

let manifest_dir = PathBuf::from(env::var("CARGO_MANIFEST_DIR")?);
let go_dir = manifest_dir.ancestors().nth(3).unwrap().join("go");
let go_pkg = go_dir.join("adbc/pkg/snowflake");
let go_pkg = match env::var("ADBC_GO_SRC_DIR") {
// Use the provides path to find the source
Ok(path) => PathBuf::from(path),
// Assume the source is available via the symlink
Err(_) => PathBuf::from(env::var("CARGO_MANIFEST_DIR")?).join("go"),
}
.join("adbc/pkg/snowflake");

let out_dir = PathBuf::from(env::var("OUT_DIR")?);
let archive = out_dir.join("libsnowflake.a");
Expand Down
1 change: 1 addition & 0 deletions rust/driver/snowflake/go
Loading