Back to front pageView on Hacker News (opens in a new tab)Show HN: Rocket – Web Framework for Rust (opens in a new tab)rocket.rs484 pointsby sbenitez (on Hacker News)9 years agorocket.rs (opens in a new tab)Rocket - Simple, Fast, Type-Safe Web Framework for RustRocket is a web framework for the Rust programming language that makes it simple to write fast web applications without sacrificing flexibility or type safety.Comments (114) 25 threadsShow all commentsShowing thread 5 of 25[-]halestock9 years ago1 reply#Are dynamic params enforced at compile time? I.e. will the compiler ensure that the route "/" has a matching id parameter?[-]sbenitez9 years ago2 replies#Yes! Here's what happens when you don't do the right thing: error: 'id' is declared as an argument... --> src/main.rs:8:9 | 8 | #[get("/")] | ^^^^ error: ...but isn't in the function signature. --> src/main.rs:9:1 | 9 | fn hello() -> &'static str { | _^ starting here... 10 | | "Hello, world!" 11 | | } | |_^ ...ending herejtmarmon9 years ago#that is some truly incredible developer uxchrismorgan9 years ago#The span for the “...but isn't in the function signature” should be just the `()` rather than the whole function.
Show HN: Rocket – Web Framework for Rust (opens in a new tab)rocket.rs484 pointsby sbenitez (on Hacker News)9 years ago
halestock9 years ago1 reply#Are dynamic params enforced at compile time? I.e. will the compiler ensure that the route "/" has a matching id parameter?
sbenitez9 years ago2 replies#Yes! Here's what happens when you don't do the right thing: error: 'id' is declared as an argument... --> src/main.rs:8:9 | 8 | #[get("/")] | ^^^^ error: ...but isn't in the function signature. --> src/main.rs:9:1 | 9 | fn hello() -> &'static str { | _^ starting here... 10 | | "Hello, world!" 11 | | } | |_^ ...ending here
chrismorgan9 years ago#The span for the “...but isn't in the function signature” should be just the `()` rather than the whole function.
Comments (114) 25 threads
Show all comments
Showing thread 5 of 25