rabbitizer/tools/rs_table_gen.sh
Anghelo Carvajal fb8c1edbd7
Rust bindings (#17)
* Generate bindings for enums

* Add .gitignore Cargo didn't automatically made

* Actually build the files into the library

* `pub` in `mod` to fix warning

* instruction struct

* Instruction rust binding

* Add InstrId::ALL_MAX

* link C library to rust

* Publish crate CI

* test

* config bindings

* add getters for registers

* add names methods for register enums

* get_operand_type

* feedback from simon

* Forgot to add new file to python setup.py

* get_operands_slice

* add stuff to cargo.toml
2022-12-18 15:15:39 -03:00

19 lines
455 B
Bash
Executable File

#!/bin/bash
# SPDX-FileCopyrightText: © 2022 Decompollaborate
# SPDX-License-Identifier: MIT
set -e
INPUT_FILE=$1
OUTPUT_FILE=$2
echo "/* SPDX-FileCopyrightText: © 2022 Decompollaborate */" > ${OUTPUT_FILE}
echo "/* SPDX-License-Identifier: MIT */" >> ${OUTPUT_FILE}
echo >> ${OUTPUT_FILE}
echo "/* Automatically generated. DO NOT MODIFY */" >> ${OUTPUT_FILE}
echo >> ${OUTPUT_FILE}
cpp -P -I include -I ../include ${INPUT_FILE} >> ${OUTPUT_FILE}