hippofish/packages/backend/src/server
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
..
activitypub refactor: 🎨 rome 2023-01-12 20:40:33 -08:00
api Refactor: use rust for native mastodon id conversion (#9786) 2023-03-31 01:58:28 +00:00
file Cleaning up image conversions to use webp, and increasing the thumbnail size. 2023-01-28 17:46:03 -08:00
proxy Also increase the size for proxy. 2023-01-28 18:00:08 -08:00
web feat: post metadata uses full @ 2023-03-23 18:03:50 -07:00
activitypub.ts refactor: 🎨 rome 2023-01-12 20:40:33 -08:00
index.ts allow client credentials not just for tapbots 2023-03-22 14:40:59 +01:00
nodeinfo.ts Expand caption limit to 1500 characters 2023-03-05 16:51:44 +10:00
well-known.ts Fix config 2023-01-23 10:35:51 -08:00