mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-14 05:57:32 -07:00
981d3ee725
This uses [napi-rs](https://napi.rs/) to allow for automatic generation of node bindings for the native code. I also changed the `isolatedModules` TS flag to false to allow for `static enum` to be shared across modules. It doesn't seem to be necessary for the build system that CK uses. Currently this method does not work with ID generators with longer IDs. Likely the best solution is to add another key in the database. Some benchmarks for 1 million conversions: ``` node, x1_000_000: 2.847s rust, x1_000_000: 1.265s ``` There are still optimizations that can be made, but I think this is a good starting point and a good way to bring rust into the CK stack. Co-authored-by: s1idewhist1e <trombonedude05@gmail.com> Reviewed-on: https://codeberg.org/calckey/calckey/pulls/9786 Co-authored-by: s1idewhist1e <s1idewhist1e@noreply.codeberg.org> Co-committed-by: s1idewhist1e <s1idewhist1e@noreply.codeberg.org>
48 lines
938 B
JSON
48 lines
938 B
JSON
{
|
|
"compilerOptions": {
|
|
"allowJs": true,
|
|
"noEmitOnError": false,
|
|
"noImplicitAny": true,
|
|
"noImplicitReturns": true,
|
|
"noUnusedParameters": false,
|
|
"noUnusedLocals": false,
|
|
"noFallthroughCasesInSwitch": true,
|
|
"declaration": false,
|
|
"sourceMap": false,
|
|
"target": "es2021",
|
|
"module": "es2020",
|
|
"moduleResolution": "node",
|
|
"allowSyntheticDefaultImports": true,
|
|
"removeComments": false,
|
|
"noLib": false,
|
|
"strict": true,
|
|
"strictNullChecks": true,
|
|
"strictPropertyInitialization": false,
|
|
"experimentalDecorators": true,
|
|
"emitDecoratorMetadata": true,
|
|
"resolveJsonModule": true,
|
|
"isolatedModules": false,
|
|
"rootDir": "./src",
|
|
"baseUrl": "./",
|
|
"paths": {
|
|
"@/*": [
|
|
"./src/*"
|
|
]
|
|
},
|
|
"outDir": "./built",
|
|
"types": [
|
|
"node"
|
|
],
|
|
"typeRoots": [
|
|
"./node_modules/@types",
|
|
"./src/@types"
|
|
],
|
|
"lib": [
|
|
"esnext"
|
|
]
|
|
},
|
|
"compileOnSave": false,
|
|
"include": [
|
|
"./src/**/*.ts"
|
|
],
|
|
}
|