Rust-Struct-Reification
A macro to reify structs and their fields for type-safe runtime invocation and reflective access to fields and attributes (by EngineersBox)
specta
Easily export your Rust types to other languages (by oscartbeaumont)
Rust-Struct-Reification | specta | |
---|---|---|
1 | 1 | |
3 | 203 | |
- | - | |
2.6 | 8.8 | |
about 2 years ago | 5 days ago | |
Rust | Rust | |
- | MIT License |
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Rust-Struct-Reification
Posts with mentions or reviews of Rust-Struct-Reification.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2022-03-27.
-
Macro for structured byte to struct parsing
I’m also yet to actually cratify it properly, but there is an example on the repo if you want to have a look: https://github.com/EngineersBox/Rust-Struct-Reification
specta
Posts with mentions or reviews of specta.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2023-06-03.
-
Using rust to generate typescript client
I assume you're using Axum or Actix as your router & web server, in which case I think using OpenAPI specs is your best option. I see that rspc has already been mentioned in this thread, which I would definitely recommend (disclaimer - I work at the company that builds it) if continuing to use REST wasn't a priority, since it can auto-generate all the TS bindings you need and has a React Query integration so you'd feel right at home. It's able to do so much since it's able to sit between your backend and frontend code, but REST is a lot less opinionated, hence the recommendation to continue using OpenAPI. However, if you're willing to lose some type-safety there's the option of using a Rust -> TS generator specifically for your data types, and then manually use React Query. You'd lose the type-level enforcement of your routes, but at least you'd have your structs and enums available in TS. If you were to take this route I'd personally recommend using Specta, since it's the Rust -> TS generator that powers rspc, but there's also ts-rs and Typeshare which could probably do the job (though I don't think they're as good).
What are some alternatives?
When comparing Rust-Struct-Reification and specta you can also consider the following projects:
tauri - Build smaller, faster, and more secure desktop applications with a web frontend.
deno - A modern runtime for JavaScript and TypeScript.
interact - Online introspection for Rust
typeshare - Generate code in different languages from Rust type definitions for FFI interop.
indicium - A simple in-memory search for collections and key-value stores.
default-args.rs - zero runtime cost default arguments in rust
rust-delegate - Rust method delegation with less boilerplate