tigerbeetle 0.0.37-aarch64-linux
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 +7 -0
- data/CHANGELOG.md +152 -0
- data/LICENSE +201 -0
- data/README.md +130 -0
- data/lib/tb_client/native/aarch64-linux-gnu.2.27/libtb_client.a +0 -0
- data/lib/tb_client/native/aarch64-linux-gnu.2.27/libtb_client.so +0 -0
- data/lib/tb_client/native/aarch64-linux-musl/libtb_client.a +0 -0
- data/lib/tb_client/native/aarch64-linux-musl/libtb_client.so +0 -0
- data/lib/tb_client/shared_lib.rb +66 -0
- data/lib/tb_client.rb +282 -0
- data/lib/tigerbeetle/account.rb +38 -0
- data/lib/tigerbeetle/account_balance.rb +23 -0
- data/lib/tigerbeetle/account_filter.rb +31 -0
- data/lib/tigerbeetle/atomic_counter.rb +14 -0
- data/lib/tigerbeetle/client.rb +214 -0
- data/lib/tigerbeetle/converters/account.rb +63 -0
- data/lib/tigerbeetle/converters/account_balance.rb +31 -0
- data/lib/tigerbeetle/converters/account_filter.rb +32 -0
- data/lib/tigerbeetle/converters/base.rb +35 -0
- data/lib/tigerbeetle/converters/create_accounts_result.rb +21 -0
- data/lib/tigerbeetle/converters/create_transfers_result.rb +21 -0
- data/lib/tigerbeetle/converters/query_filter.rb +33 -0
- data/lib/tigerbeetle/converters/time.rb +23 -0
- data/lib/tigerbeetle/converters/transfer.rb +64 -0
- data/lib/tigerbeetle/converters/uint_128.rb +24 -0
- data/lib/tigerbeetle/converters.rb +12 -0
- data/lib/tigerbeetle/error.rb +4 -0
- data/lib/tigerbeetle/id.rb +30 -0
- data/lib/tigerbeetle/platforms.rb +9 -0
- data/lib/tigerbeetle/query_filter.rb +31 -0
- data/lib/tigerbeetle/request.rb +7 -0
- data/lib/tigerbeetle/transfer.rb +40 -0
- data/lib/tigerbeetle/version.rb +4 -0
- data/lib/tigerbeetle.rb +13 -0
- data/tigerbeetle.gemspec +50 -0
- metadata +133 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
require 'tb_client'
|
|
2
|
+
require 'tigerbeetle/account_filter'
|
|
3
|
+
require 'tigerbeetle/converters/time'
|
|
4
|
+
require 'tigerbeetle/converters/uint_128'
|
|
5
|
+
|
|
6
|
+
module TigerBeetle
|
|
7
|
+
module Converters
|
|
8
|
+
class AccountFilter < Base
|
|
9
|
+
def self.native_type
|
|
10
|
+
TBClient::AccountFilter
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
def from_native(ptr)
|
|
14
|
+
raise 'Unexpected conversion of a native type to AccountFilter'
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def to_native(ptr, value)
|
|
18
|
+
TBClient::AccountFilter.new(ptr).tap do |result|
|
|
19
|
+
Converters::UInt128.to_native(result[:account_id].to_ptr, value.account_id)
|
|
20
|
+
Converters::UInt128.to_native(result[:user_data_128].to_ptr, value.user_data_128)
|
|
21
|
+
result[:user_data_64] = value.user_data_64
|
|
22
|
+
result[:user_data_32] = value.user_data_32
|
|
23
|
+
result[:code] = value.code
|
|
24
|
+
Converters::Time.to_native(ptr + result.offset_of(:timestamp_min), value.timestamp_min || 0)
|
|
25
|
+
Converters::Time.to_native(ptr + result.offset_of(:timestamp_max), value.timestamp_max || 0)
|
|
26
|
+
result[:limit] = value.limit
|
|
27
|
+
result[:flags] = value.flags
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
module TigerBeetle
|
|
2
|
+
module Converters
|
|
3
|
+
class Base
|
|
4
|
+
def self.from_native(ptr)
|
|
5
|
+
self.new.from_native(ptr)
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
def self.to_native(ptr, value)
|
|
9
|
+
self.new.to_native(ptr, value)
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def self.native_type
|
|
13
|
+
raise NotImplementedError, 'Implement in sublcass'
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def from_native(ptr)
|
|
17
|
+
raise NotImplementedError, 'Implement in sublcass'
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def to_native(ptr, value)
|
|
21
|
+
raise NotImplementedError, 'Implement in sublcass'
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
private
|
|
25
|
+
|
|
26
|
+
def validate_uint!(name, bits, value)
|
|
27
|
+
if value > 2**bits - 1
|
|
28
|
+
raise ArgumentError, "#{name} == #{value} is too large to fit in #{bits} bits"
|
|
29
|
+
elsif value < 0
|
|
30
|
+
raise ArgumentError, "#{name} == #{value} cannot be negative"
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
require 'tb_client'
|
|
2
|
+
require 'tigerbeetle/converters/base'
|
|
3
|
+
|
|
4
|
+
module TigerBeetle
|
|
5
|
+
module Converters
|
|
6
|
+
class CreateAccountsResult < Base
|
|
7
|
+
def self.native_type
|
|
8
|
+
TBClient::CreateAccountsResult
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
def from_native(ptr)
|
|
12
|
+
c_value = TBClient::CreateAccountsResult.new(ptr)
|
|
13
|
+
[c_value[:index], c_value[:result]]
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def to_native(ptr, value)
|
|
17
|
+
raise 'Unexpected conversion of CreateAccountsResult to a native type'
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
require 'tb_client'
|
|
2
|
+
require 'tigerbeetle/converters/base'
|
|
3
|
+
|
|
4
|
+
module TigerBeetle
|
|
5
|
+
module Converters
|
|
6
|
+
class CreateTransfersResult < Base
|
|
7
|
+
def self.native_type
|
|
8
|
+
TBClient::CreateTransfersResult
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
def from_native(ptr)
|
|
12
|
+
c_value = TBClient::CreateTransfersResult.new(ptr)
|
|
13
|
+
[c_value[:index], c_value[:result]]
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def to_native(ptr, value)
|
|
17
|
+
raise 'Unexpected conversion of CreateTransfersResult to a native type'
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
require 'tb_client'
|
|
2
|
+
require 'tigerbeetle/query_filter'
|
|
3
|
+
require 'tigerbeetle/converters/base'
|
|
4
|
+
require 'tigerbeetle/converters/time'
|
|
5
|
+
require 'tigerbeetle/converters/uint_128'
|
|
6
|
+
|
|
7
|
+
module TigerBeetle
|
|
8
|
+
module Converters
|
|
9
|
+
class QueryFilter < Base
|
|
10
|
+
def self.native_type
|
|
11
|
+
TBClient::QueryFilter
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
def from_native(ptr)
|
|
15
|
+
raise 'Unexpected conversion of a native type to QueryFilter'
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def to_native(ptr, value)
|
|
19
|
+
TBClient::QueryFilter.new(ptr).tap do |result|
|
|
20
|
+
Converters::UInt128.to_native(result[:user_data_128].to_ptr, value.user_data_128)
|
|
21
|
+
result[:user_data_64] = value.user_data_64
|
|
22
|
+
result[:user_data_32] = value.user_data_32
|
|
23
|
+
result[:code] = value.code
|
|
24
|
+
result[:ledger] = value.ledger
|
|
25
|
+
Converters::Time.to_native(ptr + result.offset_of(:timestamp_min), value.timestamp_min || 0)
|
|
26
|
+
Converters::Time.to_native(ptr + result.offset_of(:timestamp_max), value.timestamp_max || 0)
|
|
27
|
+
result[:limit] = value.limit
|
|
28
|
+
result[:flags] = value.flags
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
require 'ffi'
|
|
2
|
+
require 'tigerbeetle/converters/base'
|
|
3
|
+
|
|
4
|
+
module TigerBeetle
|
|
5
|
+
module Converters
|
|
6
|
+
class Time < Base
|
|
7
|
+
def self.native_type
|
|
8
|
+
FFI::Type::UINT64
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
def from_native(ptr)
|
|
12
|
+
::Time.at(ptr.read(FFI::Type::UINT64) / 1e9)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def to_native(ptr, value)
|
|
16
|
+
int = (value.to_f * 1e9).to_i
|
|
17
|
+
validate_uint!(:timestamp, 64, int)
|
|
18
|
+
|
|
19
|
+
ptr.write(FFI::Type::UINT64, int)
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
require 'tb_client'
|
|
2
|
+
require 'tigerbeetle/transfer'
|
|
3
|
+
require 'tigerbeetle/converters/base'
|
|
4
|
+
require 'tigerbeetle/converters/time'
|
|
5
|
+
require 'tigerbeetle/converters/uint_128'
|
|
6
|
+
|
|
7
|
+
module TigerBeetle
|
|
8
|
+
module Converters
|
|
9
|
+
class Transfer < Base
|
|
10
|
+
def self.native_type
|
|
11
|
+
TBClient::Transfer
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
def from_native(ptr)
|
|
15
|
+
c_value = TBClient::Transfer.new(ptr)
|
|
16
|
+
|
|
17
|
+
TigerBeetle::Transfer.new(
|
|
18
|
+
id: Converters::UInt128.from_native(c_value[:id].to_ptr),
|
|
19
|
+
debit_account_id: Converters::UInt128.from_native(c_value[:debit_account_id].to_ptr),
|
|
20
|
+
credit_account_id: Converters::UInt128.from_native(c_value[:credit_account_id].to_ptr),
|
|
21
|
+
amount: Converters::UInt128.from_native(c_value[:amount].to_ptr),
|
|
22
|
+
pending_id: Converters::UInt128.from_native(c_value[:pending_id].to_ptr),
|
|
23
|
+
user_data_128: Converters::UInt128.from_native(c_value[:user_data_128].to_ptr),
|
|
24
|
+
user_data_64: c_value[:user_data_64],
|
|
25
|
+
user_data_32: c_value[:user_data_32],
|
|
26
|
+
timeout: c_value[:timeout],
|
|
27
|
+
ledger: c_value[:ledger],
|
|
28
|
+
code: c_value[:code],
|
|
29
|
+
flags: c_value[:flags],
|
|
30
|
+
timestamp: Converters::Time.from_native(ptr + c_value.offset_of(:timestamp))
|
|
31
|
+
)
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
def to_native(ptr, value)
|
|
35
|
+
validate_uint!(:id, 128, value.id)
|
|
36
|
+
validate_uint!(:debit_account_id, 128, value.debit_account_id)
|
|
37
|
+
validate_uint!(:credit_account_id, 128, value.credit_account_id)
|
|
38
|
+
validate_uint!(:amount, 128, value.amount)
|
|
39
|
+
validate_uint!(:user_data_128, 128, value.user_data_128)
|
|
40
|
+
validate_uint!(:user_data_64, 64, value.user_data_64)
|
|
41
|
+
validate_uint!(:user_data_32, 32, value.user_data_32)
|
|
42
|
+
validate_uint!(:timeout, 32, value.timeout)
|
|
43
|
+
validate_uint!(:ledger, 32, value.ledger)
|
|
44
|
+
validate_uint!(:code, 16, value.code)
|
|
45
|
+
|
|
46
|
+
TBClient::Transfer.new(ptr).tap do |result|
|
|
47
|
+
Converters::UInt128.to_native(result[:id].to_ptr, value.id)
|
|
48
|
+
Converters::UInt128.to_native(result[:debit_account_id].to_ptr, value.debit_account_id)
|
|
49
|
+
Converters::UInt128.to_native(result[:credit_account_id].to_ptr, value.credit_account_id)
|
|
50
|
+
Converters::UInt128.to_native(result[:amount].to_ptr, value.amount)
|
|
51
|
+
Converters::UInt128.to_native(result[:pending_id].to_ptr, value.pending_id)
|
|
52
|
+
Converters::UInt128.to_native(result[:user_data_128].to_ptr, value.user_data_128)
|
|
53
|
+
result[:user_data_64] = value.user_data_64
|
|
54
|
+
result[:user_data_32] = value.user_data_32
|
|
55
|
+
result[:timeout] = value.timeout
|
|
56
|
+
result[:ledger] = value.ledger
|
|
57
|
+
result[:code] = value.code
|
|
58
|
+
result[:flags] = value.flags
|
|
59
|
+
Converters::Time.to_native(ptr + result.offset_of(:timestamp), value.timestamp || 0)
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
end
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
require 'tb_client'
|
|
2
|
+
require 'tigerbeetle/converters/base'
|
|
3
|
+
|
|
4
|
+
module TigerBeetle
|
|
5
|
+
module Converters
|
|
6
|
+
class UInt128 < Base
|
|
7
|
+
def self.native_type
|
|
8
|
+
TBClient::UInt128
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
def from_native(ptr)
|
|
12
|
+
c_value = TBClient::UInt128.new(ptr)
|
|
13
|
+
c_value[:low] + (c_value[:high] << 64)
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def to_native(ptr, value)
|
|
17
|
+
TBClient::UInt128.new(ptr).tap do |result|
|
|
18
|
+
result[:low] = value % 2**64
|
|
19
|
+
result[:high] = value >> 64
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
require 'tigerbeetle/converters/account'
|
|
2
|
+
require 'tigerbeetle/converters/account_balance'
|
|
3
|
+
require 'tigerbeetle/converters/account_filter'
|
|
4
|
+
require 'tigerbeetle/converters/create_accounts_result'
|
|
5
|
+
require 'tigerbeetle/converters/create_transfers_result'
|
|
6
|
+
require 'tigerbeetle/converters/query_filter'
|
|
7
|
+
require 'tigerbeetle/converters/time'
|
|
8
|
+
require 'tigerbeetle/converters/transfer'
|
|
9
|
+
require 'tigerbeetle/converters/uint_128'
|
|
10
|
+
|
|
11
|
+
module Converters
|
|
12
|
+
end
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
require 'securerandom'
|
|
2
|
+
|
|
3
|
+
module TigerBeetle
|
|
4
|
+
module ID
|
|
5
|
+
@last_time_ms = 0
|
|
6
|
+
|
|
7
|
+
# Generates a Universally Unique and Sortable Identifier as a 128-bit integer. Based on ULIDs
|
|
8
|
+
# Inspired by ext/tb_client/tigerbeetle/src/clients/python/src/tigerbeetle/client.py#id
|
|
9
|
+
def self.generate
|
|
10
|
+
rnd_bytes = SecureRandom.random_bytes(10)
|
|
11
|
+
time_ms = (Time.now.to_f * 1000).to_i
|
|
12
|
+
|
|
13
|
+
# Ensure time_ms monotonically increases
|
|
14
|
+
if time_ms <= @last_time_ms
|
|
15
|
+
time_ms = @last_time_ms
|
|
16
|
+
else
|
|
17
|
+
@last_time_ms = time_ms
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
# Convert time_ms integer to 6 bytes (string) in big-endian
|
|
21
|
+
time_bytes = [time_ms].pack("Q>")[2..7]
|
|
22
|
+
|
|
23
|
+
# Combine time and randomness and convert to two 64-bit integers in big-endian
|
|
24
|
+
integers = (time_bytes + rnd_bytes).unpack("Q>Q>")
|
|
25
|
+
|
|
26
|
+
# Re-combine into a single 128-bit integer in big-endian
|
|
27
|
+
integers[0] << 64 | integers[1]
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
module TigerBeetle
|
|
2
|
+
PLATFORMS = {
|
|
3
|
+
'x86_64-darwin' => ['x86_64-macos'],
|
|
4
|
+
'arm64-darwin' => ['aarch64-macos'],
|
|
5
|
+
'x86_64-linux' => ['x86_64-linux-gnu.2.27', 'x86_64-linux-musl'],
|
|
6
|
+
'aarch64-linux' => ['aarch64-linux-gnu.2.27', 'aarch64-linux-musl'],
|
|
7
|
+
'x64-mingw-ucrt' => ['x86_64-windows'],
|
|
8
|
+
}.freeze
|
|
9
|
+
end
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
module TigerBeetle
|
|
2
|
+
QUERY_FILTER_PARAMS = %i[
|
|
3
|
+
user_data_128 user_data_64 user_data_32 ledger code timestamp_min timestamp_max limit flags
|
|
4
|
+
]
|
|
5
|
+
|
|
6
|
+
QueryFilter = Struct.new(*QUERY_FILTER_PARAMS) do
|
|
7
|
+
def initialize(
|
|
8
|
+
user_data_128: 0,
|
|
9
|
+
user_data_64: 0,
|
|
10
|
+
user_data_32: 0,
|
|
11
|
+
ledger: 0,
|
|
12
|
+
code: 0,
|
|
13
|
+
timestamp_min: 0,
|
|
14
|
+
timestamp_max: 0,
|
|
15
|
+
limit:,
|
|
16
|
+
flags: []
|
|
17
|
+
)
|
|
18
|
+
super(
|
|
19
|
+
user_data_128,
|
|
20
|
+
user_data_64,
|
|
21
|
+
user_data_32,
|
|
22
|
+
ledger,
|
|
23
|
+
code,
|
|
24
|
+
timestamp_min,
|
|
25
|
+
timestamp_max,
|
|
26
|
+
limit,
|
|
27
|
+
flags
|
|
28
|
+
)
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
module TigerBeetle
|
|
2
|
+
TRANSFER_PARAMS = %i[
|
|
3
|
+
id debit_account_id credit_account_id amount pending_id user_data_128
|
|
4
|
+
user_data_64 user_data_32 timeout ledger code flags timestamp
|
|
5
|
+
]
|
|
6
|
+
|
|
7
|
+
Transfer = Struct.new(*TRANSFER_PARAMS) do
|
|
8
|
+
def initialize(
|
|
9
|
+
id:,
|
|
10
|
+
debit_account_id: 0,
|
|
11
|
+
credit_account_id: 0,
|
|
12
|
+
amount: 0,
|
|
13
|
+
pending_id: 0,
|
|
14
|
+
user_data_128: 0,
|
|
15
|
+
user_data_64: 0,
|
|
16
|
+
user_data_32: 0,
|
|
17
|
+
timeout: 0,
|
|
18
|
+
ledger: 0,
|
|
19
|
+
code: 0,
|
|
20
|
+
flags: [],
|
|
21
|
+
timestamp: nil
|
|
22
|
+
)
|
|
23
|
+
super(
|
|
24
|
+
id,
|
|
25
|
+
debit_account_id,
|
|
26
|
+
credit_account_id,
|
|
27
|
+
amount,
|
|
28
|
+
pending_id,
|
|
29
|
+
user_data_128,
|
|
30
|
+
user_data_64,
|
|
31
|
+
user_data_32,
|
|
32
|
+
timeout,
|
|
33
|
+
ledger,
|
|
34
|
+
code,
|
|
35
|
+
flags,
|
|
36
|
+
timestamp
|
|
37
|
+
)
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
data/lib/tigerbeetle.rb
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
require 'tigerbeetle/client'
|
|
2
|
+
require 'tigerbeetle/id'
|
|
3
|
+
require 'tigerbeetle/version'
|
|
4
|
+
|
|
5
|
+
module TigerBeetle
|
|
6
|
+
def self.id
|
|
7
|
+
ID.generate
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
def self.connect(cluster_id = 0, address = '3000')
|
|
11
|
+
TigerBeetle::Client.new(cluster_id, address)
|
|
12
|
+
end
|
|
13
|
+
end
|
data/tigerbeetle.gemspec
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
require_relative './lib/tigerbeetle/version'
|
|
2
|
+
require_relative './lib/tigerbeetle/platforms'
|
|
3
|
+
|
|
4
|
+
Gem::Specification.new do |spec|
|
|
5
|
+
spec.required_ruby_version = '>= 3.0'
|
|
6
|
+
|
|
7
|
+
spec.name = 'tigerbeetle'
|
|
8
|
+
spec.version = TigerBeetle::VERSION
|
|
9
|
+
spec.authors = ['Anthony D']
|
|
10
|
+
spec.email = ['anthony.dmitriyev@gmail.com']
|
|
11
|
+
|
|
12
|
+
spec.summary = 'TigerBeetle Ruby client'
|
|
13
|
+
spec.description = 'A Ruby client for interacting with the high performance TigerBeetle ledger'
|
|
14
|
+
spec.homepage = 'https://github.com/antstorm/tigerbeetle-ruby'
|
|
15
|
+
spec.license = 'Apache-2.0'
|
|
16
|
+
|
|
17
|
+
spec.require_paths = ['lib']
|
|
18
|
+
|
|
19
|
+
platform = ENV['TB_PLATFORM']
|
|
20
|
+
files = [
|
|
21
|
+
Dir['lib/**/*.rb'],
|
|
22
|
+
'CHANGELOG.md',
|
|
23
|
+
'LICENSE',
|
|
24
|
+
'README.md',
|
|
25
|
+
'tigerbeetle.gemspec'
|
|
26
|
+
].flatten
|
|
27
|
+
|
|
28
|
+
if platform
|
|
29
|
+
spec.platform = platform
|
|
30
|
+
native_files = TigerBeetle::PLATFORMS.fetch(platform).flat_map do |target|
|
|
31
|
+
Dir["lib/tb_client/native/#{target}/*"]
|
|
32
|
+
end
|
|
33
|
+
spec.files = files + native_files
|
|
34
|
+
else
|
|
35
|
+
ext = 'ext/tb_client/extconf.rb'
|
|
36
|
+
spec.extensions = [ext]
|
|
37
|
+
spec.files = files + [
|
|
38
|
+
ext,
|
|
39
|
+
Dir['ext/tb_client/tigerbeetle/src/**/*.{zig,c,h}'],
|
|
40
|
+
'ext/tb_client/tigerbeetle/build.zig',
|
|
41
|
+
'ext/tb_client/tigerbeetle/LICENSE'
|
|
42
|
+
].flatten
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
spec.add_dependency 'ffi', '~> 1.14'
|
|
46
|
+
|
|
47
|
+
spec.add_development_dependency 'rake', '~> 13.1'
|
|
48
|
+
spec.add_development_dependency 'rspec', '~> 3.11'
|
|
49
|
+
spec.add_development_dependency 'pry', '~> 0.15'
|
|
50
|
+
end
|
metadata
ADDED
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: tigerbeetle
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.0.37
|
|
5
|
+
platform: aarch64-linux
|
|
6
|
+
authors:
|
|
7
|
+
- Anthony D
|
|
8
|
+
autorequire:
|
|
9
|
+
bindir: bin
|
|
10
|
+
cert_chain: []
|
|
11
|
+
date: 2026-04-08 00:00:00.000000000 Z
|
|
12
|
+
dependencies:
|
|
13
|
+
- !ruby/object:Gem::Dependency
|
|
14
|
+
name: ffi
|
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
|
16
|
+
requirements:
|
|
17
|
+
- - "~>"
|
|
18
|
+
- !ruby/object:Gem::Version
|
|
19
|
+
version: '1.14'
|
|
20
|
+
type: :runtime
|
|
21
|
+
prerelease: false
|
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
23
|
+
requirements:
|
|
24
|
+
- - "~>"
|
|
25
|
+
- !ruby/object:Gem::Version
|
|
26
|
+
version: '1.14'
|
|
27
|
+
- !ruby/object:Gem::Dependency
|
|
28
|
+
name: rake
|
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
|
30
|
+
requirements:
|
|
31
|
+
- - "~>"
|
|
32
|
+
- !ruby/object:Gem::Version
|
|
33
|
+
version: '13.1'
|
|
34
|
+
type: :development
|
|
35
|
+
prerelease: false
|
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
37
|
+
requirements:
|
|
38
|
+
- - "~>"
|
|
39
|
+
- !ruby/object:Gem::Version
|
|
40
|
+
version: '13.1'
|
|
41
|
+
- !ruby/object:Gem::Dependency
|
|
42
|
+
name: rspec
|
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
|
44
|
+
requirements:
|
|
45
|
+
- - "~>"
|
|
46
|
+
- !ruby/object:Gem::Version
|
|
47
|
+
version: '3.11'
|
|
48
|
+
type: :development
|
|
49
|
+
prerelease: false
|
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
51
|
+
requirements:
|
|
52
|
+
- - "~>"
|
|
53
|
+
- !ruby/object:Gem::Version
|
|
54
|
+
version: '3.11'
|
|
55
|
+
- !ruby/object:Gem::Dependency
|
|
56
|
+
name: pry
|
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
|
58
|
+
requirements:
|
|
59
|
+
- - "~>"
|
|
60
|
+
- !ruby/object:Gem::Version
|
|
61
|
+
version: '0.15'
|
|
62
|
+
type: :development
|
|
63
|
+
prerelease: false
|
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
65
|
+
requirements:
|
|
66
|
+
- - "~>"
|
|
67
|
+
- !ruby/object:Gem::Version
|
|
68
|
+
version: '0.15'
|
|
69
|
+
description: A Ruby client for interacting with the high performance TigerBeetle ledger
|
|
70
|
+
email:
|
|
71
|
+
- anthony.dmitriyev@gmail.com
|
|
72
|
+
executables: []
|
|
73
|
+
extensions: []
|
|
74
|
+
extra_rdoc_files: []
|
|
75
|
+
files:
|
|
76
|
+
- CHANGELOG.md
|
|
77
|
+
- LICENSE
|
|
78
|
+
- README.md
|
|
79
|
+
- lib/tb_client.rb
|
|
80
|
+
- lib/tb_client/native/aarch64-linux-gnu.2.27/libtb_client.a
|
|
81
|
+
- lib/tb_client/native/aarch64-linux-gnu.2.27/libtb_client.so
|
|
82
|
+
- lib/tb_client/native/aarch64-linux-musl/libtb_client.a
|
|
83
|
+
- lib/tb_client/native/aarch64-linux-musl/libtb_client.so
|
|
84
|
+
- lib/tb_client/shared_lib.rb
|
|
85
|
+
- lib/tigerbeetle.rb
|
|
86
|
+
- lib/tigerbeetle/account.rb
|
|
87
|
+
- lib/tigerbeetle/account_balance.rb
|
|
88
|
+
- lib/tigerbeetle/account_filter.rb
|
|
89
|
+
- lib/tigerbeetle/atomic_counter.rb
|
|
90
|
+
- lib/tigerbeetle/client.rb
|
|
91
|
+
- lib/tigerbeetle/converters.rb
|
|
92
|
+
- lib/tigerbeetle/converters/account.rb
|
|
93
|
+
- lib/tigerbeetle/converters/account_balance.rb
|
|
94
|
+
- lib/tigerbeetle/converters/account_filter.rb
|
|
95
|
+
- lib/tigerbeetle/converters/base.rb
|
|
96
|
+
- lib/tigerbeetle/converters/create_accounts_result.rb
|
|
97
|
+
- lib/tigerbeetle/converters/create_transfers_result.rb
|
|
98
|
+
- lib/tigerbeetle/converters/query_filter.rb
|
|
99
|
+
- lib/tigerbeetle/converters/time.rb
|
|
100
|
+
- lib/tigerbeetle/converters/transfer.rb
|
|
101
|
+
- lib/tigerbeetle/converters/uint_128.rb
|
|
102
|
+
- lib/tigerbeetle/error.rb
|
|
103
|
+
- lib/tigerbeetle/id.rb
|
|
104
|
+
- lib/tigerbeetle/platforms.rb
|
|
105
|
+
- lib/tigerbeetle/query_filter.rb
|
|
106
|
+
- lib/tigerbeetle/request.rb
|
|
107
|
+
- lib/tigerbeetle/transfer.rb
|
|
108
|
+
- lib/tigerbeetle/version.rb
|
|
109
|
+
- tigerbeetle.gemspec
|
|
110
|
+
homepage: https://github.com/antstorm/tigerbeetle-ruby
|
|
111
|
+
licenses:
|
|
112
|
+
- Apache-2.0
|
|
113
|
+
metadata: {}
|
|
114
|
+
post_install_message:
|
|
115
|
+
rdoc_options: []
|
|
116
|
+
require_paths:
|
|
117
|
+
- lib
|
|
118
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
119
|
+
requirements:
|
|
120
|
+
- - ">="
|
|
121
|
+
- !ruby/object:Gem::Version
|
|
122
|
+
version: '3.0'
|
|
123
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
124
|
+
requirements:
|
|
125
|
+
- - ">="
|
|
126
|
+
- !ruby/object:Gem::Version
|
|
127
|
+
version: '0'
|
|
128
|
+
requirements: []
|
|
129
|
+
rubygems_version: 3.5.22
|
|
130
|
+
signing_key:
|
|
131
|
+
specification_version: 4
|
|
132
|
+
summary: TigerBeetle Ruby client
|
|
133
|
+
test_files: []
|