greyblake / whatlang-rs

Natural language detection library for Rust. Try demo online: https://whatlang.org/
https://whatlang.org/
MIT License
966 stars 108 forks source link

Automatically generate lang.rs with a cargo build script #16

Closed Dr-Emann closed 7 years ago

Dr-Emann commented 7 years ago

First implementation of building lang.rs with a build.rs script.

Could use something like handlebars as a template, closer to how the ruby works currently.

Closes #15

greyblake commented 7 years ago

@Dr-Emann Thanks!

greyblake commented 7 years ago

@Dr-Emann I'll review in a while when I'll have free couple hours. At this moment I have mixed feelings: on the one hand it's a cleanup, on the other hand I'd like to keep the generated lang.rs code in the repo if it's possible. Just because it's easier to understand what's going on. I am not sure, how idiomatic it is, but would it make sense to run this file generation with Makefile? Just manually, whenever data files are changed?

greyblake commented 7 years ago

@Dr-Emann Sorry, I've noticed, that lang.rs is still here, but not it's much tidier. This looks just amazing! Thank you for such high-quality pull request!