Commit Graph

20 Commits

Author SHA1 Message Date
naskya b121e4bc9d
fix format/lint command 2023-10-03 01:32:36 +09:00
ThatOneCalculator 34e2f7ada6
chore: 🔧 linting config 2023-09-01 16:32:41 -07:00
Namekuji 5847e986fb
fix: call default user if empty. resolves #10604 2023-08-01 12:52:00 -04:00
Namekuji 32fac53e8d
feat: backend debug in vscode 2023-07-30 16:27:13 -04:00
ThatOneCalculator bdc35a343e
refactor: 🚨 linting fix 2023-07-16 15:32:32 -07:00
Namekuji fd6b655a7c
fix compile error 2023-06-24 04:07:19 -04:00
Namekuji 99e1f1ad84
chore: format 2023-06-22 16:00:28 -04:00
Namekuji 3780be57c0
clean unnecessary artifacts 2023-06-22 16:00:28 -04:00
Namekuji e232332a46
fix build and clean scripts 2023-06-22 16:00:28 -04:00
ThatOneCalculator 02658fee0b
chore: ⬆️ up various deps 2023-06-03 00:41:30 -07:00
Namekuji 382b009ffd
add cargo test script 2023-06-03 00:40:51 -04:00
Namekuji 15f8a4cbba
cargo formats all modules 2023-06-03 00:37:10 -04:00
Namekuji 874b0a2c69
add unit test 2023-06-02 23:48:27 -04:00
Namekuji c443a5601c
add format script 2023-06-02 23:48:27 -04:00
Namekuji 752d63e6de
add native calls 2023-06-02 23:48:24 -04:00
Namekuji e932d6effa
use schema in native-utils 2023-06-02 23:48:24 -04:00
Namekuji 0bd5893e7d
fix varchar array 2023-06-02 23:48:18 -04:00
Namekuji 6698c00f78
rename test modules 2023-06-02 23:48:17 -04:00
Namekuji 6bbfe1a6b4
add tests 2023-06-02 23:48:17 -04:00
s1idewhist1e c58ce6c53b Refactor: use rust for native mastodon id conversion (#9786)
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>
2023-03-31 01:58:28 +00:00