0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

ruby で C extension を使用する方法を最初に調べた際のメモ

Last updated at Posted at 2023-06-18

2022.1 に書いたメモが出てきたのでpublishしておく。


これわかりやすい。iStastsの作者が、そのgemを例に出して説明してくれている。

C code and Makefile
As mentioned previously, the C code is located under the ext directory. Each C module should have its own subdirectory in there. Note that this directory also contains another important file named extconf.rb. The content of this file is executed when installing the gem to generate a Makefile that will be used to compile the C extension. Here’s a basic example:

に従って、 https://github.com/kudojp/ruby-c-extension-experimental で実際にc-extensionをrubyから動かした。非常にシンプル!

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?