Skip to content

Commit 7a846b9

Browse files
committed
feat: add codex_export_bindings binary and update TypeScript export path
Introduced a new binary for exporting TypeScript bindings, enhancing the build process. Updated the export path in the Rust library to simplify directory management, ensuring bindings are generated in the correct location.
1 parent 93f7c96 commit 7a846b9

File tree

3 files changed

+2
-3
lines changed

3 files changed

+2
-3
lines changed
File renamed without changes.

codex_bindings/src/lib.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@ use std::path::Path;
1212
use ts_rs::TS;
1313

1414
pub fn export_ts_types() {
15-
let out_dir = Path::new(env!("CARGO_MANIFEST_DIR"))
16-
.join("..")
15+
let out_dir = Path::new(".")
1716
.join("src")
1817
.join("bindings");
1918
std::fs::create_dir_all(&out_dir).unwrap();

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"build": "tsc && vite build",
99
"preview": "vite preview",
1010
"tauri": "tauri",
11-
"export:bindings": "cargo run --manifest-path codex_bindings/Cargo.toml --bin export_bindings"
11+
"export:bindings": "cargo run --manifest-path codex_bindings/Cargo.toml --bin codex_export_bindings"
1212
},
1313
"dependencies": {
1414
"@radix-ui/react-accordion": "^1.2.12",

0 commit comments

Comments
 (0)