Skip to content
View Rakefile
require 'webruby'
# This file sets up the build environment for a webruby project.
Webruby::App.setup do |conf|
# Entrypoint file name
conf.entrypoint = 'app/app.rb'
# By default, the build output directory is "build/"
conf.build_dir = 'build'
View build.log
(in /Users/rafael/develop/opensource/mruby)
mkdir -p /Users/rafael/develop/opensource/mruby/bin
"gcc" -g -std=gnu99 -O3 -Wall -Werror-implicit-function-declaration -Wdeclaration-after-statement -DMRB_DEBUG -I"/Users/rafael/develop/opensource/mruby/include" -MMD -o "/Users/rafael/develop/opensource/mruby/build/host/src/array.o" -c "/Users/rafael/develop/opensource/mruby/src/array.c"
"gcc" -g -std=gnu99 -O3 -Wall -Werror-implicit-function-declaration -Wdeclaration-after-statement -DMRB_DEBUG -I"/Users/rafael/develop/opensource/mruby/include" -MMD -o "/Users/rafael/develop/opensource/mruby/build/host/src/backtrace.o" -c "/Users/rafael/develop/opensource/mruby/src/backtrace.c"
"gcc" -g -std=gnu99 -O3 -Wall -Werror-implicit-function-declaration -Wdeclaration-after-statement -DMRB_DEBUG -I"/Users/rafael/develop/opensource/mruby/include" -MMD -o "/Users/rafael/develop/opensource/mruby/build/host/src/class.o" -c "/Users/rafael/develop/opensource/mruby/src/class.c"
"gcc" -g -std=gnu99 -O3 -Wall -Werror-implicit-functi
View .vimrc
set nocompatible
syntax on
filetype plugin indent on
set background=dark
colorscheme solarized
set ffs=mac,unix,dos
set encoding=utf-8

We now have reached a corner regarding the development of webruby.Emscripten is now switching to a LLVM-based backend, which eventually will replace the old JS-based backend. However, a bug in clang prevents us to use the new le32-unknown-nacl triple in LLVM/emscripten, it also prevents us from using the new LLVM-based backend of emscripten.

A fix has been developed for LLVM to solve this problem, but as of today, it's neither in the PNaCl fork of clang, nor emscripten-fastcomp-clang. So this prevents us from switching to the latest version of emscripten.

In a meantime, an attempt to fix this problem at mruby side was also rejected, since this would complicate mruby a lot for a small corner case.

We could maintain

View after_clang_and_pnacl_patch.log
$ EMCC_FAST_COMPILER=1 ~/develop/opensource/webruby/modules/emscripten/emcc vatest.c
Warning: Variable __init_array_start not referenced
Warning: Variable __init_array_end not referenced
Warning: Variable __fini_array_start not referenced
Warning: Variable __fini_array_end not referenced
false && "Unsupported type"
/Users/rafael/develop/opensource/emscripten-fastcomp/lib/Target/JSBackend/JSBackend.cpp : 683
Traceback (most recent call last):
File "/Users/rafael/develop/opensource/webruby/modules/emscripten/", line 1347, in <module>
# Suppose the currenct directory is ~/develop
$ git clone
$ cd hiredis
# Set emscripten compiling target
$ export EMCC_LLVM_TARGET=i386-pc-linux-gnu
# Locale the installation path of webruby, for example, on my mac this is:
# ~/.gem/ruby/2.0.0/gems/webruby-0.2.4/
View gist:6258440
$ git co CABLES-68-dev
$ git fetch
$ git rebase origin/CABLES-68
(fix merging...)
$ git co CABLES-68 && git rebase CABLES-68-dev
$ git push origin CABLES-68
View build.log
$ EMCC_LLVM_TARGET=i386-pc-linux-gnu EMCC_DEBUG=1 /Users/rafael/develop/webruby/modules/emscripten/emcc /Users/rafael/develop/webruby/build/mrbtest.bc -o /Users/rafael/develop/webruby/build/mrbtest.js -s TOTAL_MEMORY=33554432 --js-library /Users/rafael/develop/webruby/build/gem_test_library.js --pre-js /Users/rafael/develop/webruby/build/gem_test_append.js -s EXPORTED_FUNCTIONS="['_mruby_js_argument_type', '_mruby_js_convert_symbol_to_string', '_mruby_js_get_array_handle', '_mruby_js_get_float', '_mruby_js_get_hash_handle', '_mruby_js_get_integer', '_mruby_js_get_object_handle', '_mruby_js_get_proc', '_mruby_js_get_string_len', '_mruby_js_get_string_ptr', '_mruby_js_invoke_alloc_argv', '_mruby_js_invoke_fetch_argp', '_mruby_js_invoke_proc', '_mruby_js_invoke_release_argv', '_mruby_js_name_error', '_mruby_js_set_array_handle', '_mruby_js_set_boolean', '_mruby_js_set_float', '_mruby_js_set_function_handle', '_mruby_js_set_integer', '_mruby_js_set_nil', '_mruby_js_set_object_handle', '_mruby_js_set_string', '_ma
View rubykaigi.scss
* A simple theme for reveal.js presentations, similar
* to the default theme. The accent color is darkblue.
* This theme is Copyright (C) 2012 Owen Versteeg, It is MIT licensed.
* reveal.js is Copyright (C) 2011-2012 Hakim El Hattab,; so is the theme - beige.css - that this is based off of.
// Default mixins and settings -----------------
View clang.out
$ clang vatest.c
$ ./a.out
Type is 0
Value is 5
Type is 1
Value is 12
Type is 2
Value is 19
Type is 3
Value is 26
Something went wrong with that request. Please try again.