News for hackers. Stuff that matters.
Re:SoundStream – A simple-as-possible, fast audio I/O stream... by shadowmint on Saturday November 29, 2014 @10:53AM (#8674024)
This is neat, but...

> SoundStream requires that you have the PortAudio lib installed on your system

Meh.

Theres really no excuse, given cargo now has proper support for building cross platform dependencies.

My least favourite thing about rust is trying to use a crate only to find 'author assumed you already had dependencies installed. sorry'

Re:SoundStream – A simple-as-possible, fast audio I/O stream... by rcxdude on Saturday November 29, 2014 @11:25AM (#8674121)
Compiling external dependencies is non-trivial, even though cargo gives the bare minimum of tools to make it possible. I think it's unreasonable to expect rust to construct it's own replica of distribution's packages for C/C++ code. To my knowledge no other language has a package manager or repository which does this, or even attempts to.
Re:SoundStream – A simple-as-possible, fast audio I/O stream... by shadowmint on Saturday November 29, 2014 @11:20PM (#8675969)
Cargo's build system doesn't have to build the dependencies, it just has to resolve them somehow.

That can be via package manager, pkg-config, static library download, building them, or via prompting the user to install them manually.

Since rust supports the #[cfg(target="foo")] in build scripts, you can even implement your solution for just one platform, and then slowly add additional platform support as people demand it.

A message like: "Hey, your platform isn't supported by our build script; submit a bug at ... if you'd like to get support added. We welcome push requests". <-- A+++

For example, android support is probably not a target for most crates, but it may be an important target in the future for many libraries. ...and building a cross-compiled android binary is a LOT more involved than just an 'apt-get install foo'.

Just failing? Nope.

Re:SoundStream – A simple-as-possible, fast audio I/O stream... by mitchmindtree on Saturday November 29, 2014 @11:30AM (#8674141)
I know what you mean.

I've talked with the author of the PortAudio bindings and we're planning on including a static lib with the repo instead (along with a cargo build script), so that should hopefully make it as easy to use as any other crate.

Re:SoundStream – A simple-as-possible, fast audio I/O stream... by FreeFull on Sunday November 30, 2014 @12:11PM (#8677295)
Could a config option be used to make the bindings still use the system's portaudio if it's already there? Or will it actually check if portaudio is installed before building its own?
Re:SoundStream – A simple-as-possible, fast audio I/O stream... by mitchmindtree on Sunday November 30, 2014 @12:51PM (#8677440)
Hopefully this is doable! I believe Jeremy's currently having a go at getting a build script working that will:

1. check if PA is already installed 2. if not, will download and install PA.

The pull request is open and is here if you(/anyone) want to check it out / comment / contribute:

https://github.com/jeremyletang/rust-portaudio/pull/37

Re:SoundStream – A simple-as-possible, fast audio I/O stream... by gkoz on Saturday November 29, 2014 @01:29PM (#8674575)
Your least favourite thing is having to {apt-get|yum|pkg|whatever} install somelib[-dev]?
Re:SoundStream – A simple-as-possible, fast audio I/O stream... by shadowmint on Saturday November 29, 2014 @11:09PM (#8675956)
Astonishingly, some people don't use linux.
Re:SoundStream – A simple-as-possible, fast audio I/O stream... by ianlevesque on Saturday November 29, 2014 @11:12AM (#8674087)
Every distribution has common libraries in its package manager.