Socket
Socket
Sign inDemoInstall

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

Package Overview
Dependencies
Maintainers
1
Versions
93
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.37 to 1.0.38

2

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

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

@@ -16,2 +16,9 @@ # ffi-rs

## features
- High performance
- Simpler data describe and api interface
- Support more data type between `Node.js` and `c type`
- Support modify data in place
## benchmark

@@ -58,3 +65,3 @@

- [pointer](#pointer)
- [u8Array](#array)
- [u8Array](#buffer)(buffer)
- [i32Array](#array)

@@ -191,2 +198,28 @@ - [stringArray](#array)

### Buffer
In the lateset version, `ffi-rs` support modify data in place.
The sample code is as follows
```c
extern int modifyData(char* buffer) {
// modify buffer data in place
}
```
```js
const arr = Buffer.alloc(200) // create buffer
const res = load({
library: "libsum",
funcName: "modifyData",
retType: DataType.I32,
paramsType: [
DataType.U8Array
],
paramsValue: [arr]
})
console.log(arr) // buffer data can be updated
```
### Array

@@ -393,3 +426,3 @@

byte: 66,
byteArray: [103, 104],
byteArray: Buffer.from([103, 104]),
};

@@ -408,3 +441,3 @@ const person = {

byte: 65,
byteArray: [101, 102],
byteArray: Buffer.from([101, 102]),
};

@@ -411,0 +444,0 @@ const parentType = {

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc