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

Generate lax code from lapack-sys crate #324

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "lax-bindgen/lapack-sys"]
path = lax-bindgen/lapack-sys
url = git@github.com:blas-lapack-rs/lapack-sys.git
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
members = [
"ndarray-linalg",
"lax",
"lax-bindgen",
]
12 changes: 12 additions & 0 deletions lax-bindgen/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[package]
name = "lax-bindgen"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
anyhow = "1.0.62"
proc-macro2 = "1.0.43"
quote = "1.0.21"
syn = { version = "1.0.99", features = ["full", "extra-traits"] }
1 change: 1 addition & 0 deletions lax-bindgen/lapack-sys
Submodule lapack-sys added at 6f42e1
12 changes: 12 additions & 0 deletions lax-bindgen/src/main.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
use anyhow::Result;
use std::{fs, path::PathBuf};

fn main() -> Result<()> {
let crate_root = PathBuf::from(env!("CARGO_MANIFEST_DIR"));
let lapack_sys = fs::read_to_string(crate_root.join("lapack-sys/src/lapack.rs"))?;

let file: syn::File = syn::parse_str(&lapack_sys)?;
dbg!(file);

Ok(())
}