Add support for 128-bit integers
Only compile in this support if rustc is new enough, otherwise continue
to omit the bindings for older-than-1.26 rustc
Closes #143
diff --git a/build.rs b/build.rs
index 30b5f05..3379da3 100644
--- a/build.rs
+++ b/build.rs
@@ -7,16 +7,20 @@
let target = env::var("TARGET").unwrap();
- if !enable_use_proc_macro(&target) {
- return;
- }
- println!("cargo:rustc-cfg=use_proc_macro");
-
let minor = match rustc_minor_version() {
Some(n) => n,
None => return,
};
+ if minor >= 26 {
+ println!("cargo:rustc-cfg=u128");
+ }
+
+ if !enable_use_proc_macro(&target) {
+ return;
+ }
+ println!("cargo:rustc-cfg=use_proc_macro");
+
// Rust 1.29 stabilized the necessary APIs in the `proc_macro` crate
if minor >= 29 || cfg!(feature = "nightly") {
println!("cargo:rustc-cfg=wrap_proc_macro");