mini_racer 0.1.0 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 365bb5119d8c0f9fef1a0014571bb0e2a1cde1cc
4
- data.tar.gz: 9ba16c2f09d9fe6866f241e48799e4dbb98f7595
2
+ SHA256:
3
+ metadata.gz: 179c0a63082cf1ec6bc7f8ead94fbcba3c41255ee91b1639482570d1ec3f7646
4
+ data.tar.gz: cdef6f06a6ab72060aa43b21518c6f0103bf80c034bee09b7cf1d6f215620c31
5
5
  SHA512:
6
- metadata.gz: af0228ed94c7145c9847c5106b1c8a5d6b71e419e42d778f1945a8bd94d18763c19da2975a6e68300b02ed6ea9ab52193a62304b8517a48a379938375a440325
7
- data.tar.gz: 63f0160dec7e7e5583486be942d1cee07ebb3af30f4ae9ed88db231986918332bf8b343335376a69a30c890bb2c014954d9b84f60818d354fad2bb5596f7ac58
6
+ metadata.gz: 0efd1873f139141ac489ed24ebcad3e289092ea67ea7823d0b94fe07a3acfcd602ed64c287b39b556d370db5c17b094d38a9c5ff06f31f546dddda7694d01c81
7
+ data.tar.gz: 1ccc24b53320211be2b3cd887ac1193ee0654e0b54c0d2b3da636a382ce00c95d4af3ba5acd23a931436d08e0707dc0b4d348b6bbd0863cb56df9fb2fbd2678e
data/.dockerignore ADDED
@@ -0,0 +1,12 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
10
+ lib/mini_racer_extension.so
11
+ lib/mini_racer_loader.so
12
+ *.bundle
@@ -0,0 +1,78 @@
1
+ name: Test
2
+ on:
3
+ - push
4
+
5
+ jobs:
6
+ test-darwin:
7
+ strategy:
8
+ fail-fast: false
9
+ matrix:
10
+ os:
11
+ - '10.15'
12
+ - '11.0'
13
+ platform:
14
+ - x86_64
15
+ # arm64
16
+ name: Test (darwin)
17
+ runs-on: macos-${{ matrix.os }}
18
+ steps:
19
+ - name: Checkout
20
+ uses: actions/checkout@v2
21
+ - name: Bundle
22
+ run: bundle install
23
+ - name: Compile
24
+ run: bundle exec rake compile
25
+ - name: Test
26
+ run: bundle exec rake test
27
+ test-linux:
28
+ strategy:
29
+ fail-fast: false
30
+ matrix:
31
+ ruby:
32
+ - '2.6'
33
+ - '2.7'
34
+ - '3.0'
35
+ platform:
36
+ - amd64
37
+ - arm64
38
+ # arm
39
+ # ppc64le
40
+ # s390x
41
+ libc:
42
+ - gnu
43
+ - musl
44
+ name: Test (linux)
45
+ runs-on: ubuntu-20.04
46
+ steps:
47
+ - name: Enable ${{ matrix.platform }} platform
48
+ id: qemu
49
+ if: ${{ matrix.platform != 'amd64' }}
50
+ run: |
51
+ docker run --privileged --rm tonistiigi/binfmt:latest --install ${{ matrix.platform }} | tee platforms.json
52
+ echo "::set-output name=platforms::$(cat platforms.json)"
53
+ - name: Start container
54
+ id: container
55
+ run: |
56
+ case ${{ matrix.libc }} in
57
+ gnu)
58
+ echo 'ruby:${{ matrix.ruby }}'
59
+ ;;
60
+ musl)
61
+ echo 'ruby:${{ matrix.ruby }}-alpine'
62
+ ;;
63
+ esac > container_image
64
+ echo "::set-output name=image::$(cat container_image)"
65
+ docker run --rm -d -v "${PWD}":"${PWD}" -w "${PWD}" --platform linux/${{ matrix.platform }} $(cat container_image) /bin/sleep 64d | tee container_id
66
+ docker exec -w "${PWD}" $(cat container_id) uname -a
67
+ echo "::set-output name=id::$(cat container_id)"
68
+ - name: Install Alpine system dependencies
69
+ if: ${{ matrix.libc == 'musl' }}
70
+ run: docker exec -w "${PWD}" ${{ steps.container.outputs.id }} apk add --no-cache build-base linux-headers bash python2 python3 git curl tar clang binutils-gold
71
+ - name: Checkout
72
+ uses: actions/checkout@v2
73
+ - name: Bundle
74
+ run: docker exec -w "${PWD}" ${{ steps.container.outputs.id }} bundle install
75
+ - name: Compile
76
+ run: docker exec -w "${PWD}" ${{ steps.container.outputs.id }} bundle exec rake compile
77
+ - name: Test
78
+ run: docker exec -w "${PWD}" ${{ steps.container.outputs.id }} bundle exec rake test
data/.gitignore CHANGED
@@ -8,4 +8,6 @@ Gemfile.lock
8
8
  /spec/reports/
9
9
  /tmp/
10
10
  lib/mini_racer_extension.so
11
+ lib/mini_racer_loader.so
11
12
  *.bundle
13
+ .vscode/
data/.travis.yml CHANGED
@@ -1,16 +1,23 @@
1
1
  language: ruby
2
+ os: linux
2
3
  rvm:
3
- - 2.0
4
- - 2.1
5
- - 2.2
6
- - 2.3.1
7
- matrix:
4
+ - 2.6
5
+ - 2.7
6
+ - 3.0
7
+ - ruby-head
8
+ arch:
9
+ - amd64
10
+ - arm64
11
+ jobs:
8
12
  include:
9
- - rvm: 2.2
13
+ - rvm: 2.6
10
14
  os: osx
11
- osx_image: xcode7.3
12
- dist: trusty
13
- sudo: true
14
- before_install:
15
- - gem install bundler -v 1.12.0
15
+ osx_image: xcode11.3
16
+ - rvm: 2.6
17
+ os: osx
18
+ osx_image: xcode12.2
19
+ - rvm: 2.7
20
+ os: osx
21
+ osx_image: xcode12.2
22
+ dist: xenial
16
23
  cache: bundler
data/CHANGELOG CHANGED
@@ -1,11 +1,255 @@
1
+ - 31-12-2021
2
+
3
+ - 0.6.0
4
+
5
+ - Ruby 3.1 support
6
+ - Fixes memory leak in heap snapshotting
7
+ - Improved compilation ergonomics in clang
8
+ - Migrated internal storage in c extension to TypedData
9
+
10
+ - 11-04-2021
11
+
12
+ - 0.5.0
13
+ - Fixes issues on aarch (Apple M1)
14
+ - Update to use libv8-node 16.x (#210) [Loic Nageleisen]
15
+ - FEATURE: Configurable max marshal stack depth (#202) [seanmakesgames]
16
+ - FEATURE: Configurable max marshal stack depth (#202) [seanmakesgames]
17
+ - Ruby 2.3 and 2.4 are EOL, we no longer support them
18
+
19
+ - 0.4.0
20
+
21
+ - FEATURE: upgrade to libv8 node 15.14.0 (v8 8.6.395.17)
22
+ - Promote 0.4.0.beta1 to release, using libv8-node release path
23
+
24
+ - 08-04-2021
25
+
26
+ - 0.4.0.beta1
27
+
28
+ - FIX: on downgrade mkmf was picking the wrong version of libv8, this fix will correct future issues
29
+ - FEATURE: upgraded libv8 to use node libv8 build which supports M1 and various ARM builds v8 moved to (8.6.395.17)
30
+
31
+ - 23-07-2020
32
+
33
+ - 0.3.1
34
+
35
+ - FIX: specify that libv8 must be larger than 8.4.255 but smaller than 8.5, this avoids issues going forward
36
+
37
+ - 22-07-2020
38
+
39
+ - 0.3.0
40
+
41
+ - FEATURE: upgraded to libv8 version 8.4.255.0
42
+
43
+ - 29-06-2020
44
+
45
+ - 0.2.15
46
+
47
+ - FEATURE: basic wasm support via pump_message_loop
48
+
49
+ - 15-05-2020
50
+
51
+ - 0.2.14
52
+
53
+ - FIX: ensure_gc_after_idle should take in milliseconds like the rest of the APIs not seconds
54
+ - FEATURE: strict params on MiniRacer::Context.new
55
+
56
+ - 15-05-2020
57
+
58
+ - 0.2.13
59
+
60
+ - FIX: edge case around ensure_gc_after_idle possibly firing when context is not idle
61
+
62
+ - 15-05-2020
63
+
64
+ - 0.2.12
65
+
66
+ - FEATURE: isolate.low_memory_notification which can force a full GC
67
+ - FEATURE: MiniRacer::Context.new(ensure_gc_after_idle: 2) - to force full GC 2 seconds after context is idle, this allows you to conserve memory on isolates
68
+
69
+ - 14-05-2020
70
+
71
+ - 0.2.11
72
+
73
+ - FIX: dumping heap snapshots was not flushing the file leading to corrupt snapshots
74
+ - FIX: a use-after-free shutdown crash
75
+
76
+ - 0.2.10
77
+
78
+ - 22-04-2020
79
+
80
+ - FEATURE: memory softlimit support for nogvl_context_call
81
+
82
+ - 0.2.9
83
+
84
+ - 09-01-2020
85
+
86
+ - FIX: correct segfault when JS returns a Symbol and properly cast to ruby symbol
87
+
88
+ - 0.2.8
89
+
90
+ - 11-11-2019
91
+
92
+ - FIX: ensure thread live cycle is properly accounter for following file descriptor fix
93
+
94
+ - 0.2.7
95
+
96
+ - 11-11-2019
97
+
98
+ - FIX: release the file descriptor for timeout pipe earlier (this avoids holding too many files open in Ruby 2.7)
99
+
100
+ - 14-05-2019
101
+
102
+ - 0.2.6
103
+
104
+ - FEATURE: add support for write_heap_snapshot which helps you analyze memory
105
+
106
+ - 25-04-2019
107
+
108
+ - 0.2.5
109
+
110
+ - FIX: Compatiblity fixes for V8 7 and above @ignisf
111
+ - FIX: Memory leak in gc_callback @messense
112
+ - IMPROVEMENT: Added example of sourcemap support @ianks
113
+ - URGENT: you will need this release for latest version of libv8 to work
114
+
115
+ - 02-11-2018
116
+
117
+ - 0.2.4
118
+
119
+ - FIX: deadlock releasing context when shared isolates are used
120
+ - FEATURE: include js backtrace when snapshots do not compile
121
+
122
+ - 28-09-2018
123
+
124
+ - 0.2.3
125
+
126
+ - Drop all conditional logic from Mini Racer compilation for clang, always
127
+ rely on MacOS being High Sierra or up
128
+
129
+ - 26-09-2018
130
+
131
+ - 0.2.2
132
+
133
+ - WORKAROUND: RUBY_PLATFORM is hardcoded on Ruby compile and can not be
134
+ trusted for feature detection, use a different technique when checking for
135
+ macOS Mojave
136
+
137
+ - 25-09-2018
138
+
139
+ - 0.2.1
140
+
141
+ - FEATURE: Mojave macOS support
142
+
143
+ - 06-07-2018
144
+
145
+ - 0.2.0
146
+ - FEATURE: context#call to allow for cheaper invocation of functions
147
+ - FIX: rare memory leak when terminating a long running attached function
148
+ - FIX: rare segfault when terminating a long running attached function
149
+ - FIX: Reimplement Isolate#idle_notification using idle_notification_deadline, API remains the same @ignisf
150
+ - Account for changes in the upstream V8 API @ignisf
151
+ - Support for libv8 6.7
152
+
153
+ 23-08-2017
154
+
155
+ - 0.1.15
156
+
157
+ - bump dependency of libv8 to 6.3
158
+
159
+ 23-08-2017
160
+
161
+ - 0.1.14
162
+
163
+ - libv8 erronuously bumped to beta, reverted change
164
+
165
+ 23-08-2017
166
+
167
+ - 0.1.13
168
+
169
+ - Fix: amend array buffer allocator to use v8 6.0 compatible allocator @ignisf
170
+
171
+ 18-07-2017
172
+
173
+ - 0.1.12
174
+
175
+ - Feature: upgrade libv8 to 5.9
176
+ - Fix: warning when runnin with ruby warnings enabled (missed @disposed initialize)
177
+
178
+ 18-07-2017
179
+
180
+ - 0.1.11
181
+
182
+ - Feature: upgrade libv8 to 5.7
183
+
184
+ 13-07-2017
185
+
186
+ - 0.1.10
187
+
188
+ - Fix leak: memory leak when disposing a context (20 bytes per context)
189
+ - Feature: added #heap_stats so you can get visibility from context to actual memory usage of isolate
190
+ - Feature: added #dispose so you reclaim all v8 memory right away as opposed to waiting for GC
191
+ - Feature: you can now specify filename in an eval eg: eval('a = 1', filename: 'my_awesome.js')
192
+
193
+ 09-03-2017
194
+
195
+ - 0.1.9
196
+
197
+ - Perf: speed up ruby/node boundary performance when moving large objects
198
+
199
+ 06-02-2017
200
+
201
+ - 0.1.8
202
+
203
+ - Fix: Include math.h to fix use of undeclared identifier floor with rbx. See #51
204
+
205
+ 02-11-2016
206
+
207
+ - 0.1.7
208
+
209
+ - Fix: if for some reason an isolate was forked don't free it and raise a warning instead to avoid hanging process
210
+
211
+ 25-10-2016
212
+
213
+ - 0.1.6
214
+
215
+ - Fix: timeout behavior was incorrect, in some cases stop could be called on already stopped contexts
216
+
217
+ 10-10-2016
218
+
219
+ - 0.1.5
220
+
221
+ - Support for snapshots, shared isolates, runtime flags thanks to @wk8
222
+ - Fix timeout behavior when it occurs in an attached Ruby method
223
+
224
+ 19-05-2016
225
+
226
+ - 0.1.4
227
+
228
+ - Set upper bound for libv8 inclusion @ignisf
229
+ - Support conversion of Date, Time and DateTime from Ruby to JS @seanmakesgames
230
+ - Support conversion of large numbers back from Ruby to JS @seanmakesgames
231
+
232
+ - 0.1.3
233
+
234
+ - Support more conversions from Ruby back to JS (Hash, Symbol, Array)
235
+ - Support attaching nested objects
236
+
237
+
238
+ 17-05-2016
239
+
240
+ - 0.1.2
241
+
242
+ - Gemspec specifies minimal version of Ruby (2.0)
243
+ - Implement #load on Context to load files
244
+
1
245
  17-05-2016
2
246
 
3
- - 0.0.1
247
+ - 0.1.1
4
248
 
5
249
  - Added unblock function so SIGINT does not lead to a crash
6
250
 
7
251
  14-05-2016
8
252
 
9
- - 0.0.1.beta.1
253
+ - 0.1.1.beta.1
10
254
 
11
255
  - First release
data/Dockerfile ADDED
@@ -0,0 +1,21 @@
1
+ ARG RUBY_VERSION=2.7
2
+ FROM ruby:${RUBY_VERSION}
3
+
4
+ RUN test ! -f /etc/alpine-release || apk add --no-cache build-base git
5
+
6
+ # without this `COPY .git`, we get the following error:
7
+ # fatal: not a git repository (or any of the parent directories): .git
8
+ # but with it we need the full gem just to compile the extension because
9
+ # of gemspec's `git --ls-files`
10
+ # COPY .git /code/.git
11
+ COPY Gemfile mini_racer.gemspec /code/
12
+ COPY lib/mini_racer/version.rb /code/lib/mini_racer/version.rb
13
+ WORKDIR /code
14
+ RUN bundle install
15
+
16
+ COPY Rakefile /code/
17
+ COPY ext /code/ext/
18
+ RUN bundle exec rake compile
19
+
20
+ COPY . /code/
21
+ CMD bundle exec irb -rmini_racer
data/LICENSE.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2016 TODO: Write your name
3
+ Copyright (c) 2016-2019, the mini_racer project authors.
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal