IronClad 相当于 Jython
对于 IronPython,有一个项目 - IronClad,旨在透明地运行 C 扩展在里面。 Jython 有类似的项目吗?
For IronPython there is a project - IronClad, that aims to transparently run C extensions in it. Is there a similiar project for Jython?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您也许可以使用 Java 的 loadLibrary 来执行此操作(前提是它可以在您的平台的 java 中运行)。 它位于java库中: java.System.loadLibrary()。
请注意,有时您必须根据要使用的库和目标系统用 C 和/或 Java 编写包装器,因为细节取决于平台。
请参阅文档了解更多详细信息。
You can probably use Java's loadLibrary to do that (provided it works in your platform's java). It is in the java library: java.System.loadLibrary().
Note that sometimes you will have to write a wrapper in C and/or in Java depending on the library you want to use and target system, since details are platform dependant.
Refer to the documentation for more details.
请关注 JyNI (http://www.jyni.org),对于 Jython 来说,这正是 Ironclad到 IronPython。 截至撰写本文时,JyNI 仍处于 alpha 状态。
如果您只想使用 Jython 中的一些 C 库,只需使用 Jython 中的 JNA,就像使用 Java 一样。 如果您需要更精细的控制,请查看 JNI 或 SWIG。
另外,您可能想看看 JEP (https://github.com/mrj0/jep )或日元(https://github.com/bcdev/jpy)。
Keep an eye on JyNI (http://www.jyni.org), which is to Jython exactly what is Ironclad to IronPython. As of this writing JyNI is still alpha state though.
If you just want to use some C-library from Jython, simply use JNA from Jython like you would do from Java. If you need finer control, look at JNI or SWIG.
Also, you might want to take a look at JEP (https://github.com/mrj0/jep) or JPY (https://github.com/bcdev/jpy).