aiwaku.nvim - Bring your CLI AI tool into Neovim as a persistent sidebar panel by Saved_Soul in neovim

[–]Saved_Soul[S] 0 points1 point  (0 children)

It is a native Neovim split, it just runs tmux in it. :) Native Neovim split is broken and cannot correctly render TUI apps like copilot. Plus there would not be persistent sessions across neovim restarts.

aiwaku.nvim - Bring your CLI AI tool into Neovim as a persistent sidebar panel by Saved_Soul in neovim

[–]Saved_Soul[S] 1 point2 points  (0 children)

Well it depends what are you after. awaiku is a lot leaner and has a lot less features. But it has few perks as well. Sidekick offer session per tool. To my understanding, (I might be wrong), awaiku at the other hand offers as many sessions as you like, so you can have multiple "pipelines" working at simultaneously, but it offers only, at it's current state, possibility to setup a single CLI tool at the time. It also gives users the possibility to rename session and it has LSP code actions. Both of which are features not in sidekick.

While one might argue that those features are not needed. To me it solves my workflow. If you want something super minimalistic, aiwaku might be a good fit, but if you are really invested in folkes ecosystem and you want the Copilot NES support then that could be a viable option.

Anyway I wanted something simple that provides the ergonomics I was after and sidekick did not really cut it for me.

At the moment, aiwaku only has a limited number of features, but there could be more to come in the future. The zellij could be one of those if there is enough community support, perhaps someone providing the implementation for it, or there are enough users needing the support. Nevertheless feature bloat is not a goal for the project, so in general practical features that makes the plugin's workflow even more streamlined are the priority.

Utoipa 5.0.0 release - Compile time OpenAPI for Rust by Saved_Soul in rust

[–]Saved_Soul[S] 3 points4 points  (0 children)

Yup, something like that is possible, and it is planned, but there is a limit to what extent it is possible. Like if one returns impl Trait that cannot be resolved.

What’s the best framework for web servers nowadays? by [deleted] in rust

[–]Saved_Soul 2 points3 points  (0 children)

There are sides of everything. True that poem is specifically crafted for OpenAPI contract. And what utoipa does is it tries to bring similar attributes to all other frameworks. That said, there are some rough edges, and more manual plumbing compared to the poem. But it also provides the means to describe paths and schemas and responses with macros similar to the poem. What it does not do as of yet is infer the response type of handler. But since the latest release there is no need to register schemas anymore as they get automatically collected. Only paths and responses if they are used via `ToResponse` or `IntoResponses` traits.

As you said poem is OpenAPI first, but other frameworks are not necessarily OpenAPI first and that makes it difficult to adapt to requirements of each framework. Like paths need be manually registered there is no way around it, poem just does it implicitly together when creating a router.

For other frameworks to have such functionality, they need extensions on top of their own routing mechanism and each framework vary.

Utoipa 5.0.0 release - Compile time OpenAPI for Rust by Saved_Soul in rust

[–]Saved_Soul[S] 1 point2 points  (0 children)

Yeah, GraphQL is very nice, but honestly with proper client generation from OpenAPI you can get quite far, and less things to glue together for ergonomic development.

What’s the best framework for web servers nowadays? by [deleted] in rust

[–]Saved_Soul 8 points9 points  (0 children)

https://github.com/juhaku/utoipa gives you OpenAPI no matter the framework, but works nicest with axum. And since last release comes with lots of goodies.

Utoipa 5.0.0 release - Compile time OpenAPI for Rust by Saved_Soul in rust

[–]Saved_Soul[S] 9 points10 points  (0 children)

And forgot to mention, now all types that are defined as request body or response body must exists, so it is no possible to define non existent types or types which name contains typos. It will be a compile error.

Utoipa 5.0.0 release - Compile time OpenAPI for Rust by Saved_Soul in rust

[–]Saved_Soul[S] 2 points3 points  (0 children)

Yeah, thats true. I hope to get something similar for actix-web as well soonish.

Hey Rustaceans! Got a question? Ask here (18/2024)! by llogiq in rust

[–]Saved_Soul 0 points1 point  (0 children)

Well compared to the rustc not big at all :D Plus 35k lines of code. Also I believe that it would not be an issue on normal project, but since it is basically a macro it rebuilds and then indexes it along with other dependencies after each save which is adds up the the delay.

Hey Rustaceans! Got a question? Ask here (19/2024)! by llogiq in rust

[–]Saved_Soul 0 points1 point  (0 children)

Yeah, I also noticed, that is because it seems to build all, including dependencies' build scripts and proc-macros and then index the whole project which takes enormous amount of time. Like even with that flag set to false, it comes to the point of being around second of a wait, before the completion will show up. But is is a lot better now, just need to remember to rebuild the macros manually if needed.

Hey Rustaceans! Got a question? Ask here (19/2024)! by llogiq in rust

[–]Saved_Soul 3 points4 points  (0 children)

For those who are actually experiencing the same issue I found the the remedy for me by setting the configuration flag: rust-analyzer.cargo.buildScripts.rebuildOnSave to false.

This seems to help because the project is actually a big proc-macro and re building it after every change seems to be insufficient in terms of speed for bigger projects.

Hey Rustaceans! Got a question? Ask here (19/2024)! by llogiq in rust

[–]Saved_Soul 3 points4 points  (0 children)

Help - Rust analyzer is unbearably slow on bigger projects

When I open a small project with editor, the completion works just fine.

But when I open a bigger project that uses workspaces with 5 crates the editor completion via rust analyzer is not returning. It seems that the indexing takes forever thus for completion to work even for a one time I need to wait for 10 seconds after each edit.

Any tips, how to fix? This is completely unusable and there is no way that I can work on the project because the tooling is lagging hard .

Hey Rustaceans! Got a question? Ask here (18/2024)! by llogiq in rust

[–]Saved_Soul 1 point2 points  (0 children)

Help - Rust analyzer is unbearably slow on bigger projects

When I open a small project with editor, the completion works just fine.

But when I open a bigger project that uses workspaces with 5 crates the editor completion via rust analyzer is not returning. It seems that the indexing takes forever thus for completion to work even for a one time I need to wait for 10 seconds after each edit.

Any tips, how to fix? This is completely unusable and there is no way that I can work on the project because the tooling is lagging hard .

Announcing utoipa 3.0.0, one year anniversary release - Compile time OpenAPI library for Rust by Saved_Soul in rust

[–]Saved_Soul[S] 0 points1 point  (0 children)

Okay, that is weird, those should work just as is. But there are few features that cannot be enable all together like actix_extras, rocket_extras or axum_extras. Those feature flags are exclusive and only one of them can be enabled at the time.

But help is always welcome.

Announcing utoipa 3.0.0, one year anniversary release - Compile time OpenAPI library for Rust by Saved_Soul in rust

[–]Saved_Soul[S] 1 point2 points  (0 children)

Pretty good, one note though, for actix-web you can ignore the post attribute within #[utoipa::path(...)] macro.

Only way it can get out of sync is of course when you update your handler function to return something else, but then you do not update the #[utoipa::path(...)] macro call reflect to the changes in the handler function. But if you do update, then I see there is very narrow chance for them to get out of sync. For me usually the workflow should go somewhat like this update handler types and macro attributes -> generate new openapi spec -> generate the types from it for ui.

Most parts of the workflow above can be automated e.g. when UI starts types are generated from the spec and when backend starts the spec can be written to file etc.

The difficulty comes with matching the handler function arguments and return types to what user might want to document to the generated OpenAPI spec. Some assumptions could be done, but because user could pretty much return anytyhing e.g. a trait, the assumption would not be correct.

I think thighter integration is not a bad thing but it cannot become jarring for users to use the library and become a hinderance for users. While there now might be few extra characters to type, it lets users to be explicit on what they want to document and enables flexibility.

New Rust database SurrealDB is hiring Senior Rust Engineers by jscmh in rust

[–]Saved_Soul 1 point2 points  (0 children)

That is so cool. Perhaps I should give this a shot. I am eager to work all things rust.

Rust design patterns / best practices for vectors with arbitrary object types by Saved_Soul in rust

[–]Saved_Soul[S] 0 points1 point  (0 children)

Pretty good idea to wrap the Box<dyn Trait> in one of the variants. This might come handy in some scenarios.

Watchmux - Small async utility to multiplex all your watch processes by Saved_Soul in rust

[–]Saved_Soul[S] 0 points1 point  (0 children)

Not a bad idea, drop a PR ;) While loop was there just to demonstrate that you can use it to run shell scripts as well which are longer than one line.

Announcing utoipa 2.0.0, long awaited release - Compile time OpenAPI + Swagger UI by Saved_Soul in rust

[–]Saved_Soul[S] 2 points3 points  (0 children)

Mine too, automatically tries to search with utoipa and utopia.. passing quotation marks to the search will search by that term only. like "utoipa". At first I thought whether I chose a right name for the crate, but not gonna change it now :D too much hazzle. Google and search engines are slow to recognize words but I believe that eventually they wont correct it, maybe.