{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang-nursery/rust-bindgen/issues/1392","repository_url":"https://api.github.com/repos/rust-lang-nursery/rust-bindgen","labels_url":"https://api.github.com/repos/rust-lang-nursery/rust-bindgen/issues/1392/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang-nursery/rust-bindgen/issues/1392/comments","events_url":"https://api.github.com/repos/rust-lang-nursery/rust-bindgen/issues/1392/events","html_url":"https://github.com/rust-lang-nursery/rust-bindgen/issues/1392","id":361755173,"node_id":"MDU6SXNzdWUzNjE3NTUxNzM=","number":1392,"title":"Problems binding to Resonance Audio - failing cargo layout tests, methods generated as free functions, probable struct return problem","user":{"login":"Neurrone","id":16471962,"node_id":"MDQ6VXNlcjE2NDcxOTYy","avatar_url":"https://avatars3.githubusercontent.com/u/16471962?v=4","gravatar_id":"","url":"https://api.github.com/users/Neurrone","html_url":"https://github.com/Neurrone","followers_url":"https://api.github.com/users/Neurrone/followers","following_url":"https://api.github.com/users/Neurrone/following{/other_user}","gists_url":"https://api.github.com/users/Neurrone/gists{/gist_id}","starred_url":"https://api.github.com/users/Neurrone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Neurrone/subscriptions","organizations_url":"https://api.github.com/users/Neurrone/orgs","repos_url":"https://api.github.com/users/Neurrone/repos","events_url":"https://api.github.com/users/Neurrone/events{/privacy}","received_events_url":"https://api.github.com/users/Neurrone/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":19,"created_at":"2018-09-19T13:41:36Z","updated_at":"2018-09-20T14:37:14Z","closed_at":null,"author_association":"NONE","body":"Hi,\r\n\r\nI'm attempting to create [bindings for Resonance audio](https://github.com/Neurrone/resonance-audio-sys). Here are some things I've noticed, which I'm not sure might be part of the cause:\r\n\r\n1. When running `cargo test`, there are numerous failures, and I noticed the failing test cases are either:\r\n\r\n* instantiations of template functions\r\n* Classes inheriting from parents that in turn, inherit from someone else. The parent class has implementation of some of the grandparent's methods, with some virtual.\r\n\r\n2. Most methods in c++ are generated as free-standing functions that take a this pointer in Rust. For example, \r\n\r\n```\r\nint vraudio::ResonanceAudioApiImpl::CreateStereoSource(size_t num_channels)\r\n```\r\n\r\ncomes out as\r\n\r\n```\r\npub unsafe extern \"C\" fn ResonanceAudioApiImpl_CreateStereoSource(\r\n    this: *mut c_void, \r\n    num_channels: usize\r\n) -> ResonanceAudioApi_SourceId\r\n\r\ntype ResonanceAudioApi_SourceId = c_int;\r\n```\r\n\r\n3. It crashes when after I create a class, I attempt to call a method on it (src/main.rs). As discussed in the previous issue, the most likely cause is https://github.com/rust-lang/rust/issues/38258"},"comment":{"url":"https://api.github.com/repos/rust-lang-nursery/rust-bindgen/issues/comments/423207815","html_url":"https://github.com/rust-lang-nursery/rust-bindgen/issues/1392#issuecomment-423207815","issue_url":"https://api.github.com/repos/rust-lang-nursery/rust-bindgen/issues/1392","id":423207815,"node_id":"MDEyOklzc3VlQ29tbWVudDQyMzIwNzgxNQ==","user":{"login":"Neurrone","id":16471962,"node_id":"MDQ6VXNlcjE2NDcxOTYy","avatar_url":"https://avatars3.githubusercontent.com/u/16471962?v=4","gravatar_id":"","url":"https://api.github.com/users/Neurrone","html_url":"https://github.com/Neurrone","followers_url":"https://api.github.com/users/Neurrone/followers","following_url":"https://api.github.com/users/Neurrone/following{/other_user}","gists_url":"https://api.github.com/users/Neurrone/gists{/gist_id}","starred_url":"https://api.github.com/users/Neurrone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Neurrone/subscriptions","organizations_url":"https://api.github.com/users/Neurrone/orgs","repos_url":"https://api.github.com/users/Neurrone/repos","events_url":"https://api.github.com/users/Neurrone/events{/privacy}","received_events_url":"https://api.github.com/users/Neurrone/received_events","type":"User","site_admin":false},"created_at":"2018-09-20T14:37:14Z","updated_at":"2018-09-20T14:37:14Z","author_association":"NONE","body":"Nope, unless rust-bindgen itself is configured to. I have only the x86-64 (64-bit) toolchain installed."}}
{"actor":{"display_login":"Neurrone"}}