[英]What is the workflow for implementing ERTS NIFs in Zig?
所述齐格勒包可用于: https://github.com/ityonemo/zigler , https://hex.pm/packages/zigler
defmodule ExampleZig do
use Zig
~Z"""
/// nif: example_fun/2
fn example_fun(value1: f64, value2: f64) bool {
return value1 > value2;
}
"""
end
test "example nifs" do
assert ExampleZig.example_fun(0.8, -0.8)
refute ExampleZig.example_fun(0.1, 0.4)
end
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.