crystalruby 0.1.4 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 26b2e0d15fd3b320f700a1f0571b8bb5d8991a4ed1c60cfcd9f003b48bb9f891
4
- data.tar.gz: 27243d104172eef50adfc46524a0b9052410636dc0b39e142fc3e53c04ded1f0
3
+ metadata.gz: e8dc48667be65ee6e6d36ba7efcfc87dfefb133a06cb375a22297db9643221e3
4
+ data.tar.gz: 40753b3741ae9fb5dec86019d35968027517280a08ae6bffbcf8f2e207fe96b3
5
5
  SHA512:
6
- metadata.gz: a54c1cf883a7dea97d66e9c18903139713aaec0b965026a21fc2e14ced85c13fc676f7d8e76ecc9a2e6ca2fc69034185a9fa4eb6fc66a6986cc9bb2d037738fb
7
- data.tar.gz: 0f29fe7bad266af6593d0e4533af27a9be925372befe40ed0e4ee5ea8c9293c7ea62aab4b1664eaf3d2202eb3000b3dda1dfbdc44ae9e924e2de017f5516a6bc
6
+ metadata.gz: 1682a4405fd2baf66a93fc913af2146fa11e9806b90c8d6ac6d0eebc496b30415204474bd841377e3ea409401608f2907f58d7b717b21520cd4b1fe04d825d86
7
+ data.tar.gz: 8682ebdcdd83bda6ab29261cdfc627afe1bd211343bc4caa95c9f08cbb30fba663f1aebcf4df1535e27d7a84377449d5028afcce145cc0a91c153721e2d261f1
data/README.md CHANGED
@@ -1,4 +1,19 @@
1
- # crystalruby
1
+ <table>
2
+ <tr>
3
+ <td><img src="logo.png" alt="logo" width="150"></td>
4
+ <td>
5
+ <h1 align="center">crystalruby</h1>
6
+ <p align="center">
7
+ <a href="https://rubygems.org/gems/crystalruby">
8
+ <img alt="GEM Version" src="https://img.shields.io/gem/v/crystalruby?color=168AFE&include_prereleases&logo=ruby&logoColor=FE1616">
9
+ </a><br>
10
+ <a href="https://rubygems.org/gems/crystalruby">
11
+ <img alt="GEM Downloads" src="https://img.shields.io/gem/dt/crystalruby?color=168AFE&logo=ruby&logoColor=FE1616">
12
+ </a>
13
+ </p>
14
+ </td>
15
+ </tr>
16
+ </table>
2
17
 
3
18
  `crystalruby` is a gem that allows you to write Crystal code, inlined in Ruby. All you need is a modern crystal compiler installed on your system.
4
19
 
@@ -310,7 +325,6 @@ It should support escape hatches to allow it to coexist with code that performs
310
325
  The library is currently in its infancy. Planned additions are:
311
326
 
312
327
  - Replace existing checksum process, with one that combines results of inline and external crystal to more accurately detect when recompilation is necessary.
313
- - Support for automatic serialization of nested data structures (holding _ONLY_ primitives), using JSON as our serialization protocol (prioritizing portability over raw serialization performance. JSON generation and parsing is bundled into the stdlib in both languages).
314
328
  - Simple mixin/concern that utilises `FFI::Struct` for bi-directional passing of Ruby objects and Crystal objects (by value).
315
329
  - Install command to generate a sample build script, and supports build command (which simply verifies then invokes this script)
316
330
  - Call Ruby from Crystal using FFI callbacks (implement `.expose_to_crystal`)
@@ -1,4 +1,3 @@
1
- require 'pry-byebug'
2
1
  module CrystalRuby
3
2
  module Template
4
3
  Dir[File.join(File.dirname(__FILE__), "templates", "*.cr")].each do |file|
@@ -65,115 +65,3 @@ module CrystalRuby
65
65
  end
66
66
  end
67
67
  end
68
-
69
- # class UnionType
70
- # attr_reader :inner
71
-
72
- # def initialize(*inner)
73
- # @inner = inner
74
- # end
75
-
76
- # def |(other)
77
- # UnionType.new(*inner, *other.inner)
78
- # end
79
-
80
- # def inspect
81
- # elements = inner.map(&:inspect).join(" | ")
82
- # end
83
- # end
84
-
85
- # class Type
86
- # attr_reader :inner, :contains
87
-
88
- # def initialize(name)
89
- # @name = name
90
- # @contains = contains
91
- # @inner = [self]
92
- # end
93
-
94
- # def |(other)
95
- # UnionType.new(*inner, *other.inner)
96
- # end
97
-
98
- # def inspect
99
- # if @contains
100
- # "#{@name}(#{@contains.inspect})"
101
- # else
102
- # @name
103
- # end
104
- # end
105
- # end
106
-
107
- # module_function
108
-
109
- # %w[
110
- # Bool Uint8 Uint16 Uint32 Uint64 Int8 Int16 Int32 Int64 Float32 Float64 String Time Symbol
111
- # Null
112
- # ].map do |t|
113
- # cls = Class.new(Type)
114
- # const_set(t, cls)
115
- # define_method(t.downcase) do
116
- # cls.new(t)
117
- # end
118
- # end
119
-
120
- # def build(&blk)
121
- # instance_exec(&blk)
122
- # end
123
-
124
- # def hash(key_type, value_type)
125
- # Hash.new(key_type, value_type)
126
- # end
127
-
128
- # def array(type)
129
- # Array.new(type)
130
- # end
131
-
132
- # def tuple(*types)
133
- # Tuple.new(*types)
134
- # end
135
-
136
- # def named_tuple(type_hash)
137
- # NamedTuple.new(type_hash)
138
- # end
139
-
140
- # def NamedTuple(type_hash)
141
- # NamedTuple.new(type_hash)
142
- # end
143
-
144
- # class Hash < Type
145
- # HASH_KEY_TYPES = %w[String Symbol].freeze
146
- # def initialize(key_type, value_type)
147
- # super("Hash")
148
- # @key_type = key_type
149
- # @value_type = value_type
150
- # raise "Invalid key type" unless [Uint8, Uint16, Uint32, Uint64, Int8, Int16, Int32, Int64,
151
- # String].include?(key_type)
152
- # raise "Invalid value type" unless value_type.is_a?(Type)
153
- # end
154
- # end
155
-
156
- # class Array < Type
157
- # def initialize(value_type)
158
- # super("Array")
159
- # @value_type = value_type
160
- # raise "Invalid value type" unless value_type.is_a?(Type)
161
- # end
162
- # end
163
-
164
- # class NamedTuple < Type
165
- # def initialize(types_hash)
166
- # raise "keys must be symbols" unless types_hash.keys.all? { |k| k.is_a?(Symbol) }
167
- # raise "Invalid value type" unless types_hash.values.all? { |v| v.is_a?(Type) }
168
-
169
- # super("NamedTuple")
170
- # @types_hash = types_hash
171
- # end
172
- # end
173
-
174
- # class Tuple < Type
175
- # def initialize(*value_types)
176
- # super("Tuple")
177
- # raise "Invalid value type" unless value_types.all? { |v| v.is_a?(Type) }
178
- # end
179
- # end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Crystalruby
4
- VERSION = "0.1.4"
4
+ VERSION = "0.1.5"
5
5
  end
data/logo.png ADDED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: crystalruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Wouter Coppieters
@@ -107,6 +107,7 @@ files:
107
107
  - lib/crystalruby/types/union_type.rb
108
108
  - lib/crystalruby/version.rb
109
109
  - lib/module.rb
110
+ - logo.png
110
111
  - sig/crystalruby.rbs
111
112
  homepage: https://github.com/wouterken/crystalruby
112
113
  licenses: