Skip to content

Commit 8c12441

Browse files
committed
intial rust sys crate for unsafe bindings
1 parent f6a3424 commit 8c12441

File tree

13 files changed

+634
-3
lines changed

13 files changed

+634
-3
lines changed

c/include/debayer.h

+3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
#ifndef DEBAYERC_H
22
#define DEBAYERC_H
33

4+
#include "cuda_runtime.h"
5+
6+
#include <stdio.h>
47
#include <stdint.h>
58

69
/* // Number of pixels to pad */

flake.lock

+36-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

+9-2
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,16 @@
33

44
inputs = {
55
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
6+
rust-overlay.url = "github:oxalica/rust-overlay";
67
flake-utils.url = "github:numtide/flake-utils";
78
};
89

9-
outputs = { self, nixpkgs, flake-utils, ... }:
10+
outputs = { self, nixpkgs, rust-overlay, flake-utils, ... }:
1011
flake-utils.lib.eachDefaultSystem (system:
1112
let
13+
overlays = [ (import rust-overlay) ];
1214
pkgs = import nixpkgs {
13-
inherit system;
15+
inherit system overlays;
1416
config.allowUnfree = true;
1517
};
1618
libdebayer = pkgs.stdenv.mkDerivation {
@@ -90,8 +92,13 @@
9092
ncurses5 stdenv.cc binutils
9193
libdebayer
9294
libdebayer_cpp
95+
rust-bin.nightly.latest.default
96+
9397
];
9498

99+
LIBCLANG_PATH = pkgs.lib.optionalString pkgs.stdenv.isLinux "${pkgs.libclang.lib}/lib/";
100+
101+
95102
shellHook = ''
96103
export CUDA_PATH=${pkgs.cudatoolkit}
97104
export libdebayer_DIR=${libdebayer}/lib/cmake

rust/.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
result
2+
target

rust/Cargo.lock

+200
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rust/Cargo.toml

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[package]
2+
name = "libdebayer-rs"
3+
version = "0.1.0"
4+
edition = "2021"
5+
6+
[dependencies]
7+
cust = "0.3.2"

rust/libdebayer-sys/.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
result
2+
target

0 commit comments

Comments
 (0)