gem-ext-zig_builder 0.3.0 → 0.4.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
2
  SHA256:
3
- metadata.gz: 352295a2ed859fecfef121e9b8748b10efaa83eb2cc14842307cd43779c21724
4
- data.tar.gz: 6222bdbd160014d6cf7c0e060a49d9ce9da9e8f37b4e774937ea3f7da0b912a9
3
+ metadata.gz: '0259aec55b71cdf4b1c568f08b02e2a81e0ab4716fd094d2335ff595e8772f10'
4
+ data.tar.gz: 1d50520f5be2d2855ee170c697c9f6aa9c0a107e62c4f3223f4290be4192d8bd
5
5
  SHA512:
6
- metadata.gz: f38796b73f8c45131a5b0b6281304f2b8e5b76d2aab3a50bac322843794f24af60adea60c0a4ff295a24d9ebde9d8eba90a1f4966a999c0379abb125164c915d
7
- data.tar.gz: 727f9954335613743bbd4dceaf35e7d359c4fa0bb5759c109323a1f6ad679e11a7d68446c13d5ae3771b2e5fb9fb40278f035163010b10660423883b38af0b80
6
+ metadata.gz: '08f3e45cd701aff3ac296cd92f65adf5950d6848495f1779eeb37ccb5dd6205fc46a0d5f1812198ec0d15a76406852c9607f12f5eecb09fa8c20c0e37ce5990b'
7
+ data.tar.gz: f45f6758bd55d69af54c05475827e145bcc20c38d1ae4b8e6282f1503660ba018541717a962ee869d759c0a6240043d2017b76102022fa97c06b79855c5efbe4
@@ -5,7 +5,7 @@ module Gem
5
5
  class Builder; end
6
6
 
7
7
  class ZigBuilder < Builder
8
- VERSION = '0.3.0'
8
+ VERSION = '0.4.0'
9
9
  end
10
10
  end
11
11
  end
@@ -17,13 +17,24 @@ require 'tmpdir'
17
17
  # const target = b.standardTargetOptions(.{});
18
18
  # const lib = b.addSharedLibrary(.{
19
19
  # .name = "zigrb_example",
20
- # .root_source_file = .{ .path = "src/zigrb.zig" },
20
+ # .root_source_file = b.path("src/zigrb.zig"),
21
21
  # .target = target,
22
22
  # .optimize = optimize,
23
23
  # });
24
- # lib.linkSystemLibrary(std.os.getenv("RUBY_PC") orelse "ruby");
24
+ # lib.linkSystemLibrary(std.posix.getenv("RUBY_PC") orelse "ruby");
25
25
  # lib.linkSystemLibrary("c");
26
26
  # b.installArtifact(lib);
27
+ #
28
+ # const unit_tests = b.addTest(.{
29
+ # .root_source_file = b.path("src/zigrb.zig"),
30
+ # .target = target,
31
+ # .optimize = optimize,
32
+ # });
33
+ # unit_tests.linkSystemLibrary(std.posix.getenv("RUBY_PC") orelse "ruby");
34
+ # unit_tests.linkSystemLibrary("c");
35
+ # const run_unit_tests = b.addRunArtifact(unit_tests);
36
+ # const test_step = b.step("test", "Run unit tests");
37
+ # test_step.dependOn(&run_unit_tests.step);
27
38
  # }
28
39
  #
29
40
  # A minimal zigrb.zig example:
@@ -36,7 +47,7 @@ require 'tmpdir'
36
47
  #
37
48
  # An example of defining a ruby class and adding a zig method:
38
49
  #
39
- # var zig_rb_class: ruby.VALUE = ruby.rb_define_class("ZigExample", ruby.rb_cObject);
50
+ # const zig_rb_class: ruby.VALUE = ruby.rb_define_class("ZigExample", ruby.rb_cObject);
40
51
  # _ = ruby.rb_define_method(zig_rb_class, "method_name", rb_example_method, 2);
41
52
  #
42
53
  # An example of a zig ruby method:
@@ -45,17 +56,17 @@ require 'tmpdir'
45
56
  # var ap = @cVaStart();
46
57
  # defer @cVaEnd(&ap);
47
58
  # // first argument is `self` in ruby; discard it
48
- # var self = @cVaArg(&ap, ruby.VALUE); _ = self;
59
+ # const self = @cVaArg(&ap, ruby.VALUE); _ = self;
49
60
  # // additional arguments
50
- # var _ = @cVaArg(&ap, ruby.VALUE);
51
- # var _ = @cVaArg(&ap, ruby.VALUE);
61
+ # const _ = @cVaArg(&ap, ruby.VALUE);
62
+ # const _ = @cVaArg(&ap, ruby.VALUE);
52
63
  # return ruby.QNil
53
64
  # }
54
65
  #
55
66
  # An example of ruby zig type conversions:
56
67
  #
57
- # var m = ruby.NUM2INT(@cVaArg(&ap, ruby.VALUE));
58
- # var n = ruby.NUM2INT(@cVaArg(&ap, ruby.VALUE));
68
+ # const m = ruby.NUM2INT(@cVaArg(&ap, ruby.VALUE));
69
+ # const n = ruby.NUM2INT(@cVaArg(&ap, ruby.VALUE));
59
70
  # return ruby.INT2NUM(f(m, n));
60
71
  #
61
72
  class Gem::Ext::ZigBuilder < Gem::Ext::Builder
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gem-ext-zig_builder
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Frank J. Cameron
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-05-20 00:00:00.000000000 Z
11
+ date: 2024-05-22 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: ''
14
14
  email:
@@ -28,7 +28,7 @@ metadata:
28
28
  source_code_uri: https://gitlab.com/fjc/gem-ext-zig_builder
29
29
  changelog_uri: https://gitlab.com/fjc/gem-ext-zig_builder
30
30
  rubygems_mfa_required: 'true'
31
- post_install_message:
31
+ post_install_message:
32
32
  rdoc_options: []
33
33
  require_paths:
34
34
  - lib
@@ -43,8 +43,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
43
43
  - !ruby/object:Gem::Version
44
44
  version: '0'
45
45
  requirements: []
46
- rubygems_version: 3.2.5
47
- signing_key:
46
+ rubygems_version: 3.3.26
47
+ signing_key:
48
48
  specification_version: 4
49
49
  summary: Gem extension builder for zig
50
50
  test_files: []