Make Rust acknowledge the tables/ folder

This commit is contained in:
angie 2023-06-10 10:20:16 -04:00
parent 5bcd3618e5
commit 5bc9246c05
3 changed files with 10 additions and 2 deletions

View File

@ -33,6 +33,10 @@ jobs:
- name: Build Rust tests
run: cargo test --workspace
- name: Publish dry run
if: github.event_name == 'push' && !startsWith(github.ref, 'refs/tags/')
run: cargo publish --dry-run
- name: Upload crate
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
run: cargo publish --token ${{ secrets.CARGO_REGISTRY_TOKEN }}

View File

@ -14,7 +14,7 @@ repository = "https://github.com/Decompollaborate/rabbitizer"
license = "MIT"
keywords = ["MIPS", "decoder"]
build = "rust/build.rs"
include = ["/rust/src", "/rust/build.rs", "/src", "/include"]
include = ["/rust/src", "/rust/build.rs", "/src", "/include", "/tables"]
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

View File

@ -7,8 +7,12 @@ fn main() {
.unwrap()
.filter_map(|g| g.ok())
.collect();
let tables_paths: Vec<std::path::PathBuf> = glob::glob("tables/tables/**/*.inc")
.unwrap()
.filter_map(|g| g.ok())
.collect();
for path in c_paths.iter().chain(&h_paths) {
for path in c_paths.iter().chain(&h_paths).chain(&tables_paths) {
println!("cargo:rerun-if-changed={}", path.to_string_lossy());
}