```ruby
require 'ffi'

module StringTools
  extend FFI::Library
  ffi_lib "../target/debug/libstringtools.so"
  attach_function :count_substrings, [:string, :string], :int
end

puts StringTools.count_substrings("bąnana", "na")
```

Add encoding comment for Ruby.
user
```ruby
# encoding: utf-8
#
require 'ffi'

module StringTools
  extend FFI::Library
  ffi_lib "../target/debug/libstringtools.so"
  attach_function :count_substrings, [:string, :string], :int
end

puts StringTools.count_substrings("bąnana", "na")
```
assistant