Files
collabvm-1.2.ts/cvm-rs/index.js
modeco80 17191b0917 cvm-rs: version 0.2.0
- switch to napi-rs. this mostly affects only the backend side of things, but IMO napi-rs is better (also, way less boilerplate is needed compared to neon).

- jpeg encoding no longer clones the input buffer internally (or wraps it in a Mutex as well), thanks to napi-rs not sucking in this regard. this is *probably* a micro-optimization, but will make it easier to later on do parallel encoding of all rectangles

- guac encoding is weird. This is kind of a painpoint of napi-rs but it's bearable
2024-08-20 06:14:08 -04:00

13 lines
353 B
JavaScript

// *sigh*
import { createRequire } from 'module';
const require = createRequire(import.meta.url);
let {guacDecode, guacEncodeImpl, jpegEncode} = require('./index.node');
export { guacDecode, jpegEncode };
// shim for js->rust interop, because napi-rs kind of blows in this regard
export function guacEncode(...args) {
return guacEncodeImpl(args);
}