mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 22:09:09 +00:00
Merge branch 'trunk' into dict-more
This commit is contained in:
commit
60edbaffee
10 changed files with 323 additions and 96 deletions
|
@ -2,15 +2,20 @@ use std::fs::File;
|
|||
use std::io::prelude::Read;
|
||||
use std::vec::Vec;
|
||||
|
||||
const PATH: &str = env!(
|
||||
const BC_PATH: &str = env!(
|
||||
"BUILTINS_BC",
|
||||
"Env var BUILTINS_BC not found. Is there a problem with the build script?"
|
||||
);
|
||||
|
||||
pub const OBJ_PATH: &str = env!(
|
||||
"BUILTINS_O",
|
||||
"Env var BUILTINS_O not found. Is there a problem with the build script?"
|
||||
);
|
||||
|
||||
pub fn get_bytes() -> Vec<u8> {
|
||||
// In the build script for the builtins module, we compile the builtins bitcode and set
|
||||
// BUILTINS_BC to the path to the compiled output.
|
||||
let mut builtins_bitcode = File::open(PATH).expect("Unable to find builtins bitcode source");
|
||||
let mut builtins_bitcode = File::open(BC_PATH).expect("Unable to find builtins bitcode source");
|
||||
let mut buffer = Vec::new();
|
||||
builtins_bitcode
|
||||
.read_to_end(&mut buffer)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue