You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Can't build it using rustc nightly. I've fixed the erros in build.rs, but there are errors in source code as well.
EDIT: I've fixed ffi.rs as well, but couldn't fix lib.rs as it makes use of std::intrinsics::TyDesc, which was removed from Rust as you can see here: rust-lang/rust#23376.
diff --git a/build.rs b/build.rs
index 9deb49d..b8c6358 100644
--- a/build.rs+++ b/build.rs@@ -1,27 +1,25 @@-extern crate "pkg-config" as pkg_config;+#![feature(convert)]-use std::old_io::Command;-use std::os;+extern crate pkg_config;-#[allow(unused_must_use)]-fn main() {- let mut build = os::getcwd().unwrap();- build.push_many(&["ext", "libqmlrswrapper", "build"]);+use std::process::Command;+use std::fs;+use std::env;+use std::path::PathBuf;- /* Ignore error, the return value is not reliable and we'll catch it when chdir'ing anyway. */- std::old_io::fs::mkdir(&build, std::old_io::USER_RWX);+fn main() {+ let wcd = env::current_dir().unwrap();+ let build = PathBuf::from(&wcd.join("ext/libqmlrswrapper/build"));- os::change_dir(&build).ok().expect("Failed to change into build directory");+ let _ = fs::create_dir_all(&build);
...skipping...
println!("cargo:rustc-flags=-L {} -l qmlrswrapper:static -l stdc++", build.display());
pkg_config::find_library("Qt5Core Qt5Gui Qt5Qml Qt5Quick").unwrap();
diff --git a/src/ffi.rs b/src/ffi.rs
index 207d5c2..aaee52d 100644
--- a/src/ffi.rs+++ b/src/ffi.rs@@ -9,7 +9,7 @@ pub enum QVariant {}
pub enum QVariantList {}
#[repr(C)]
-#[derive(Eq, PartialEq, Show, Copy)]+#[derive(Eq, PartialEq, Debug, Copy)]
pub enum QrsVariantType {
Invalid = 0,
Int64,
diff --git a/src/lib.rs b/src/lib.rs
index 7d658ec..664dfe5 100644
--- a/src/lib.rs+++ b/src/lib.rs@@ -5,6 +5,7 @@ extern crate libc;
use libc::{c_char, c_int, c_uint, c_void};
use std::sync::Arc;
+use std::old_path::Path;
use ffi::{QVariant, QrsEngine, QObject};
/* Re-exports */
The text was updated successfully, but these errors were encountered:
paulolieuthier
changed the title
Update qmlrs to the latest Rust
Make it build with latest rustc
Apr 1, 2015
Thanks for your patch! I applied it and fixed the issues in the library proper. I had to remove the code that calls destructors for set properties, so those won't be called for now. That piece of code was horrible and would have to have been replaced anyway. Hopefully I'll get the free time and inspiration to fix this properly some time :p
Can't build it using rustc nightly. I've fixed the erros in
build.rs
, but there are errors in source code as well.EDIT: I've fixed
ffi.rs
as well, but couldn't fixlib.rs
as it makes use ofstd::intrinsics::TyDesc
, which was removed from Rust as you can see here: rust-lang/rust#23376.The text was updated successfully, but these errors were encountered: