diff --git a/README.md b/README.md index 13330a13..fa228b9a 100644 --- a/README.md +++ b/README.md @@ -81,6 +81,12 @@ rustflags = [ "-C", "link-arg=-undefined", "-C", "link-arg=dynamic_lookup", ] + +[target.aarch64-apple-darwin] +rustflags = [ + "-C", "link-arg=-undefined", + "-C", "link-arg=dynamic_lookup", +] ``` While developing, you can symlink (or copy) and rename the shared library from the target folder: On MacOS, rename `libstring_sum.dylib` to `string_sum.so`, on Windows `libstring_sum.dll` to `string_sum.pyd`, and on Linux `libstring_sum.so` to `string_sum.so`. Then open a Python shell in the same folder and you'll be able to `import string_sum`. diff --git a/src/lib.rs b/src/lib.rs index 09222c05..b421391f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -90,6 +90,12 @@ //! "-C", "link-arg=-undefined", //! "-C", "link-arg=dynamic_lookup", //! ] +//! +//! [target.aarch64-apple-darwin] +//! rustflags = [ +//! "-C", "link-arg=-undefined", +//! "-C", "link-arg=dynamic_lookup", +//! ] //! ``` //! //! While developing, you symlink (or copy) and rename the shared library from