Initial repo

This commit is contained in:
2023-01-02 10:31:09 +03:00
commit daed1baafd
16 changed files with 768 additions and 0 deletions

View File

@ -0,0 +1,17 @@
[package]
edition = "2021"
name = "bindings"
version = "0.0.0"
[lib]
crate-type = ["cdylib"]
[dependencies]
napi = {version = "2", default-features = false, features = ["napi4"]}
napi-derive = "2"
[build-dependencies]
napi-build = "2"
[profile.release]
lto = true

5
crates/bindings/build.rs Normal file
View File

@ -0,0 +1,5 @@
extern crate napi_build;
fn main() {
napi_build::setup();
}

View File

@ -0,0 +1,8 @@
#![deny(clippy::all)]
use napi_derive::napi;
#[napi]
pub fn sum(a: i32, b: i32) -> i32 {
a + b
}