Segmentation fault directly running a

Running the example lib [ ] from via command line in the way I would a program, gives a simple 'Segmentation fault' error.

I wonder is not exactly as that should be; I was expecting it to either suggest that are unavailable as normal programs in their own right.. or that it would run in some graceful incomplete way.

No pun intended but my programming skills are rusty; so, I don't know if libraries are always simple standard reference programs just cast as lib or properly a different category.

Yeah, libraries aren't executables, so you shouldn't be able to run it. What exactly did you type in, and what platform are you on?

Linux Mint 17.0

$ cd ~/projects/embed/
$ ./target/debug/

Actually, they are (at least on linux): Why are shared libraries on Linux executable? - Server Fault. TIL...

Incidentally, the reason I was trying that followed from the exercise talking of use of Ruby and Python etc to action that library; and talk of gem rather than apt-get, didn't make it easier making another problem for that simple action of the library.

Better perhaps to illustrate a call from another Rust program?.. I expect there are enough instances I'll find one later but my attempt at it, didn't work immediately.. lots to learn.


I assume you mean execute. This section isn't about executing a library itself, it's about calling individual functions defined inside of the library.

Better perhaps to illustrate a call from another Rust program?

This section is about calling rust functions from other languages, not rust from rust. Also, the sections immediately following the one you linked explain how to use from other languages.