[英]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.