Skip to content

Commit

Permalink
Merge pull request #314 from Alex-Fischman/main
Browse files Browse the repository at this point in the history
Expose the C runtime library to Rust library users
  • Loading branch information
sampsyo authored Mar 29, 2024
2 parents 0eedeea + b82ce25 commit b20cc2d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions brilift/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,8 @@ pub fn jit_run(program: &Program, args: Vec<String>, dump_ir: bool) {
// Invoke the main function.
unsafe { trans.run(entry_id, &main_args) };
}

/// The C runtime library for Rust library users.
pub fn c_runtime() -> &'static str {
include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/rt.c"))
}

0 comments on commit b20cc2d

Please sign in to comment.