<commit_before>extern crate phf_codegen;

mod static_atom_list;

use std::fs::File;
use std::io::{BufWriter, Write};
use std::path::Path;

fn main() {
    let mut set = phf_codegen::OrderedSet::new();
    for &atom in static_atom_list::ATOMS {
        set.entry(atom);
    }

    let path = Path::new(env!("OUT_DIR")).join("static_atom_set.rs");
    let mut file = BufWriter::new(File::create(&path).unwrap());
    write!(&mut file, "pub static STATIC_ATOM_SET: phf::OrderedSet<&'static str> = ").unwrap();
    set.build(&mut file).unwrap();
    write!(&mut file, ";\n").unwrap();
}
<commit_msg>Fix cross-compilation error in shared/build.rs<commit_after>extern crate phf_codegen;

mod static_atom_list;

use std::fs::File;
use std::io::{BufWriter, Write};
use std::path::Path;

fn main() {
    let mut set = phf_codegen::OrderedSet::new();
    for &atom in static_atom_list::ATOMS {
        set.entry(atom);
    }

    let path = Path::new(&std::env::var("OUT_DIR").unwrap()).join("static_atom_set.rs");
    let mut file = BufWriter::new(File::create(&path).unwrap());
    write!(&mut file, "pub static STATIC_ATOM_SET: phf::OrderedSet<&'static str> = ").unwrap();
    set.build(&mut file).unwrap();
    write!(&mut file, ";\n").unwrap();
}

{'fraction_non_alphanumeric': 0.1932367149758454, 'fraction_numerical': 0.0, 'mean_word_length': 4.728110599078341, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4353348', 'n_tokens_mistral': 445, 'n_tokens_neox': 454, 'n_words': 90}