⌘T | go to file |
⌘⌃P | go to project |
⌘R | go to methods |
⌃G | go to line |
⌘KB | toggle side bar |
⌘⇧P | command prompt |
Recent releases have been pre-built using cross-compilers and this script and are downloadable below.
If you have found these packages useful, give me a shout out on twitter: @adammw
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
This is a small demo of how to create a library in Rust and call it from Python (both CPython and PyPy) using the CFFI instead of ctypes
.
Based on http://harkablog.com/calling-rust-from-c-and-python.html (dead) which used ctypes
CFFI is nice because:
- Reads C declarations (parses headers)
- Works in both CPython and PyPy (included with PyPy)
- Lower call overhead than
ctypes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pub fn enumerate_windows<F>(mut callback: F) | |
where F: FnMut(HWND) -> bool | |
{ | |
let mut trait_obj: &mut FnMut(HWND) -> bool = &mut callback; | |
let closure_pointer_pointer: *mut c_void = unsafe { mem::transmute(&mut trait_obj) }; | |
let lparam = closure_pointer_pointer as LPARAM; | |
unsafe { EnumWindows(Some(enumerate_callback), lparam) }; | |
} |