esruby 0.0.8 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +6 -5
  3. data/lib/esruby/build.rb +1 -0
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c9f97ad43c8652ddb099701a6a3281fc56f35e26
4
- data.tar.gz: 115fac3faed60bc8f939dc6b5ceffbda67e27b7c
3
+ metadata.gz: c4a8a81262ba6285384d5346b58cdc2022ba9624
4
+ data.tar.gz: bfff4025687aeed38eb7048ab2667986903e6f74
5
5
  SHA512:
6
- metadata.gz: 4caa20cb2a49da0317f50544b0f73f0d414368c4fa032d88cfacf01b4e328f3907ae27a06d70984755d0aa5495542f2d6d0de95af51d3e039bc53d78df5e6e07
7
- data.tar.gz: 65ade892ebbf6c39ea66960ab6366a980aae6ab61aaddae25f72f55f1c00a910cb4c7b56777d532b79a0fb04a4379901c616f11d362576079368a03330d4fb28
6
+ metadata.gz: 1b4eccc319bbc4c23958d287920e51a37c35b4b2101e1b6748d63cf2d34717fe88ad7c3a48179fec8ae906e0ab08a4ef2fef4ee756a994ee1da2ffc728178233
7
+ data.tar.gz: 8c42461e416dbd33d53ab2fe903e96a5782b9ec87cacdfc2029991406adaeb7054e16e6a6e70afbd07966e99e7b0770b10292f91832eb38193e3a24a5244c00c
data/README.md CHANGED
@@ -1,12 +1,13 @@
1
1
  # ESRuby
2
- This project brings *mruby* to the browser. It uses *emscripten*
3
- (https://github.com/kripken/emscripten) to compile the mruby source code into
4
- JavaScript (ECMAScript) and runs in the browser. It is heavily based off *webruby* (https://github.com/xxuejie/webruby) but has been adjusted to work with the updates to *emscripten* and *mruby*.
2
+ This project brings *mruby* to the browser. It uses [*emscripten*](https://github.com/kripken/emscripten) to compile the mruby source code into
3
+ JavaScript (ECMAScript) and runs in the browser. It is heavily based off [*webruby*](https://github.com/xxuejie/webruby) but has been adjusted to work with the updates to *emscripten* and *mruby*.
5
4
 
6
5
  # Install
7
6
  *ESRuby* depends on [emsdk](http://kripken.github.io/emscripten-site/index.html) to provide a tool chain consisting of *emscripten* and *LLVM*. Although the tool chain is available from `apt-get` we will need to build emscripten from source using my branch as I have introduced some new features that have not made it into the release yet.
8
7
 
9
8
  * we will start with a clean instance of Ubuntu 16.04 with ruby MRI installed
9
+ * `sudo apt-get install build-essential cmake`
10
+ * `sudo apt-get install default-jre-headless` # you will need a recent version of java if you want to run [*Closure Compiler*](https://github.com/google/closure-compiler) when compiling any apps with optimization enabled
10
11
  * `cd` to a directory where you want *emsdk* downloaded
11
12
  * `git clone https://github.com/juj/emsdk.git`
12
13
  * `cd emsdk`
@@ -23,7 +24,7 @@ JavaScript (ECMAScript) and runs in the browser. It is heavily based off *webrub
23
24
  * optional: make the last command persistent by adding\
24
25
  `[ -f /path_to_emsdk/emsdk_env.sh ] && source /path_to_emsdk/emsdk_env.sh > /dev/null 2>&1`\
25
26
  to your `.bashrc` and `.profile`
26
- * verify emsdk is working with `emcc -v`
27
+ * verify the *emsdk* environment has been successfully setup with `emcc -v`, errors in red are normal
27
28
  * install this gem with `gem install esruby`
28
29
 
29
30
  # Try
@@ -35,7 +36,7 @@ to your `.bashrc` and `.profile`
35
36
  * the app with be available at http://localhost:4444
36
37
 
37
38
  # Binding with JS
38
- Explore my [esruby-bind](https://github.com/robfors/esruby-bind) gem that binds the Ruby and JS object space together.
39
+ Explore my [esruby-bind](https://github.com/robfors/esruby-bind) gem that binds the Ruby and JS environments together.
39
40
 
40
41
  # License
41
42
 
data/lib/esruby/build.rb CHANGED
@@ -113,6 +113,7 @@ module ESRuby
113
113
  def build_app
114
114
  mrbc = "#{mruby_directory}/bin/mrbc"
115
115
  js_arguments = prepended_js_sources.map { |path| "--pre-js #{path}" }.join(" ")
116
+ js_arguments += " "
116
117
  js_arguments += appended_js_sources.map { |path| "--post-js #{path}" }.join(" ")
117
118
  RakeFileUtils.sh "#{mrbc} -B app -o #{build_directory}/app.c #{ruby_sources.join(" ")}"
118
119
  RakeFileUtils.sh "emcc --bind -I #{mruby_directory}/include #{build_directory}/app.c -o #{build_directory}/app.o #{build_directory}/emscripten/lib/libmruby.a -lm #{js_arguments} #{optimization_argument} #{closure_argument} #{debug_argument}"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: esruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rob Fors