rcx 0.1.0
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/.clang-format +28 -0
- data/.rspec +3 -0
- data/.yarnrc.yml +1 -0
- data/CHANGELOG.md +4 -0
- data/Doxyfile +2863 -0
- data/LICENSE.txt +23 -0
- data/README.md +20 -0
- data/Rakefile +39 -0
- data/examples/class.cpp +20 -0
- data/include/rcx/internal/rcx.hpp +1258 -0
- data/include/rcx/internal/rcx_impl.hpp +1365 -0
- data/include/rcx/rcx.hpp +6 -0
- data/lib/rcx/mkmf.rb +54 -0
- data/lib/rcx/version.rb +3 -0
- data/lib/rcx.rb +2 -0
- data/package.json +6 -0
- data/yarn.lock +21 -0
- metadata +74 -0
data/include/rcx/rcx.hpp
ADDED
data/lib/rcx/mkmf.rb
ADDED
@@ -0,0 +1,54 @@
|
|
1
|
+
# SPDX-License-Identifier: BSL-1.0
|
2
|
+
# SPDX-FileCopyrightText: Copyright 2024-2025 Kasumi Hanazuki <kasumi@rollingapple.net>
|
3
|
+
require 'mkmf'
|
4
|
+
include MakeMakefile['C++']
|
5
|
+
|
6
|
+
root = File.join(__dir__, '../..')
|
7
|
+
|
8
|
+
$INCFLAGS << " -I#{File.join(root, 'include').shellescape}"
|
9
|
+
|
10
|
+
$rcx_headers = Dir[File.join(root, 'include/**/*.hpp')]
|
11
|
+
|
12
|
+
include (Module.new do
|
13
|
+
def configuration(...)
|
14
|
+
super.tap do |mk|
|
15
|
+
mk << <<MAKEFILE
|
16
|
+
rcx_headers = #{$rcx_headers.join(?\s)}
|
17
|
+
ruby_headers := $(ruby_headers) $(rcx_headers)
|
18
|
+
MAKEFILE
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end)
|
22
|
+
|
23
|
+
## libffi
|
24
|
+
|
25
|
+
dir_config('libffi').any? || pkg_config('libffi')
|
26
|
+
ffi_h = 'ffi.h'
|
27
|
+
unless have_func('ffi_prep_cif', ffi_h)
|
28
|
+
raise "libffi was not found"
|
29
|
+
end
|
30
|
+
unless have_func('ffi_closure_alloc', ffi_h) && have_func('ffi_prep_closure_loc', ffi_h)
|
31
|
+
raise "libffi does not support closures"
|
32
|
+
end
|
33
|
+
|
34
|
+
if have_header('cxxabi.h')
|
35
|
+
have_func('abi::__cxa_demangle', 'cxxabi.h')
|
36
|
+
have_func('abi::__cxa_current_exception_type', 'cxxabi.h')
|
37
|
+
end
|
38
|
+
|
39
|
+
if checking_for("std::is_layout_compatible<>") {
|
40
|
+
try_compile(<<'CXX')
|
41
|
+
#include <type_traits>
|
42
|
+
struct A { int a; };
|
43
|
+
struct B { int b; };
|
44
|
+
static_assert(std::is_layout_compatible<A, B>::value);
|
45
|
+
CXX
|
46
|
+
}
|
47
|
+
$defs.push("-DHAVE_STD_IS_LAYOUT_COMPATIBLE=1")
|
48
|
+
end
|
49
|
+
|
50
|
+
if checking_for("nullability extension") {
|
51
|
+
try_compile("void *_Nullable p, *_Nonnull q;")
|
52
|
+
}
|
53
|
+
$defs.push("-DHAVE_FEATURE_NULLABILITY=1")
|
54
|
+
end
|
data/lib/rcx/version.rb
ADDED
data/lib/rcx.rb
ADDED
data/package.json
ADDED
data/yarn.lock
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
# This file is generated by running "yarn install" inside your project.
|
2
|
+
# Manual changes might be lost - proceed with caution!
|
3
|
+
|
4
|
+
__metadata:
|
5
|
+
version: 8
|
6
|
+
cacheKey: 10c0
|
7
|
+
|
8
|
+
"@jothepro/doxygen-awesome-css@https://github.com/jothepro/doxygen-awesome-css#v2.3.4":
|
9
|
+
version: 2.3.4
|
10
|
+
resolution: "@jothepro/doxygen-awesome-css@https://github.com/jothepro/doxygen-awesome-css.git#commit=568f56cde6ac78b6dfcc14acd380b2e745c301ea"
|
11
|
+
checksum: 10c0/e36b8a227b3c55542261ed83a19127400356eaa8075bea7671a3a2550a9001a2ec787365fd4b19e02dadeb7805a3506104002ed51810f5bc2da75e12a3fad60b
|
12
|
+
languageName: node
|
13
|
+
linkType: hard
|
14
|
+
|
15
|
+
"root-workspace-0b6124@workspace:.":
|
16
|
+
version: 0.0.0-use.local
|
17
|
+
resolution: "root-workspace-0b6124@workspace:."
|
18
|
+
dependencies:
|
19
|
+
"@jothepro/doxygen-awesome-css": "https://github.com/jothepro/doxygen-awesome-css#v2.3.4"
|
20
|
+
languageName: unknown
|
21
|
+
linkType: soft
|
metadata
ADDED
@@ -0,0 +1,74 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: rcx
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Kasumi Hanazuki
|
8
|
+
bindir: exe
|
9
|
+
cert_chain: []
|
10
|
+
date: 2025-02-05 00:00:00.000000000 Z
|
11
|
+
dependencies:
|
12
|
+
- !ruby/object:Gem::Dependency
|
13
|
+
name: shellwords
|
14
|
+
requirement: !ruby/object:Gem::Requirement
|
15
|
+
requirements:
|
16
|
+
- - "~>"
|
17
|
+
- !ruby/object:Gem::Version
|
18
|
+
version: '0.2'
|
19
|
+
type: :runtime
|
20
|
+
prerelease: false
|
21
|
+
version_requirements: !ruby/object:Gem::Requirement
|
22
|
+
requirements:
|
23
|
+
- - "~>"
|
24
|
+
- !ruby/object:Gem::Version
|
25
|
+
version: '0.2'
|
26
|
+
description: Write Ruby extension in modern C++
|
27
|
+
email:
|
28
|
+
- kasumi@rollingapple.net
|
29
|
+
executables: []
|
30
|
+
extensions: []
|
31
|
+
extra_rdoc_files: []
|
32
|
+
files:
|
33
|
+
- ".clang-format"
|
34
|
+
- ".rspec"
|
35
|
+
- ".yarnrc.yml"
|
36
|
+
- CHANGELOG.md
|
37
|
+
- Doxyfile
|
38
|
+
- LICENSE.txt
|
39
|
+
- README.md
|
40
|
+
- Rakefile
|
41
|
+
- examples/class.cpp
|
42
|
+
- include/rcx/internal/rcx.hpp
|
43
|
+
- include/rcx/internal/rcx_impl.hpp
|
44
|
+
- include/rcx/rcx.hpp
|
45
|
+
- lib/rcx.rb
|
46
|
+
- lib/rcx/mkmf.rb
|
47
|
+
- lib/rcx/version.rb
|
48
|
+
- package.json
|
49
|
+
- yarn.lock
|
50
|
+
homepage: https://github.com/hanazuki/rcx
|
51
|
+
licenses:
|
52
|
+
- BSL-1.0
|
53
|
+
metadata:
|
54
|
+
homepage_uri: https://github.com/hanazuki/rcx
|
55
|
+
source_code_uri: https://github.com/hanazuki/rcx
|
56
|
+
changelog_uri: https://github.com/hanazuki/rcx/blob/master/CHANGELOG.md
|
57
|
+
rdoc_options: []
|
58
|
+
require_paths:
|
59
|
+
- lib
|
60
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
61
|
+
requirements:
|
62
|
+
- - ">="
|
63
|
+
- !ruby/object:Gem::Version
|
64
|
+
version: 3.1.0
|
65
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
66
|
+
requirements:
|
67
|
+
- - ">="
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '0'
|
70
|
+
requirements: []
|
71
|
+
rubygems_version: 3.7.0.dev
|
72
|
+
specification_version: 4
|
73
|
+
summary: Write Ruby extension in modern C++
|
74
|
+
test_files: []
|