Init with c ext

This commit is contained in:
2025-03-14 17:46:02 +00:00
commit d47b8ca684
21 changed files with 414 additions and 0 deletions
+10
View File
@@ -0,0 +1,10 @@
# frozen_string_literal: true
require "mkmf"
# Makes all symbols private by default to avoid unintended conflict
# with other gems. To explicitly export symbols you can use RUBY_FUNC_EXPORTED
# selectively, or entirely remove this flag.
append_cflags("-fvisibility=hidden")
create_makefile("mcp/mcp")
+9
View File
@@ -0,0 +1,9 @@
#include "mcp.h"
VALUE rb_mMcp;
RUBY_FUNC_EXPORTED void
Init_mcp(void)
{
rb_mMcp = rb_define_module("Mcp");
}
+6
View File
@@ -0,0 +1,6 @@
#ifndef MCP_H
#define MCP_H 1
#include "ruby.h"
#endif /* MCP_H */