Skip to content

Instantly share code, notes, and snippets.

@klutzy
klutzy / gist:7447208
Created November 13, 2013 10:56
rust `make check` on mingw-w64 (32bit)
$ make check
...
failures:
[run-pass] run-pass/extern-pass-TwoU64s-ref.rs
[run-pass] run-pass/extern-pass-TwoU64s.rs
[run-pass] run-pass/extern-return-TwoU64s.rs
[run-pass] run-pass/glob-std.rs
[run-pass] run-pass/linkage-visibility.rs
@klutzy
klutzy / generate.py
Created November 10, 2013 05:32
android-design-ko: mirror -> mirror-converted 변환 스크립트
#-*- encoding: utf8 -*-
import os
import shutil
from lxml import html
def parse(text):
h = html.fromstring(text)
content = h.get_element_by_id('content')
ret = u''
@klutzy
klutzy / gist:7351873
Last active December 27, 2015 15:59
test code for mingw / libuv / _CRT_NON_CONFORMING_SWPRINTFS
// test code for mingw / libuv / _CRT_NON_CONFORMING_SWPRINTFS
// compare result with libuv built with different configurations:
// $ make
// $ make CFLAGS="-D_CRT_NON_CONFORMING_SWPRINTFS"
#include <stdio.h>
#include <io.h>
#include <fcntl.h>
#include "uv.h"
@klutzy
klutzy / main.rs
Last active December 23, 2015 12:19
for extern "C++"
extern mod syntax;
extern mod rustc;
pub use syntax::ast;
pub use rustc::middle::ty;
pub use rustc::middle::ty::t;
fn cpp_arg_mangle(arg: t) -> ~str {
let arg = ty::get(arg);
match arg.sty {
@klutzy
klutzy / build-rust.sh
Last active March 9, 2024 13:38
rust cross-build script: mingw -> mingw-w64
#!/bin/sh
# this assumes you are using mingw-w64 platform.
# if not, add --linker=x86_64-w64-mingw32-g++.exe option
TARGET=x86_64-w64-mingw32
RUST_ROOT=/c/home/stone/rust
# copy mingw runtime dlls to the dir to prevent dll hell.