Skip to content

Commit

Permalink
build: generate bindings via bindgen cli
Browse files Browse the repository at this point in the history
  • Loading branch information
ckrenslehner committed Dec 28, 2024
1 parent 0bd5a97 commit e5a93d7
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 25 deletions.
2 changes: 2 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ shebang := if os() == 'windows' {
'/usr/bin/env nu'
}

import 'stm32cubeprogrammer-sys/justfile'

# List all the recipes
default:
just -l
Expand Down
25 changes: 0 additions & 25 deletions stm32cubeprogrammer-sys/build.rs

This file was deleted.

11 changes: 11 additions & 0 deletions stm32cubeprogrammer-sys/justfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
bindgen_header := "include/CubeProgrammer_API.h"

bindgen_output := if os() == 'windows' {
"src/bindings_windows.rs"
} else {
"src/bindings_unix.rs"
}

# Generate bindings for the CubeProgrammer API dynamic library
generate-bindings:
bindgen {{source_directory()}}/{{bindgen_header}} --dynamic-loading CubeProgrammer_API --output {{source_directory()}}/{{bindgen_output}} -- -x c++

0 comments on commit e5a93d7

Please sign in to comment.