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
This commit is contained in:
@@ -2,5 +2,11 @@
|
||||
import { createRequire } from 'module';
|
||||
const require = createRequire(import.meta.url);
|
||||
|
||||
export let {guacDecode, guacEncode, jpegEncode} = require('./index.node');
|
||||
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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user