Rust

6049 readers
4 users here now

Welcome to the Rust community! This is a place to discuss about the Rust programming language.

Wormhole

[email protected]

Credits

  • The icon is a modified version of the official rust logo (changing the colors to a gradient and black background)

founded 1 year ago
MODERATORS
351
16
submitted 10 months ago by snaggen to c/rust
352
353
354
355
356
 
 

This library is responsible for federation in Lemmy, and can also be used by other Rust projects.

357
 
 

Version 5.1.0 of Kellnr, the private crate registry for Rust was just released. It features a new landing page, dependency updates and bug fixes.

Check it out, if you want to host crates on your own hardware!

358
33
submitted 11 months ago by snaggen to c/rust
359
11
submitted 11 months ago by snaggen to c/rust
360
 
 

who?

Hello! I'm Víctor (aka Brian3647), a 15-year- old self-taught spanish developer. I love rust & cats, and I hate JS. I've been working on this project for ~2.5 months now:

what?

Snowboard (https://github.com/Brian3647/snowboard) is a library written in rust made for creating http/https servers easily. It supports json*, websockets*, TLS*, async*, http request parsing & response generation. *: enabled by feature

why?

Some developers like me prefer a simple API that can be freely extended for your app over a big system of complex proc macros where you have no idea what or how is happening. Snowboard offers a simplistic API that gives freedom of use to the developer without any complication or headache. You code your server just like you want it to be.

should I use snowboard?

Give it a try! From what I've seen, some people like a lot this way of coding servers, whereas other people can't live without #[get("/")]. Use it or not, giving a star to the project is always appreciated :)

example program (as of 1.0.3):

use snowboard::{headers, response, Method, Result, Server};

fn main() -> Result {
    let server = Server::new("localhost:8080")?;

    println!("Listening on {}", server.pretty_addr()?);

    server.run(|req| {
        if req.method == Method::DELETE {
            return response!(method_not_allowed, "Caught you trying to delete!");
        }

        response!(ok, "Hello!", headers! { "X-Hello" => "World!" })
    })
}
361
113
Announcing Rust 1.75.0 (blog.rust-lang.org)
submitted 11 months ago by snaggen to c/rust
 
 

Traits now support async fn and -> impl Trait (with some limitations), the compiler got faster, version = in Cargo​.toml is now optional, and many small functions have been stabilized!

362
 
 

One of my new years' resolutions is to be able to be productive enough with Rust to start making contributions to Lemmy and/or to integrate part of the Fediverser project (specifically, the "login with Reddit" feature) into it.

But first steps first, and I want to make a simple web app where I can authenticate users against an LDAP database, and show some data only for authenticated users.

It seems that the most mature libraries for web development in Rust is still actix web (and also the one that Lemmy uses), but what about other parts? Is Tera a good option for someone who is already familiar with Jinja (and Django)? Most of the tutorials I found out are for using actix web mostly as a json API and leaves the frontend for specific javascript SPAs, but what if I want to do "old school" web pages?

363
 
 

Hi folks, this is a little article I wrote as a blueprint for building a structured concurrency API, which I aim to build with safe Rust in the future. I'm aware of thread scopes but do not know of something that provides composable and structured async. I wanted to have a strong foundation before implementing this. Please feel free to suggest ideas!

364
12
Rust Analyzer Changelog #213 (rust-analyzer.github.io)
submitted 11 months ago by snaggen to c/rust
365
41
submitted 11 months ago by lysdexic to c/rust
366
367
368
369
370
23
submitted 11 months ago by snaggen to c/rust
371
9
submitted 11 months ago by snaggen to c/rust
372
373
47
Rust is growing (flawless.dev)
submitted 11 months ago by snaggen to c/rust
374
15
Rust Analyzer Changelog #212 (rust-analyzer.github.io)
submitted 11 months ago by snaggen to c/rust
375
view more: ‹ prev next ›