Skip to content

Instantly share code, notes, and snippets.

View pepyakin's full-sized avatar

Sergei Shulepov pepyakin

View GitHub Profile
(module
(type $FUNCSIG$vii (func (param i32 i32)))
(type $FUNCSIG$ii (func (param i32) (result i32)))
(type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32)))
(type $FUNCSIG$iii (func (param i32 i32) (result i32)))
(type $FUNCSIG$vi (func (param i32)))
(type $FUNCSIG$jj (func (param i64) (result i64)))
(type $FUNCSIG$v (func))
(import "env" "STACKTOP" (global $STACKTOP$asm2wasm$import i32))
(import "env" "STACK_MAX" (global $STACK_MAX$asm2wasm$import i32))
FROM trzeci/emscripten:sdk-incoming-64bit
ENV RUSTUP_HOME=/usr/local/rustup \
CARGO_HOME=/usr/local/cargo \
PATH=/usr/local/cargo/bin:$PATH
RUN set -eux; \
url="https://static.rust-lang.org/rustup/archive/1.6.0/x86_64-unknown-linux-gnu/rustup-init"; \
wget "$url"; \
chmod +x rustup-init; \
failures:
---- test_header_contents stdout ----
thread 'test_header_contents' panicked at 'assertion failed: `(left == right)`
left: `"/* automatically generated by rust-bindgen */\n\nextern \"C\" {\n pub fn foo(a: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;\n}\n"`,
right: `"/* automatically generated by rust-bindgen */\n\nextern \"C\" {\n #[link_name = \"\\u{1}_foo\"]\n pub fn foo(a: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;\n}\n"`', tests/tests.rs:319:4
stack backtrace:
0: 0x10948f213 - std::sys::imp::backtrace::tracing::imp::unwind_backtrace::h5d6b821bcccc8af3
1: 0x10949321a - std::panicking::default_hook::{{closure}}::haca53f8b96e15b81
failures:
---- test_header_contents stdout ----
thread 'test_header_contents' panicked at 'assertion failed: `(left == right)`
left: `"/* automatically generated by rust-bindgen */\n\nextern \"C\" {\n pub fn foo(a: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;\n}\n"`,
right: `"/* automatically generated by rust-bindgen */\n\nextern \"C\" {\n #[link_name = \"\\u{1}_foo\"]\n pub fn foo(a: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;\n}\n"`', tests/tests.rs:319:4
stack backtrace:
0: 0x10948f213 - std::sys::imp::backtrace::tracing::imp::unwind_backtrace::h5d6b821bcccc8af3
1: 0x10949321a - std::panicking::default_hook::{{closure}}::haca53f8b96e15b81
# To build:
# docker build -t rust-bindgen-test .
#
# To run:
# docker run -v "$PWD":/build -w /build -it --rm rust-bindgen-test
#
# On macOS prefer to run with caffeinate.
FROM rust:1.20
@pepyakin
pepyakin / test.log
Created October 9, 2017 17:55
Test failures on current master
Finished dev [unoptimized + debuginfo] target(s) in 0.0 secs
Running target/debug/deps/bindgen-0e79f9c99fbeae2f
running 17 tests
test codegen::struct_layout::test_align_to ... ok
test codegen::struct_layout::test_bytes_from_bits_pow2 ... ok
test features::test::str_to_target ... ok
test ir::comment::test::picks_up_single_and_multi_line_doc_comments ... ok
test ir::layout::test_layout_for_size ... ok
test ir::comment::test::processes_single_lines_correctly ... ok
@pepyakin
pepyakin / clang-version.txt
Created September 22, 2017 19:08
Failed rust-bindgen tests
Apple LLVM version 8.1.0 (clang-802.0.42)
Target: x86_64-apple-darwin16.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
@pepyakin
pepyakin / playground.rs
Created September 14, 2017 12:22 — forked from anonymous/playground.rs
Rust code shared from the playground
#![feature(core_intrinsics)]
use std::os::raw::c_char;
use std::ffi::{CStr, CString};
use std::ptr;
trait ToCStr<T> {
fn borrow_ptr(self) -> (T, *const c_char);
}
@pepyakin
pepyakin / Dockerfile
Last active September 14, 2017 19:03
Dockerfile for building and checking binaryen. Can be useful on macOS. See https://github.com/WebAssembly/binaryen/pull/1184#issuecomment-329430966
FROM ubuntu:trusty
RUN \
apt-get update && \
apt-get install -y build-essential cmake python curl
# Add source for nodejs,
# see https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions
RUN curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
RUN apt-get install nodejs
@pepyakin
pepyakin / main.rs
Created August 2, 2016 22:03
rustfmt-1116
use foo;