Socket
Socket
Sign inDemoInstall

@yuuang/ffi-rs-linux-arm64-musl

Package Overview
Dependencies
Maintainers
1
Versions
90
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@yuuang/ffi-rs-linux-arm64-musl - npm Package Compare versions

Comparing version 1.0.50 to 1.0.51

2

package.json
{
"name": "@yuuang/ffi-rs-linux-arm64-musl",
"version": "1.0.50",
"version": "1.0.51",
"os": [

@@ -5,0 +5,0 @@ "linux"

@@ -7,3 +7,3 @@ # ffi-rs

A module written in Rust and N-APi provides interface (FFI) features for Node.js
A module written in Rust and N-API provides interface (FFI) features for Node.js

@@ -13,5 +13,5 @@

[ffi-rs](https://github.com/zhangyuang/node-ffi-rs) is a high performance module written in Rust and N-API that provides FFI (Foreign Function Interface) features for Node.js. It allows developers to call functions written in other languages such as C++, C, and Rust directly from JavaScript without writing any C++ code.
[ffi-rs](https://github.com/zhangyuang/node-ffi-rs) is a high-performance module written in Rust and N-API that provides FFI (Foreign Function Interface) features for Node.js. It allows developers to call functions written in other languages such as C++, C, and Rust directly from JavaScript without writing any C++ code.
This module aims to provide similar functionality to the node-ffi module, but with a completely rewritten underlying codebase. The node-ffi module has been unmaintained for several years and is no longer usable, which is why ffi-rs was developed.
This module aims to provide similar functionality to the node-ffi module but with a completely rewritten underlying codebase. The node-ffi module has been unmaintained for several years and is no longer usable, so ffi-rs was developed to fill that void.

@@ -21,4 +21,4 @@ ## features

- High performance ✨
- Simpler data describe and api interface 💗
- Support more data type between `Node.js` and `c type` 😊
- Simpler data description and API interface 💗
- Support more data types between `Node.js` and `c type` 😊
- Support modify data in place 🥸

@@ -53,3 +53,3 @@

Currently, ffi-rs only supports there types of parameters and return values. However, support for more types will be added in the future based on actual usage scenarios.
Currently, ffi-rs only supports these types of parameters and return values. However, support for more types may be added in the future based on actual usage scenarios.

@@ -78,3 +78,3 @@ ### Basic Type

If you want to call c++ function, see [turorial](#c++)
If you want to call C++ function, see [tutorial](#C++)

@@ -99,5 +99,5 @@ ## Support Platform

For below c++ code, we compile this file into a dynamic library
For the following C++ code, we compile this file into a dynamic library
### write c/c++ code
### write C/C++ code

@@ -129,3 +129,3 @@ Note: The return value type of a function must be of type c

### compile c code to dynamic library
### compile C code into a dynamic library

@@ -140,3 +140,3 @@ ```bash

Then can use `ffi-rs` invoke the dynamic library file contains functions.
Then you can use `ffi-rs` to invoke the dynamic library file that contains functions.

@@ -214,3 +214,3 @@ ### initialization

In the lateset version, `ffi-rs` support modify data in place.
In the latest version, `ffi-rs` supports modifying data in place.

@@ -241,5 +241,5 @@ The sample code is as follows

When use `array` as `retType` should use `arrayConstructor` to specify array type with legal length which is important.
When using `array` as `retType`, you should use `arrayConstructor` to specify the array type with a legal length which is important.
If the length is incorrect, program maybe exit abnormally
If the length is incorrect, the program may exit abnormally

@@ -305,3 +305,3 @@ ```cpp

In `ffi-rs`, we use [DataType.External](https://nodejs.org/api/n-api.html#napi_create_external) for wrap the `pointer` which makes it can be passed between `Node.js` and `C`.
In `ffi-rs`, we use [DataType.External](https://nodejs.org/api/n-api.html#napi_create_external) for wrapping the `pointer` which enables it to be passed between `Node.js` and `C`.

@@ -381,3 +381,3 @@ ```cpp

Similary, you can use `restorePointer` to restore data from `pointer` which wrap by `createPointer`
Similarly, you can use `restorePointer` to restore data from `pointer` which is wrapped by `createPointer`

@@ -401,3 +401,3 @@ ```js

For create a c struct or get a c struct as a return type, you need to define the types of the parameters strictly in the order in which the fields of the c structure are defined.
To create a c struct or get a c struct as a return type, you need to define the types of the parameters strictly in the order in which the fields of the c structure are defined.

@@ -693,3 +693,3 @@ ```cpp

Attention,since the vast majority of scenaros developers pass js function to c as a callback, so `ffi-rs` will create [threadsafe_function](https://nodejs.org/api/n-api.html#napi_threadsafe_function) from jsfunction which means the jsfunction will be called asynchronous, and Node.js process will not be exited automatically
Attention,since the vast majority of scenarios developers pass js function to c as a callback, so `ffi-rs` will create [threadsafe_function](https://nodejs.org/api/n-api.html#napi_threadsafe_function) from jsfunction which means the jsfunction will be called asynchronous, and Node.js process will not be exited automatically

@@ -699,7 +699,7 @@

We'll provide more examples from real-worl scenarios, if you have any ideas, please submit an issue
We'll provide more examples from real-world scenarios, if you have any ideas, please submit an issue
### class type
In C++ scene, we can use `DataType.External` to get class type pointer
In C++ scene, we can use `DataType.External` to get a class type pointer

@@ -720,3 +720,3 @@ In the code below, we use C types to wrap C++ types such as convert `char *` to `std::string` and return class pointer

And then, we can call it by above code
And then, it can called by the following code

@@ -723,0 +723,0 @@ ```js

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc