Navigation Menu

Skip to content

Commit

Permalink
Adds clarification about versioned shared libraries
Browse files Browse the repository at this point in the history
Helps #3094
  • Loading branch information
JJ committed Dec 6, 2019
1 parent 589005d commit 39c5858
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion doc/Language/nativecall.pod6
Expand Up @@ -29,9 +29,24 @@ that you can do is just adding to this simple pattern of declaring a Raku sub,
naming it after the symbol you want to call and marking it with the C<native>
trait.
You will also need to declare and use native types. Please check
You will also need to declare and use native types, which cannot be imported
from the shared library in the same way. Please check
L<the native types page|/language/nativetypes> for more information.
Except in the case you are using your own compiled libraries, or any other
kind of bundled library, shared libraries are versioned, i.e., they will be
in a file C<libfoo.so.x.y.z>, and this shared library will be symlinked to
C<libxxx.so.x>. By default, Raku will pick up that file if it's the only
existing one. This is why it safer, and advisable, to always include a
version, this way:
=for code :skip-test<simple snippet>
sub some_argless_function() is native('foo',v1.2.3) { * }
Please check the
L<section on the ABI/API version|/language/nativecall#ABI/API_version> for
more information.
=head1 Changing names
Sometimes you want the name of your Raku subroutine to be different from the
Expand Down

0 comments on commit 39c5858

Please sign in to comment.