Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Aug 14 2017 05:33
    ducks commented #21
  • Aug 14 2017 05:16
    ducks synchronize #21
  • Aug 13 2017 17:40
    ducks commented #21
  • Aug 12 2017 00:04
    withoutboats commented #21
  • Aug 11 2017 17:05
    ducks opened #21
  • Aug 11 2017 17:04
    ducks opened #20
  • Jul 22 2017 22:36
    withoutboats closed #19
  • Jul 22 2017 22:36
    withoutboats commented #19
  • Jul 22 2017 22:35

    withoutboats on 0.2-release

    Update version. (compare)

  • Jul 22 2017 22:34

    withoutboats on master

    Update version. (compare)

  • Jul 22 2017 22:33

    withoutboats on 0.2-release

    Update README. Fix broken doc link. (#9) Print address the server is run… and 3 more (compare)

  • Jul 18 2017 16:38
    bovee opened #19
  • Jun 28 2017 00:32

    withoutboats on master

    Add CpuPool support. Try to make the tests less flak… (compare)

  • Jun 28 2017 00:32
    withoutboats closed #17
  • Jun 28 2017 00:24
    withoutboats synchronize #17
  • Jun 28 2017 00:24

    withoutboats on cpupool

    Try to make the tests less flak… (compare)

  • Jun 27 2017 21:46
    withoutboats synchronize #17
  • Jun 27 2017 21:46

    withoutboats on cpupool

    Add CpuPool support. (compare)

  • Jun 27 2017 21:45

    withoutboats on master

    Update lalrpop. (compare)

  • Jun 27 2017 21:45
    withoutboats closed #18
Aaron Turon
@aturon
o/
Niko Matsakis
@nikomatsakis
:wave:
:)
boats
@withoutboats
Haha hey
Will Hipschman
@whipsch
this looks pretty sweet so far, nice work!
Taylor Cramer
@cramertj
👏 nice-- I'm excited to try it out!
Will Hipschman
@whipsch
in the future, could Index/GetMany be changed to yield a Stream of resources instead of a Vec?
boats
@withoutboats
@whipsch I started with that actually, but found two things: a) most formats needed them to be collected into a vec anyway, b) if the backing service you use gives you a Future<Vec<_>>, unfolding that into a stream was a real pain
Probably there will be alternative methods someday (and users can define their own methods any time) which return streams, like StreamingIndex
Pyry Kontio
@golddranks
Hi, congrats for the announcement! Unlike many other frameworks, this doesn't seem to be using Hyper? Does it implement HTTP from scratch?
boats
@withoutboats
@golddranks It does use hyper; it uses (a fork of) the master branch that's on tokio
boats
@withoutboats
What I'm working on next: cargonauts-rs/cargonauts#12
This lets users run tasks on a CPU pool and will soon also support depending on services there's only a blocking API for (Diesel for example)
Mohammad Farhan Husain
@russoue
Great work so far!
boats
@withoutboats
@russoue Thanks!
Pyry Kontio
@golddranks
I'm starting a little project that seems like Cargonauts would fit it: serving resources from a database over a JSON API, no other kind of requests. What are future prospects of Cargonauts like? I wonder if I should still go with another framework as for now, since even if.the use case seems to fit perfectly, Cargonauts seems to be quite young?
boats
@withoutboats
@golddranks How "mission critical" is the project? What features of JSON API do you require?
It could be a good fit, basically
Pyry Kontio
@golddranks
It's going to be a small-scale company internal system to keep some information up to date. Inside an intranet (no external attack vectors, no external users, not super mission critical). Some 100 daily users at max. However, I already started with Rocket. I feel that Cargonauts would've been a better fit indeed, but for now I went with Rocket. Thanks anyway!
boats
@withoutboats
aww, good luck. sorry i didn't check this sooner, would've good to the get more user feedback
Owen Nelson
@onelson

Working on a (literal?) toy app - taking cargonauts for a spin. Think this is likely a documentation problem, but thought I'd ask.

routes! {
    resource Zone as "zones" {
        method Get in Debug;
    }

    resource Category as "categories" {
        method Get in Debug;
    }

    resource Collectible as "collectibles"{
        method Get in Debug;

    }
}

When I have more than one resource listed in the routes macro, the compiler gets real mad:

error[E0277]: the trait bound `resources::collectible::Collectible: cargonauts::routing::Endpoint<cargonauts::formats::SimpleDebug, cargonauts::methods::Get<Identifier=u32>, _, _, _>` is not satisfied
  --> src/routing.rs:13:1
   |
13 | / routes! {
14 | |     resource Zone as "zones" {
15 | |         method Get in Debug;
16 | |     }
...  |
25 | |     }
26 | | }
   | |_^ the trait `cargonauts::routing::Endpoint<cargonauts::formats::SimpleDebug, cargonauts::methods::Get<Identifier=u32>, _, _, _>` is not implemented for `resources::collectible::Collectible`
   |
   = note: required because of the requirements on the impl of `cargonauts::server::Service` for `cargonauts::routing::EndpointService<_, _, resources::collectible::Collectible, cargonauts::formats::SimpleDebug, cargonauts::methods::Get<Identifier=u32>, _>`
   = note: required for the cast to the object type `cargonauts::server::Service<Future=std::boxed::Box<cargonauts::<unnamed>::Future<Item=cargonauts::server::Response, Error=cargonauts::server::Error>>, Error=cargonauts::server::Error, Request=cargonauts::middleware::Request, Response=cargonauts::server::Response>`
   = note: this error originates in a macro outside of the current crate
If I comment out any 2 of the 3 resources, it compiles well.
I'll take a look at the macro def tomorrow. Maybe I'll learn something there.
Owen Nelson
@onelson
It looks like the tests for the route parser only check a single resource, so maybe this is a known issue.
boats
@withoutboats
@onelson sorry I didn't reply sooner
it definitely should accept multiple resources, and I assume all of the types implement Get and Debug
boats
@withoutboats
@onelson I have reproduced it. Oh no!
This needs to work. I'm very busy this week with RFC stuff & non-programming, but I'm definitely going to make this a priority.
boats
@withoutboats
Yes, it appears that cargonauts fails to generate the necessary glue code for any but the first resource. Bad!
Owen Nelson
@onelson
@withoutboats no worries on response times. I get it. Glad it's reproducible.
or not glad
anyway
Owen Nelson
@onelson
I took a look around the macro source, but found it a bit tricky to parse (forgive the pun)
thought I might be able to offer a patch, but I think I may have to level up some before I'm able to follow it's working.
boats
@withoutboats
@onelson don't worry, its a stack of bad hacks. somewhere in that stack there is a bug but I haven't nailed it down yet.
onelson @onelson nods
Ghost
@ghost~56ba344de610378809c0a277
I like the concept of cargonauts. @withoutboats : Are you planning to work more on it eventually?
boats
@withoutboats
@snadon: Yes eventually! But I would be surprised if I did anything on it at all in the next 6 months
focusing on Rust 2018 until its released :smile:
John W.
@TrustTheRust
ping