| Crates.io | rune_c_compiler |
| lib.rs | rune_c_compiler |
| version | 0.5.1 |
| created_at | 2025-10-16 12:31:18.401731+00 |
| updated_at | 2025-11-27 14:41:50.613541+00 |
| description | A Rune to C source file compiler |
| homepage | |
| repository | https://github.com/NicolasDandanell/rune_c_compiler |
| max_upload_size | |
| id | 1885960 |
| size | 112,076 |
This program was written to compile .rune files into C source files. It allows the user to specify whether the packages and respective metadata should be packed, as well as which linker section the metadata should be placed in. This is still in active development, and many changes and features are yet to come.
Currently this program needs to be compiled from source to be used by the main Rune library (not published yet), but binaries are planned to be released in the future to avoid a dependence on Rust to run the program in the main Rune library.
To use the Rune C compiler, simply specify the following parameters:
--input_folder (-i) <path_to_input_folder> - Path to folder where the .rune files are located. The compiler will automatically search subfolders recursively for more .rune files. Can be passed multiple times if rune files are spread over multiple different directories.
--output_folder (-o) <path_to_input_folder> - Path where to output the generated C source files. They will keep the same folder structure as where they were found within the input folder.
--pack_data (-p) - Optional argument to pack generated data structures. By default they are not packed.
--pack_metadata (-m) - Optional argument to pack generated parsing metadata structures. By default they are not packed.
--data_section (-d) <linker_section> - Optional argument to place all generated parsing data into a specific linker section.
--unsorted (-u) Optional argument to avoid optimizing field elements in the structs for better alignment. By default they are optimized.
--silent (-s) Optional argument to specify whether the program should avoid printing any info output at all. By default info output is printed
--c_standard (-s) Optional argument which specifies which C standard the output source should comply with. By default it compiles to C23 standard
--debug Optional argument which enables the output of debug messages. Used mostly for bug-finding and developing on the compiler.