# cobhan

> Functions to enable cobhan wrapper libraries

Latest version **1.0.37** (published 2023-09-20) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install cobhan
pnpm add cobhan
yarn add cobhan
bun add cobhan
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.0.37 |
| Published | 2023-09-20 |
| First published | 2022-02-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 9 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Author | Jeremiah Gowdy |
| Maintainers | mmason2, jpina1-godaddy, jgowdy, ibrandao, jpage, kinetifex, rxmarbles, kquerna, 3rdeden, jcrugzz, dcousineau |

## Links

- npm: https://www.npmjs.com/package/cobhan
- npm.io page: https://npm.io/package/cobhan

## Dependencies (2)

- [fs](https://npm.io/package/fs.md) ^0.0.2
- [ffi-napi](https://npm.io/package/ffi-napi.md) ^4.0.3

## Recent versions

- 1.0.37 (latest) — 2023-09-20
- 1.0.35 — 2022-03-22
- 1.0.34 — 2022-03-22
- 1.0.33 — 2022-03-21
- 1.0.31 — 2022-03-21
- 1.0.30 — 2022-03-11
- 1.0.29 — 2022-03-11
- 1.0.27 — 2022-03-11
- 1.0.26 — 2022-03-11
- 1.0.25 — 2022-03-11
- 1.0.22 — 2022-03-04
- 1.0.21 — 2022-03-04
- 1.0.20 — 2022-03-04
- 1.0.19 — 2022-03-04
- 1.0.18 — 2022-03-04
- … 14 more at https://npm.io/package/cobhan/versions

## README

# Cobhan FFI

Cobhan FFI is a system for enabling shared code to be written in Rust or Go and consumed from all major languages/platforms in a safe and effective way, using easy helper functions to manage any unsafe data marshaling.

## Types

* Supported types
    * int32 - 32bit signed integer
    * int64 - 64bit signed integer
    * float64 - double precision 64bit IEEE 754 floating point
    * Cobhan buffer - length delimited 8bit buffer (no null delimiters)
        * utf-8 encoded string
        * JSON
        * binary data 
* Cobhan buffer details
    * Callers provide the output buffer allocation and capacity
    * Called functions can transparently return larger values via temporary files
    * **Modern [tmpfs](https://en.wikipedia.org/wiki/Tmpfs) is entirely memory backed**
* Return values
    * Functions that return scalar values can return the value directly
        * Functions *can* use special case and return maximum positive or maximum negative or zero values to
            represent error or overflow conditions
        * Functions *can* allow scalar values to wrap
        * Functions should document their overflow / underflow behavior

---
_Source: https://npm.io/package/cobhan · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
