crystalruby 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/crystalruby/compilation.rb +1 -1
- data/lib/crystalruby/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b518452083f9b5ab1a808ea2889338537ef03db5f263a19013bddedb87a93e1b
|
4
|
+
data.tar.gz: 4bcc1a632772bdbb31de2769b9bfbf0882d06851a186810be4925cdbf8694d11
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e9d5acc955979e3de37a38b6381114fb0746f32e06333b97988c4417df57070de55d2a2c4a4fe7a65b288197cc61a00579d44c47975089e1c63f4207246b4625
|
7
|
+
data.tar.gz: '08655f7b0c16b214c55554ae1de4c886d0ea8b3ec05e77a8ce0055da0776d1706ee656c1f65c2d3695116f07614e07b3959e736eaad1400d4f331348b29f1f5f'
|
data/README.md
CHANGED
@@ -501,7 +501,7 @@ end
|
|
501
501
|
|
502
502
|
### Reactor performance
|
503
503
|
|
504
|
-
There is a small amount of synchronization overhead to multiplexing calls across a single thread. Ad-hoc testing on a fast machine amounts this to be within the order of 10
|
504
|
+
There is a small amount of synchronization overhead to multiplexing calls across a single thread. Ad-hoc testing on a fast machine amounts this to be within the order of 10 microseconds per call.
|
505
505
|
For most use-cases this overhead is negligible, especially if the bulk of your CPU heavy task occurs exclusively in Crystal code. However, if you are invoking very fast Crystal code from Ruby in a tight loop (e.g. a simple 1 + 2)
|
506
506
|
then the overhead of the reactor can become significant.
|
507
507
|
|
@@ -520,7 +520,7 @@ recompile Crystal code only when it detects changes to the embedded function or
|
|
520
520
|
|
521
521
|
## Multi-library support
|
522
522
|
|
523
|
-
Large Crystal projects are known to have long compile times. To mitigate this, `crystalruby` supports splitting your Crystal code into multiple libraries. This allows you to only recompile any libraries that have changed, rather than all
|
523
|
+
Large Crystal projects are known to have long compile times. To mitigate this, `crystalruby` supports splitting your Crystal code into multiple libraries. This allows you to only recompile any libraries that have changed, rather than all crystal code within the project.
|
524
524
|
To indicate which library a piece of embedded Crystal code belongs to, you can use the `lib` option in the `crystalize` and `crystal` methods.
|
525
525
|
If the `lib` option is not provided, the code will be compiled into the default library (simply named `crystalruby`).
|
526
526
|
|
@@ -19,7 +19,7 @@ module CrystalRuby
|
|
19
19
|
def self.build_compile_command(verbose:, debug:, lib:, src:)
|
20
20
|
verbose_flag = verbose ? "--verbose --progress" : ""
|
21
21
|
debug_flag = debug ? "" : "--release --no-debug"
|
22
|
-
redirect_output = "
|
22
|
+
redirect_output = " > /dev/null " unless verbose
|
23
23
|
lib, src, lib_dir = [lib, src, File.dirname(src)].map(&Shellwords.method(:escape))
|
24
24
|
%(cd #{lib_dir} && crystal build #{verbose_flag} #{debug_flag} --single-module --link-flags "-shared" -o #{lib} #{src}#{redirect_output})
|
25
25
|
end
|
data/lib/crystalruby/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: crystalruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Wouter Coppieters
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-05-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: digest
|
@@ -140,7 +140,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
140
140
|
- !ruby/object:Gem::Version
|
141
141
|
version: '0'
|
142
142
|
requirements: []
|
143
|
-
rubygems_version: 3.
|
143
|
+
rubygems_version: 3.4.19
|
144
144
|
signing_key:
|
145
145
|
specification_version: 4
|
146
146
|
summary: Embed Crystal code directly in Ruby.
|