pistondevelopers / piston-examples Goto Github PK
View Code? Open in Web Editor NEWA collection of examples using the Piston game engine
License: MIT License
A collection of examples using the Piston game engine
License: MIT License
How to manipulate a RGBA image and update a texture in real time.
This might require updates to opengl_graphics.
It is hard to find out how to use those, took me a while to realize you need to do for e in window.events().max_fps(120).ups(60) {
, and I still don't know where you can see the other methods.
One thing I didn't thought about, was that gfx-rs needs to be initialized slighty different under Piston by calling let (mut device, frame) = window.gfx();
.
Just posting this here so you don't need to read through the logs.
The music
example fails to build because rust-sdl2_mixer points to an old version of rust-sdl2 on crates.io. To fix this problem I suggested earlier to sdl2 to the git (also to keep effects of breaking changes more managable).
Waiting for andelf/rust-sdl2_mixer#18
These belongs to the gfx_graphics examples https://github.com/PistonDevelopers/gfx_graphics/tree/master/assets
This happens on my machine, but I don't have time to check it closer at the moment.
Probably something to do with the GLFW back-end.
https://gist.github.com/ttohin/c5fe3be6e35983b4fe4e
โ paint git:(master) uname -a Darwin Antons-MacBook-Pro-2.local 13.4.0 Darwin Kernel Version 13.4.0: Sun Aug 17 19:50:11 PDT 2014; root:xnu-2422.115.4~1/RELEASE_X86_64 x86_64 โ paint git:(master) rustc -v rustc 0.12.0-nightly (9508faa22 2014-09-17 23:45:36 +0000)
Hey guys, I've been looking to start learning rust by creating small project for fun and found this awesome GUI library, but unfortunately examples do not compile..
first error which I get is:
all_widgets.rs:48:5: 48:11 error: unresolved import event::Render
. There is no Render
in event
I did some investigation and I think Render was renamed to RenderEvent(given that I have really poor rust knowledge) but I'm not sure how to really fix this..
Could be activated when pressing C
or something.
Can use the new camera features in Piston.
hgl is deprecated and will be replaced by gfx-rs.
Hey all,
After trying to build gfx_cube, I receive this error:
[andre@localhost gfx_cube]$ cargo build
Compiling piston-example-gfx_cube v0.0.0 (file:///home/andre/Workspace/rust/piston-examples/gfx_cube)
src/main.rs:107:17: 107:32 error: type `gfx::render::target::Frame<_>` does not implement any method in scope named `new`
src/main.rs:107 let frame = gfx::Frame::new(win_width as u16, win_height as u16);
^~~~~~~~~~~~~~~
error: aborting due to previous error
Could not compile `piston-example-gfx_cube`.
I was reading through the gfx source and it looks like empty() should be being called:
https://github.com/gfx-rs/gfx-rs/blob/master/src/render/target.rs
I tried changing the code from:
let frame = gfx::Frame::new(win_width as u16, win_height as u16);
to:
let frame = gfx::Frame::empty(win_width as u16, win_height as u16);
Then ran cargo build
again. It compiled without issues.
However, it gives this when running:
[andre@localhost gfx_cube]$ cargo build
Compiling piston-example-gfx_cube v0.0.0 (file:///home/andre/Workspace/rust/piston-examples/gfx_cube)
[andre@localhost gfx_cube]$ cargo run
Running `target/debug/piston-example-gfx_cube`
thread '<main>' panicked at 'assertion failed: output.get_mask().contains(mask)', /home/andre/.cargo/git/checkouts/gfx-rs-93bce98024942039/master/src/render/mod.rs:187
An unknown error occurred
I don't think I know enough about Rust yet to see the problem. Why is the assertion failing? I don't see where the issue is stemming from. Excited to learn though :)
If I am doing anything wrong (or right) in submitting an issue this way please let me know. I'm pretty new to github, open source projects, and Rust, so tips/tricks/advice is more than appreciated. Thanks!
I'm trying to run the examples but I always get these errors.
Steps to reproduce:
$git clone https://github.com/PistonDevelopers/piston-examples`
$cd piston-examples/paint
$cargo build
rust and cargo version
$rustc -V
rustc 1.0.0-dev (610d1695d 2015-02-25) (built 2015-02-26)
$cargo -V
cargo 0.0.1-pre (5773064 2015-02-25) (built 2015-02-26)
Error log
^~~~~~
/home/lee/.cargo/git/checkouts/quack-5c2e81a611f5edcd/master/src/lib.rs:1:9: 1:21 note: lint level defined here
/home/lee/.cargo/git/checkouts/quack-5c2e81a611f5edcd/master/src/lib.rs:1 #![deny(missing_docs)]
^~~~~~~~~~~~
/home/lee/.cargo/git/checkouts/quack-5c2e81a611f5edcd/master/src/lib.rs:40:10: 40:16 error: missing documentation for an associated type
/home/lee/.cargo/git/checkouts/quack-5c2e81a611f5edcd/master/src/lib.rs:40 type Result;
^~~~~~
/home/lee/.cargo/git/checkouts/quack-5c2e81a611f5edcd/master/src/lib.rs:1:9: 1:21 note: lint level defined here
/home/lee/.cargo/git/checkouts/quack-5c2e81a611f5edcd/master/src/lib.rs:1 #![deny(missing_docs)]
^~~~~~~~~~~~
/home/lee/.cargo/git/checkouts/quack-5c2e81a611f5edcd/master/src/lib.rs:59:10: 59:14 error: missing documentation for an associated type
/home/lee/.cargo/git/checkouts/quack-5c2e81a611f5edcd/master/src/lib.rs:59 type Data;
^~~~
/home/lee/.cargo/git/checkouts/quack-5c2e81a611f5edcd/master/src/lib.rs:1:9: 1:21 note: lint level defined here
/home/lee/.cargo/git/checkouts/quack-5c2e81a611f5edcd/master/src/lib.rs:1 #![deny(missing_docs)]
^~~~~~~~~~~~
/home/lee/.cargo/git/checkouts/quack-5c2e81a611f5edcd/master/src/lib.rs:60:10: 60:16 error: missing documentation for an associated type
/home/lee/.cargo/git/checkouts/quack-5c2e81a611f5edcd/master/src/lib.rs:60 type Object;
^~~~~~
/home/lee/.cargo/git/checkouts/quack-5c2e81a611f5edcd/master/src/lib.rs:1:9: 1:21 note: lint level defined here
/home/lee/.cargo/git/checkouts/quack-5c2e81a611f5edcd/master/src/lib.rs:1 #![deny(missing_docs)]
^~~~~~~~~~~~
error: aborting due to 4 previous errors
Could not compile `gl_generator`.
I am trying to run the image example on ubuntu 14.04.1. I have intel integrated graphics, and am running the i3 window manager. I downloaded cargo and rust from nightly repos this morning, and after installing some dependencies everything seems to build fine. When I run "cargo run", the screen flickers and I get an error:
awagner@ash:/home/awagner/src/rust/piston-examples/image
$ cargo run
Running `target/piston-example-image`
task '<main>' panicked at 'called `Result::unwrap()` on an `Err` value: Could not create GL context', /home/rustbuild/src/rust-buildbot/slave/nightly-linux/build/src/libcore/result.rs:787
An unknown error occurred
Any ideas? Thanks!
According to http://crates.io/faq.html#why-do-binaries-have-cargo.lock-in-version-control,-but-not-libraries? the convention is to checkin lockfiles for executables.
If we check in lockfiles for each of these examples then the only thing we have to worry about breaking builds is breaking changes from the nightlies. On the other hand fixing versions for Piston dependencies will likely lead to examples getting out of date.
I'm leaning towards adding them.
I installed SDL2-mixer with brew install sdl2_mixer
.
The 'music' example only opens up the 'piano.wav' file and when it plays, it sounds like the piano is drowning :)
Something is wrong with the gfx_cube example.
Should demonstrate how to use DeformGrid and how to draw a deformed image.
Can use the logo of Rust.
This has been broken for a while and can be added back when sdl2_mixer gets updated.
This could be used to test different draw states when the back-ends supports this.
looking at the travis build confirms this. an example of the issue:
[deform]$ cargo run
Compiling deform v0.0.1 (file:///mnt/Projects/piston-examples/deform)
src/main.rs:17:5: 17:14 error: unresolved import `graphics::AddBorder`. There is no `AddBorder` in `graphics`
src/main.rs:17 AddBorder,
^~~~~~~~~
src/main.rs:18:5: 18:15 error: unresolved import `graphics::AddEllipse`. There is no `AddEllipse` in `graphics`
src/main.rs:18 AddEllipse,
^~~~~~~~~~
src/main.rs:19:5: 19:17 error: unresolved import `graphics::AddRectangle`. There is no `AddRectangle` in `graphics`
src/main.rs:19 AddRectangle,
^~~~~~~~~~~~
src/main.rs:20:5: 20:13 error: unresolved import `graphics::AddColor`. There is no `AddColor` in `graphics`
src/main.rs:20 AddColor,
^~~~~~~~
src/main.rs:21:5: 21:9 error: unresolved import `graphics::Draw`. There is no `Draw` in `graphics`
src/main.rs:21 Draw,
^~~~
error: aborting due to 5 previous errors
Could not compile `deform`.
The version of gfx they're using doesn't work with the latest rustc nightly. Investigating now.
Should load font from assets folder and display a text "hello world!" with PistonWindow
.
rustc 1.0.0-nightly (d3732a12e 2015-02-06 23:30:17 +0000)
See PistonDevelopers/sdl2_window#99
It might be a possibility that SDL2 sends key up with repeated events and that this gets filtered out by sdl2_window.
Use the user_input example to test:
I think the the high level library is at a state where it needs more widespread testing. See PistonDevelopers/piston#780
Start with translating one example, choosing "deform".
Since the drag controller has been moved into his own repo we need to update the dependencies in Cargo.toml
Should use Cargo instead.
These are almost identical to the examples in the gfx-rs repo. The effort of keeping those up to date with gfx-rs (which is currently very unstable) can be put into gfx-rs instead.
See PistonDevelopers/conrod#326
As you move the mouse around in the inner window space, the mouse cursor position displayed in the illustration should correspond to the actual position. My moving the cursor from the upper left corner and down to the right corner, one can test if the position is correct.
Trying to build the image example fails to build. Building from a fresh clone of the repository:
(This is the --verbose output, it only added the last line and the Running statement. The huuuuuuuge linker error is out of my depth)
Compiling piston-example-image v0.0.0 (file:///Users/matthew_backup/Documents/Source/Rust/piston-examples/image)
Running `rustc src/main.rs --crate-name piston-example-image --crate-type bin -g --out-dir /Users/matthew_backup/Documents/Source/Rust/piston-examples/image/target --emit=dep-info,link -L dependency=/Users/matthew_backup/Documents/Source/Rust/piston-examples/image/target -L dependency=/Users/matthew_backup/Documents/Source/Rust/piston-examples/image/target/deps --extern opengl_graphics=/Users/matthew_backup/Documents/Source/Rust/piston-examples/image/target/deps/libopengl_graphics-260a9853b5ecfc35.rlib --extern piston=/Users/matthew_backup/Documents/Source/Rust/piston-examples/image/target/deps/libpiston-cf0b9246e576d5a8.rlib --extern graphics=/Users/matthew_backup/Documents/Source/Rust/piston-examples/image/target/deps/libgraphics-cd35fd533060ceba.rlib --extern sdl2_window=/Users/matthew_backup/Documents/Source/Rust/piston-examples/image/target/deps/libsdl2_window-22a4c5256667aa13.rlib`
error: linking with `cc` failed: exit code: 1
note: "cc" '"-m64"' '"-L"' '"/usr/local/lib/rustlib/x86_64-apple-darwin/lib"' '"-o"' '"/Users/matthew_backup/Documents/Source/Rust/piston-examples/image/target/piston-example-image"' '"/Users/matthew_backup/Documents/Source/Rust/piston-examples/image/target/piston-example-image.o"' '"-Wl,-force_load,/usr/local/lib/rustlib/x86_64-apple-darwin/lib/libmorestack.a"' '"-Wl,-dead_strip"' '"-nodefaultlibs"' '"/Users/matthew_backup/Documents/Source/Rust/piston-examples/image/target/deps/libpiston-cf0b9246e576d5a8.rlib"' '"/Users/matthew_backup/Documents/Source/Rust/piston-examples/image/target/deps/libopengl_graphics-260a9853b5ecfc35.rlib"' '"/Users/matthew_backup/Documents/Source/Rust/piston-examples/image/target/deps/libgraphics-cd35fd533060ceba.rlib"' '"/Users/matthew_backup/Documents/Source/Rust/piston-examples/image/target/deps/libfreetype-b7a92a5d6c27962a.rlib"' '"/Users/matthew_backup/Documents/Source/Rust/piston-examples/image/target/deps/libinterpolation-88c07f574197b895.rlib"' '"/Users/matthew_backup/Documents/Source/Rust/piston-examples/image/target/deps/libevent-ee7e45b1a66bf546.rlib"' '"/Users/matthew_backup/Documents/Source/Rust/piston-examples/image/target/deps/libvecmath-4b9e8c05387d4953.rlib"' '"/Users/matthew_backup/Documents/Source/Rust/piston-examples/image/target/deps/libfreetype-sys-c921b90ba76193dc.rlib"' '"/Users/matthew_backup/Documents/Source/Rust/piston-examples/image/target/deps/libsdl2_window-22a4c5256667aa13.rlib"' '"/Users/matthew_backup/Documents/Source/Rust/piston-examples/image/target/deps/libshader_version-d21e61aa76031c6b.rlib"' '"/Users/matthew_backup/Documents/Source/Rust/piston-examples/image/target/deps/libevent_loop-de9bbe63d5853b00.rlib"' '"/Users/matthew_backup/Documents/Source/Rust/piston-examples/image/target/deps/libimage-db9601ef809838be.rlib"' '"/Users/matthew_backup/Documents/Source/Rust/piston-examples/image/target/deps/libtexture-d4ce7c5d490380ef.rlib"' '"/usr/local/lib/rustlib/x86_64-apple-darwin/lib/libflate-4e7c5e5c.rlib"' '"/Users/matthew_backup/Documents/Source/Rust/piston-examples/image/target/deps/libsdl2-6021737ef1848d37.rlib"' '"/Users/matthew_backup/Documents/Source/Rust/piston-examples/image/target/deps/libsdl2-sys-575e71e989a3ffda.rlib"' '"/Users/matthew_backup/Documents/Source/Rust/piston-examples/image/target/deps/libclock_ticks-14c6a462c89c947f.rlib"' '"/Users/matthew_backup/Documents/Source/Rust/piston-examples/image/target/deps/libgl-e7cbd6900897b91d.rlib"' '"/Users/matthew_backup/Documents/Source/Rust/piston-examples/image/target/deps/libgl_common-ba78e2ee345cf946.rlib"' '"/Users/matthew_backup/Documents/Source/Rust/piston-examples/image/target/deps/libwindow-8b91e5178f1bcb9d.rlib"' '"/Users/matthew_backup/Documents/Source/Rust/piston-examples/image/target/deps/libquack-3057c6f84d373c14.rlib"' '"/Users/matthew_backup/Documents/Source/Rust/piston-examples/image/target/deps/libinput-9035684da0314340.rlib"' '"/Users/matthew_backup/Documents/Source/Rust/piston-examples/image/target/deps/libbitflags-518ea12e21428edd.rlib"' '"/Users/matthew_backup/Documents/Source/Rust/piston-examples/image/target/deps/libnum-a6e46b90b15ecd00.rlib"' '"/Users/matthew_backup/Documents/Source/Rust/piston-examples/image/target/deps/librustc-serialize-ebc743271f9255aa.rlib"' '"/Users/matthew_backup/Documents/Source/Rust/piston-examples/image/target/deps/librand-1a237188f461fee5.rlib"' '"/Users/matthew_backup/Documents/Source/Rust/piston-examples/image/target/deps/liblibc-8d21de95f4de7169.rlib"' '"/Users/matthew_backup/Documents/Source/Rust/piston-examples/image/target/deps/libread_color-b5ea21c50dad9d6f.rlib"' '"/usr/local/lib/rustlib/x86_64-apple-darwin/lib/libstd-4e7c5e5c.rlib"' '"/usr/local/lib/rustlib/x86_64-apple-darwin/lib/libcollections-4e7c5e5c.rlib"' '"/usr/local/lib/rustlib/x86_64-apple-darwin/lib/libunicode-4e7c5e5c.rlib"' '"/usr/local/lib/rustlib/x86_64-apple-darwin/lib/librand-4e7c5e5c.rlib"' '"/usr/local/lib/rustlib/x86_64-apple-darwin/lib/liballoc-4e7c5e5c.rlib"' '"/usr/local/lib/rustlib/x86_64-apple-darwin/lib/liblibc-4e7c5e5c.rlib"' '"/usr/local/lib/rustlib/x86_64-apple-darwin/lib/libcore-4e7c5e5c.rlib"' '"-L"' '"/Users/matthew_backup/Documents/Source/Rust/piston-examples/image/target"' '"-L"' '"/Users/matthew_backup/Documents/Source/Rust/piston-examples/image/target/deps"' '"-L"' '"/usr/local/lib/rustlib/x86_64-apple-darwin/lib"' '"-L"' '"/Users/matthew_backup/Documents/Source/Rust/piston-examples/image/.rust/lib/x86_64-apple-darwin"' '"-L"' '"/Users/matthew_backup/Documents/Source/Rust/piston-examples/image/lib/x86_64-apple-darwin"' '"-lfreetype"' '"-lSDL2"' '"-lSDL2"' '"-lc"' '"-lm"' '"-lSystem"' '"-lpthread"' '"-lc"' '"-lm"' '"-lcompiler-rt"'
note: ld: warning: directory not found for option '-L/Users/matthew_backup/Documents/Source/Rust/piston-examples/image/.rust/lib/x86_64-apple-darwin'
ld: warning: directory not found for option '-L/Users/matthew_backup/Documents/Source/Rust/piston-examples/image/lib/x86_64-apple-darwin'
ld: library not found for -lSDL2
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: aborting due to previous error
Could not compile `piston-example-image`.
Caused by:
Process didn't exit successfully: `rustc src/main.rs --crate-name piston-example-image --crate-type bin -g --out-dir /Users/matthew_backup/Documents/Source/Rust/piston-examples/image/target --emit=dep-info,link -L dependency=/Users/matthew_backup/Documents/Source/Rust/piston-examples/image/target -L dependency=/Users/matthew_backup/Documents/Source/Rust/piston-examples/image/target/deps --extern opengl_graphics=/Users/matthew_backup/Documents/Source/Rust/piston-examples/image/target/deps/libopengl_graphics-260a9853b5ecfc35.rlib --extern piston=/Users/matthew_backup/Documents/Source/Rust/piston-examples/image/target/deps/libpiston-cf0b9246e576d5a8.rlib --extern graphics=/Users/matthew_backup/Documents/Source/Rust/piston-examples/image/target/deps/libgraphics-cd35fd533060ceba.rlib --extern sdl2_window=/Users/matthew_backup/Documents/Source/Rust/piston-examples/image/target/deps/libsdl2_window-22a4c5256667aa13.rlib` (status=101)
Rust version:
rustc 1.0.0-nightly (2b01a37ec 2015-02-21) (built 2015-02-21)
binary: rustc
commit-hash: 2b01a37ec38db9301239f0c0abcf3c695055b0ff
commit-date: 2015-02-21
build-date: 2015-02-21
host: x86_64-apple-darwin
release: 1.0.0-nightly
Running the "user_input" example https://github.com/PistonDevelopers/piston-examples/blob/master/user_input/src/main.rs
On OSX 10.9.5, I get this with Glutin:
SDL2:
rustc 1.0.0-nightly (3e4be02b8 2015-03-13) (built 2015-03-13)
src/main.rs:179:24: 179:66 error: type `gfx::device::handle::Buffer<gfx_device_gl::GlResources, u8>` does not implement any method in scope named `to_slice`
src/main.rs:179 .to_slice(gfx::PrimitiveType::TriangleList);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
error: aborting due to previous error
Could not compile `piston-example-cube`.
This might be a bug introduced in FPS controller when porting code from Hematite to Piston.
This should show how to combine Piston and gfx-rs.
me@me-desktop ~/projects/piston-examples/freetype $ cargo run -v
Fresh piston-texture v0.0.1 (https://github.com/pistondevelopers/texture#3cc4cddc)
Fresh rustc-serialize v0.3.12
Fresh khronos_api v0.0.5 (https://github.com/bjz/gl-rs#01d90486)
Fresh pkg-config v0.3.3
Fresh interpolation v0.0.5 (https://github.com/PistonDevelopers/interpolation#feccc5ae)
Fresh vecmath v0.0.21 (https://github.com/PistonDevelopers/vecmath#97df17c6)
Fresh libc v0.1.6
Fresh bitflags v0.1.1
Fresh piston-shaders_graphics2d v0.0.0 (https://github.com/pistondevelopers/shaders#a2cbd6c6)
Fresh read_color v0.0.2 (https://github.com/PistonDevelopers/read_color#568723fb)
Fresh piston-viewport v0.0.1 (https://github.com/pistondevelopers/viewport#eada562f)
Fresh khronos_api v0.0.5
Fresh shader_version v0.0.6 (https://github.com/pistondevelopers/shader_version#14aa73be)
Fresh byteorder v0.3.8
Fresh clock_ticks v0.0.5 (https://github.com/tomaka/clock_ticks#46284873)
Fresh gl_common v0.0.4 (https://github.com/bjz/gl-rs#01d90486)
Fresh log v0.3.1
Fresh xml-rs v0.1.23
Fresh draw_state v0.0.7 (https://github.com/gfx-rs/draw_state#44a0aed1)
Fresh rand v0.3.7
Fresh gl_generator v0.0.24 (https://github.com/bjz/gl-rs#01d90486)
Fresh libz-sys v0.1.2
Compiling freetype-rs v0.0.8 (https://github.com/PistonDevelopers/freetype-rs#db8aeba1)
Running `rustc /home/me/.cargo/git/checkouts/freetype-rs-c8982864246c3c28/master/src/lib.rs --crate-name freetype --crate-type lib -g -C metadata=524c167feab079d0 -C extra-filename=-524c167feab079d0 --out-dir /home/me/projects/piston-examples/freetype/target/debug/deps --emit=dep-info,link -L dependency=/home/me/projects/piston-examples/freetype/target/debug/deps -L dependency=/home/me/projects/piston-examples/freetype/target/debug/deps --extern freetype_sys=/home/me/projects/piston-examples/freetype/target/debug/deps/libfreetype_sys-2aab8adbd3e99192.rlib --extern bitflags=/home/me/projects/piston-examples/freetype/target/debug/deps/libbitflags-518ea12e21428edd.rlib --extern libc=/home/me/projects/piston-examples/freetype/target/debug/deps/liblibc-9b7976990ae0dbd4.rlib --extern num=/home/me/projects/piston-examples/freetype/target/debug/deps/libnum-29c6b2a43c9c5d9c.rlib -Awarnings -L native=/usr/lib/x86_64-linux-gnu -L native=/usr/lib/x86_64-linux-gnu`
Compiling sdl2 v0.2.1 (https://github.com/AngryLawyer/rust-sdl2#10dfe7b4)
Running `rustc /home/me/.cargo/git/checkouts/rust-sdl2-8facfb557b6c1670/master/src/sdl2/lib.rs --crate-name sdl2 --crate-type lib -g --cfg feature="default" -C metadata=1a39a45df66e2b38 -C extra-filename=-1a39a45df66e2b38 --out-dir /home/me/projects/piston-examples/freetype/target/debug/deps --emit=dep-info,link -L dependency=/home/me/projects/piston-examples/freetype/target/debug/deps -L dependency=/home/me/projects/piston-examples/freetype/target/debug/deps --extern num=/home/me/projects/piston-examples/freetype/target/debug/deps/libnum-29c6b2a43c9c5d9c.rlib --extern sdl2_sys=/home/me/projects/piston-examples/freetype/target/debug/deps/libsdl2_sys-d7f743c9ce0e9bca.rlib --extern bitflags=/home/me/projects/piston-examples/freetype/target/debug/deps/libbitflags-518ea12e21428edd.rlib --extern rand=/home/me/projects/piston-examples/freetype/target/debug/deps/librand-7b0a3af7ae4685dc.rlib --extern libc=/home/me/projects/piston-examples/freetype/target/debug/deps/liblibc-9b7976990ae0dbd4.rlib -Awarnings`
Compiling pistoncore-window v0.1.1 (https://github.com/pistondevelopers/window#7d050603)
Running `rustc /home/me/.cargo/git/checkouts/window-9dac4f324a050427/master/src/lib.rs --crate-name window --crate-type lib -g -C metadata=57a99acdb2036bd8 -C extra-filename=-57a99acdb2036bd8 --out-dir /home/me/projects/piston-examples/freetype/target/debug/deps --emit=dep-info,link -L dependency=/home/me/projects/piston-examples/freetype/target/debug/deps -L dependency=/home/me/projects/piston-examples/freetype/target/debug/deps --extern libc=/home/me/projects/piston-examples/freetype/target/debug/deps/liblibc-9b7976990ae0dbd4.rlib --extern input=/home/me/projects/piston-examples/freetype/target/debug/deps/libinput-72587ab52722802f.rlib -Awarnings`
Fresh num v0.1.23
Compiling gl v0.0.12 (https://github.com/bjz/gl-rs#01d90486)
Running `rustc /home/me/.cargo/git/checkouts/gl-rs-5020f97825182d66/master/gl/src/lib.rs --crate-name gl --crate-type lib -g -C metadata=68546995ca960fc2 -C extra-filename=-68546995ca960fc2 --out-dir /home/me/projects/piston-examples/freetype/target/debug/deps --emit=dep-info,link -L dependency=/home/me/projects/piston-examples/freetype/target/debug/deps -L dependency=/home/me/projects/piston-examples/freetype/target/debug/deps --extern libc=/home/me/projects/piston-examples/freetype/target/debug/deps/liblibc-9b7976990ae0dbd4.rlib --extern gl_common=/home/me/projects/piston-examples/freetype/target/debug/deps/libgl_common-ba78e2ee345cf946.rlib -Awarnings`
Fresh freetype-sys v0.0.5
Fresh sdl2-sys v0.2.1 (https://github.com/AngryLawyer/rust-sdl2#10dfe7b4)
Fresh enum_primitive v0.0.1
Fresh piston2d-graphics v0.0.43 (https://github.com/PistonDevelopers/graphics#fd21df2b)
Fresh pistoncore-input v0.0.9 (https://github.com/pistondevelopers/input#cb061504)
Fresh image v0.3.8 (https://github.com/pistondevelopers/image#36f3020c)
Compiling pistoncore-event_loop v0.1.3 (https://github.com/PistonDevelopers/event_loop#f2adff62)
Running `rustc /home/me/.cargo/git/checkouts/event_loop-eab122f9bd640692/master/src/lib.rs --crate-name event_loop --crate-type lib -g -C metadata=85f8d8d2faed7df5 -C extra-filename=-85f8d8d2faed7df5 --out-dir /home/me/projects/piston-examples/freetype/target/debug/deps --emit=dep-info,link -L dependency=/home/me/projects/piston-examples/freetype/target/debug/deps -L dependency=/home/me/projects/piston-examples/freetype/target/debug/deps --extern viewport=/home/me/projects/piston-examples/freetype/target/debug/deps/libviewport-42b2322ca4e333e7.rlib --extern window=/home/me/projects/piston-examples/freetype/target/debug/deps/libwindow-57a99acdb2036bd8.rlib --extern clock_ticks=/home/me/projects/piston-examples/freetype/target/debug/deps/libclock_ticks-f89ed1b2a66f1f6e.rlib -Awarnings`
/home/me/.cargo/git/checkouts/freetype-rs-c8982864246c3c28/master/src/glyph.rs:94:7: 94:58 error: stability attributes may not be used outside of the standard library
/home/me/.cargo/git/checkouts/freetype-rs-c8982864246c3c28/master/src/glyph.rs:94 #[deprecated = "use advance_x and advance_y instead"]
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
error: aborting due to previous error
Build failed, waiting for other jobs to finish...
/home/me/.cargo/git/checkouts/rust-sdl2-8facfb557b6c1670/master/src/sdl2/surface.rs:393:7: 393:17 error: stability attributes may not be used outside of the standard library
/home/me/.cargo/git/checkouts/rust-sdl2-8facfb557b6c1670/master/src/sdl2/surface.rs:393 #[deprecated]
^~~~~~~~~~
/home/me/.cargo/git/checkouts/rust-sdl2-8facfb557b6c1670/master/src/sdl2/timer.rs:23:3: 23:78 error: stability attributes may not be used outside of the standard library
/home/me/.cargo/git/checkouts/rust-sdl2-8facfb557b6c1670/master/src/sdl2/timer.rs:23 #[unstable = "Unstable because of move to unboxed closures and `box` syntax"]
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/me/.cargo/git/checkouts/rust-sdl2-8facfb557b6c1670/master/src/sdl2/audio.rs:494:7: 494:104 error: stability attributes may not be used outside of the standard library
/home/me/.cargo/git/checkouts/rust-sdl2-8facfb557b6c1670/master/src/sdl2/audio.rs:494 #[unstable="Certain conversions may cause buffer overflows. See AngryLawyer/rust-sdl2 issue #270."]
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
error: aborting due to 3 previous errors
Could not compile `freetype-rs`.
Caused by:
Process didn't exit successfully: `rustc /home/me/.cargo/git/checkouts/freetype-rs-c8982864246c3c28/master/src/lib.rs --crate-name freetype --crate-type lib -g -C metadata=524c167feab079d0 -C extra-filename=-524c167feab079d0 --out-dir /home/me/projects/piston-examples/freetype/target/debug/deps --emit=dep-info,link -L dependency=/home/me/projects/piston-examples/freetype/target/debug/deps -L dependency=/home/me/projects/piston-examples/freetype/target/debug/deps --extern freetype_sys=/home/me/projects/piston-examples/freetype/target/debug/deps/libfreetype_sys-2aab8adbd3e99192.rlib --extern bitflags=/home/me/projects/piston-examples/freetype/target/debug/deps/libbitflags-518ea12e21428edd.rlib --extern libc=/home/me/projects/piston-examples/freetype/target/debug/deps/liblibc-9b7976990ae0dbd4.rlib --extern num=/home/me/projects/piston-examples/freetype/target/debug/deps/libnum-29c6b2a43c9c5d9c.rlib -Awarnings -L native=/usr/lib/x86_64-linux-gnu -L native=/usr/lib/x86_64-linux-gnu` (exit code: 101)
me@me-desktop ~/projects/piston-examples/freetype $
I have tried desperately to use this game engine for 10 days now. I might just use C++, but I wanna use rust :(
I originally put this problem on a separate issue, PistonDevelopers/Piston-Tutorials#61, but I wasn't sure if it should have been a new issue instead.
me@me-desktop ~/piston-examples-master/gfx_cube $ cargo build --verbose
Compiling gfx_macros v0.1.10 (https://github.com/gfx-rs/gfx_macros#fda2ff26)
Running `rustc /home/me/.cargo/git/checkouts/gfx_macros-20b8916c81d6b4ed/master/src/lib.rs --crate-name gfx_macros --crate-type dylib -C prefer-dynamic -g -C metadata=996769dbcfbdc64a -C extra-filename=-996769dbcfbdc64a --out-dir /home/me/piston-examples-master/gfx_cube/target/debug/deps --emit=dep-info,link -L dependency=/home/me/piston-examples-master/gfx_cube/target/debug/deps -L dependency=/home/me/piston-examples-master/gfx_cube/target/debug/deps -Awarnings`
Compiling shader_version v0.0.5 (https://github.com/pistondevelopers/shader_version#a5e77d4c)
Running `rustc /home/me/.cargo/git/checkouts/shader_version-7b6bcaf792adf596/master/src/lib.rs --crate-name shader_version --crate-type lib -g -C metadata=c0d3970179066072 -C extra-filename=-c0d3970179066072 --out-dir /home/me/piston-examples-master/gfx_cube/target/debug/deps --emit=dep-info,link -L dependency=/home/me/piston-examples-master/gfx_cube/target/debug/deps -L dependency=/home/me/piston-examples-master/gfx_cube/target/debug/deps -Awarnings`
Compiling quaternion v0.0.5 (https://github.com/PistonDevelopers/quaternion.git#35004891)
Running `rustc /home/me/.cargo/git/checkouts/quaternion-d23494c4b16c3295/master/src/lib.rs --crate-name quaternion --crate-type lib -g -C metadata=40184a46e795eb20 -C extra-filename=-40184a46e795eb20 --out-dir /home/me/piston-examples-master/gfx_cube/target/debug/deps --emit=dep-info,link -L dependency=/home/me/piston-examples-master/gfx_cube/target/debug/deps -L dependency=/home/me/piston-examples-master/gfx_cube/target/debug/deps --extern vecmath=/home/me/piston-examples-master/gfx_cube/target/debug/deps/libvecmath-4b9e8c05387d4953.rlib -Awarnings`
Compiling pistoncore-input v0.0.7 (https://github.com/pistondevelopers/input#9ad38f1f)
Running `rustc /home/me/.cargo/git/checkouts/input-f00de8c7e2f06034/master/src/lib.rs --crate-name input --crate-type lib -g -C metadata=1490dbfb10945cbf -C extra-filename=-1490dbfb10945cbf --out-dir /home/me/piston-examples-master/gfx_cube/target/debug/deps --emit=dep-info,link -L dependency=/home/me/piston-examples-master/gfx_cube/target/debug/deps -L dependency=/home/me/piston-examples-master/gfx_cube/target/debug/deps --extern rustc_serialize=/home/me/piston-examples-master/gfx_cube/target/debug/deps/librustc_serialize-70d93d5334da1e4e.rlib --extern bitflags=/home/me/piston-examples-master/gfx_cube/target/debug/deps/libbitflags-518ea12e21428edd.rlib -Awarnings`
Compiling draw_state v0.0.5 (https://github.com/gfx-rs/draw_state#afea5101)
Running `rustc /home/me/.cargo/git/checkouts/draw_state-1e8ed0c6197e116e/master/src/lib.rs --crate-name draw_state --crate-type lib -g -C metadata=9bf17f3a41afd6c4 -C extra-filename=-9bf17f3a41afd6c4 --out-dir /home/me/piston-examples-master/gfx_cube/target/debug/deps --emit=dep-info,link -L dependency=/home/me/piston-examples-master/gfx_cube/target/debug/deps -L dependency=/home/me/piston-examples-master/gfx_cube/target/debug/deps --extern bitflags=/home/me/piston-examples-master/gfx_cube/target/debug/deps/libbitflags-518ea12e21428edd.rlib -Awarnings`
Compiling sdl2-sys v0.0.33 (https://github.com/AngryLawyer/rust-sdl2#37f657d4)
Running `rustc /home/me/.cargo/git/checkouts/rust-sdl2-8facfb557b6c1670/master/sdl2-sys/src/lib.rs --crate-name sdl2_sys --crate-type lib -g --cfg feature="default" -C metadata=4e2764e28e66a0e3 -C extra-filename=-4e2764e28e66a0e3 --out-dir /home/me/piston-examples-master/gfx_cube/target/debug/deps --emit=dep-info,link -L dependency=/home/me/piston-examples-master/gfx_cube/target/debug/deps -L dependency=/home/me/piston-examples-master/gfx_cube/target/debug/deps --extern libc=/home/me/piston-examples-master/gfx_cube/target/debug/deps/liblibc-8c77960f0e8d4e86.rlib -Awarnings -l SDL2`
Compiling clock_ticks v0.0.5 (https://github.com/tomaka/clock_ticks#cdb6499b)
Running `rustc /home/me/.cargo/git/checkouts/clock_ticks-9428292a9c637b8e/master/src/lib.rs --crate-name clock_ticks --crate-type lib -g -C metadata=f89ed1b2a66f1f6e -C extra-filename=-f89ed1b2a66f1f6e --out-dir /home/me/piston-examples-master/gfx_cube/target/debug/deps --emit=dep-info,link -L dependency=/home/me/piston-examples-master/gfx_cube/target/debug/deps -L dependency=/home/me/piston-examples-master/gfx_cube/target/debug/deps --extern libc=/home/me/piston-examples-master/gfx_cube/target/debug/deps/liblibc-8c77960f0e8d4e86.rlib -Awarnings`
Compiling gl_common v0.0.4
Running `rustc /home/me/.cargo/registry/src/github.com-1ecc6299db9ec823/gl_common-0.0.4/src/lib.rs --crate-name gl_common --crate-type lib -g -C metadata=ec39142a57c733b7 -C extra-filename=-ec39142a57c733b7 --out-dir /home/me/piston-examples-master/gfx_cube/target/debug/deps --emit=dep-info,link -L dependency=/home/me/piston-examples-master/gfx_cube/target/debug/deps -L dependency=/home/me/piston-examples-master/gfx_cube/target/debug/deps --extern libc=/home/me/piston-examples-master/gfx_cube/target/debug/deps/liblibc-8c77960f0e8d4e86.rlib -Awarnings`
Compiling log v0.3.1
Running `rustc /home/me/.cargo/registry/src/github.com-1ecc6299db9ec823/log-0.3.1/src/lib.rs --crate-name log --crate-type lib -g -C metadata=54cf393d3c69686f -C extra-filename=-54cf393d3c69686f --out-dir /home/me/piston-examples-master/gfx_cube/target/debug/deps --emit=dep-info,link -L dependency=/home/me/piston-examples-master/gfx_cube/target/debug/deps -L dependency=/home/me/piston-examples-master/gfx_cube/target/debug/deps --extern libc=/home/me/piston-examples-master/gfx_cube/target/debug/deps/liblibc-8c77960f0e8d4e86.rlib -Awarnings`
/home/me/.cargo/git/checkouts/shader_version-7b6bcaf792adf596/master/src/opengl.rs:8:10: 8:14 error: the trait `core::clone::Clone` is not implemented for the type `opengl::OpenGL` [E0277]
/home/me/.cargo/git/checkouts/shader_version-7b6bcaf792adf596/master/src/opengl.rs:8 #[derive(Copy, PartialEq, Eq, PartialOrd, Ord)]
^~~~
/home/me/.cargo/git/checkouts/shader_version-7b6bcaf792adf596/master/src/opengl.rs:8:10: 8:14 note: in expansion of #[derive_Copy]
/home/me/.cargo/git/checkouts/shader_version-7b6bcaf792adf596/master/src/opengl.rs:8:10: 8:14 note: expansion site
Compiling gl_common v0.0.4 (https://github.com/bjz/gl-rs#3ebf1cfe)
Running `rustc /home/me/.cargo/git/checkouts/gl-rs-5020f97825182d66/master/gl_common/src/lib.rs --crate-name gl_common --crate-type lib -g -C metadata=ba78e2ee345cf946 -C extra-filename=-ba78e2ee345cf946 --out-dir /home/me/piston-examples-master/gfx_cube/target/debug/deps --emit=dep-info,link -L dependency=/home/me/piston-examples-master/gfx_cube/target/debug/deps -L dependency=/home/me/piston-examples-master/gfx_cube/target/debug/deps --extern libc=/home/me/piston-examples-master/gfx_cube/target/debug/deps/liblibc-8c77960f0e8d4e86.rlib -Awarnings`
/home/me/.cargo/git/checkouts/shader_version-7b6bcaf792adf596/master/src/glsl.rs:13:10: 13:14 error: the trait `core::clone::Clone` is not implemented for the type `glsl::GLSL` [E0277]
/home/me/.cargo/git/checkouts/shader_version-7b6bcaf792adf596/master/src/glsl.rs:13 #[derive(Copy, PartialOrd, Ord, PartialEq, Eq)]
^~~~
/home/me/.cargo/git/checkouts/shader_version-7b6bcaf792adf596/master/src/glsl.rs:13:10: 13:14 note: in expansion of #[derive_Copy]
/home/me/.cargo/git/checkouts/shader_version-7b6bcaf792adf596/master/src/glsl.rs:13:10: 13:14 note: expansion site
error: aborting due to 2 previous errors
Fresh quack v0.0.13 (https://github.com/PistonDevelopers/quack#6bcb6ac3)
Fresh rustc-serialize v0.3.12
Fresh vecmath v0.0.5 (https://github.com/PistonDevelopers/vecmath#62848645)
Fresh khronos_api v0.0.5
Fresh bitflags v0.1.1
Fresh khronos_api v0.0.5 (https://github.com/bjz/gl-rs#3ebf1cfe)
Fresh libc v0.1.5
Fresh xml-rs v0.1.23
Build failed, waiting for other jobs to finish...
/home/me/.cargo/git/checkouts/gfx_macros-20b8916c81d6b4ed/master/src/shader_param.rs:22:10: 22:14 error: the trait `core::clone::Clone` is not implemented for the type `shader_param::Param` [E0277]
/home/me/.cargo/git/checkouts/gfx_macros-20b8916c81d6b4ed/master/src/shader_param.rs:22 #[derive(Copy, PartialEq, Debug)]
^~~~
/home/me/.cargo/git/checkouts/gfx_macros-20b8916c81d6b4ed/master/src/shader_param.rs:22:10: 22:14 note: in expansion of #[derive_Copy]
/home/me/.cargo/git/checkouts/gfx_macros-20b8916c81d6b4ed/master/src/shader_param.rs:22:10: 22:14 note: expansion site
/home/me/.cargo/git/checkouts/gfx_macros-20b8916c81d6b4ed/master/src/shader_param.rs:30:10: 30:14 error: the trait `core::clone::Clone` is not implemented for the type `shader_param::ParamError` [E0277]
/home/me/.cargo/git/checkouts/gfx_macros-20b8916c81d6b4ed/master/src/shader_param.rs:30 #[derive(Copy, Debug)]
^~~~
/home/me/.cargo/git/checkouts/gfx_macros-20b8916c81d6b4ed/master/src/shader_param.rs:30:10: 30:14 note: in expansion of #[derive_Copy]
/home/me/.cargo/git/checkouts/gfx_macros-20b8916c81d6b4ed/master/src/shader_param.rs:30:10: 30:14 note: expansion site
/home/me/.cargo/git/checkouts/gfx_macros-20b8916c81d6b4ed/master/src/shader_param.rs:243:10: 243:14 error: the trait `core::clone::Clone` is not implemented for the type `shader_param::ShaderParam` [E0277]
/home/me/.cargo/git/checkouts/gfx_macros-20b8916c81d6b4ed/master/src/shader_param.rs:243 #[derive(Copy)]
^~~~
/home/me/.cargo/git/checkouts/gfx_macros-20b8916c81d6b4ed/master/src/shader_param.rs:243:10: 243:14 note: in expansion of #[derive_Copy]
/home/me/.cargo/git/checkouts/gfx_macros-20b8916c81d6b4ed/master/src/shader_param.rs:243:10: 243:14 note: expansion site
/home/me/.cargo/git/checkouts/gfx_macros-20b8916c81d6b4ed/master/src/vertex_format.rs:26:10: 26:14 error: the trait `core::clone::Clone` is not implemented for the type `vertex_format::Modifier` [E0277]
/home/me/.cargo/git/checkouts/gfx_macros-20b8916c81d6b4ed/master/src/vertex_format.rs:26 #[derive(Copy, PartialEq)]
^~~~
/home/me/.cargo/git/checkouts/gfx_macros-20b8916c81d6b4ed/master/src/vertex_format.rs:26:10: 26:14 note: in expansion of #[derive_Copy]
/home/me/.cargo/git/checkouts/gfx_macros-20b8916c81d6b4ed/master/src/vertex_format.rs:26:10: 26:14 note: expansion site
/home/me/.cargo/git/checkouts/gfx_macros-20b8916c81d6b4ed/master/src/vertex_format.rs:222:10: 222:14 error: the trait `core::clone::Clone` is not implemented for the type `vertex_format::VertexFormat` [E0277]
/home/me/.cargo/git/checkouts/gfx_macros-20b8916c81d6b4ed/master/src/vertex_format.rs:222 #[derive(Copy)]
^~~~
/home/me/.cargo/git/checkouts/gfx_macros-20b8916c81d6b4ed/master/src/vertex_format.rs:222:10: 222:14 note: in expansion of #[derive_Copy]
/home/me/.cargo/git/checkouts/gfx_macros-20b8916c81d6b4ed/master/src/vertex_format.rs:222:10: 222:14 note: expansion site
error: aborting due to 5 previous errors
/home/me/.cargo/git/checkouts/rust-sdl2-8facfb557b6c1670/master/sdl2-sys/src/audio.rs:45:10: 45:14 error: the trait `core::clone::Clone` is not implemented for the type `audio::SDL_AudioCVT` [E0277]
/home/me/.cargo/git/checkouts/rust-sdl2-8facfb557b6c1670/master/sdl2-sys/src/audio.rs:45 #[derive(Copy)]
^~~~
/home/me/.cargo/git/checkouts/rust-sdl2-8facfb557b6c1670/master/sdl2-sys/src/audio.rs:45:10: 45:14 note: in expansion of #[derive_Copy]
/home/me/.cargo/git/checkouts/rust-sdl2-8facfb557b6c1670/master/sdl2-sys/src/audio.rs:45:10: 45:14 note: expansion site
/home/me/.cargo/git/checkouts/rust-sdl2-8facfb557b6c1670/master/sdl2-sys/src/touch.rs:8:21: 8:25 error: the trait `core::clone::Clone` is not implemented for the type `touch::Finger` [E0277]
/home/me/.cargo/git/checkouts/rust-sdl2-8facfb557b6c1670/master/sdl2-sys/src/touch.rs:8 #[derive(PartialEq, Copy)]
^~~~
/home/me/.cargo/git/checkouts/rust-sdl2-8facfb557b6c1670/master/sdl2-sys/src/touch.rs:8:21: 8:25 note: in expansion of #[derive_Copy]
/home/me/.cargo/git/checkouts/rust-sdl2-8facfb557b6c1670/master/sdl2-sys/src/touch.rs:8:21: 8:25 note: expansion site
error: aborting due to 2 previous errors
/home/me/.cargo/git/checkouts/draw_state-1e8ed0c6197e116e/master/src/state.rs:170:24: 170:26 error: unary negation of unsigned integers may be removed in the future
/home/me/.cargo/git/checkouts/draw_state-1e8ed0c6197e116e/master/src/state.rs:170 mask_read: -1,
^~
/home/me/.cargo/git/checkouts/draw_state-1e8ed0c6197e116e/master/src/state.rs:170:26: 170:26 help: add #![feature(negate_unsigned)] to the crate attributes to enable
/home/me/.cargo/git/checkouts/draw_state-1e8ed0c6197e116e/master/src/state.rs:171:25: 171:27 error: unary negation of unsigned integers may be removed in the future
/home/me/.cargo/git/checkouts/draw_state-1e8ed0c6197e116e/master/src/state.rs:171 mask_write: -1,
^~
/home/me/.cargo/git/checkouts/draw_state-1e8ed0c6197e116e/master/src/state.rs:171:27: 171:27 help: add #![feature(negate_unsigned)] to the crate attributes to enable
/home/me/.cargo/git/checkouts/draw_state-1e8ed0c6197e116e/master/src/lib.rs:108:24: 108:26 error: unary negation of unsigned integers may be removed in the future
/home/me/.cargo/git/checkouts/draw_state-1e8ed0c6197e116e/master/src/lib.rs:108 mask_read: -1,
^~
/home/me/.cargo/git/checkouts/draw_state-1e8ed0c6197e116e/master/src/lib.rs:108:26: 108:26 help: add #![feature(negate_unsigned)] to the crate attributes to enable
/home/me/.cargo/git/checkouts/draw_state-1e8ed0c6197e116e/master/src/lib.rs:109:25: 109:27 error: unary negation of unsigned integers may be removed in the future
/home/me/.cargo/git/checkouts/draw_state-1e8ed0c6197e116e/master/src/lib.rs:109 mask_write: -1,
^~
/home/me/.cargo/git/checkouts/draw_state-1e8ed0c6197e116e/master/src/lib.rs:109:27: 109:27 help: add #![feature(negate_unsigned)] to the crate attributes to enable
error: aborting due to 4 previous errors
Could not compile `shader_version`.
Caused by:
Process didn't exit successfully: `rustc /home/me/.cargo/git/checkouts/shader_version-7b6bcaf792adf596/master/src/lib.rs --crate-name shader_version --crate-type lib -g -C metadata=c0d3970179066072 -C extra-filename=-c0d3970179066072 --out-dir /home/me/piston-examples-master/gfx_cube/target/debug/deps --emit=dep-info,link -L dependency=/home/me/piston-examples-master/gfx_cube/target/debug/deps -L dependency=/home/me/piston-examples-master/gfx_cube/target/debug/deps -Awarnings` (exit code: 101)
me@me-desktop ~/piston-examples-master/gfx_cube $
cargo build
make run
Could use rust-sdl2_mixer.
See #72
Cargo.lock is a file that makes cargo build
use the same dependencies, which is useful when you want to run programs with older versions of libraries.
piston-examples is specifically meant to display examples of how to use the latest version of piston.
For this reason, we put Cargo.lock in .gitignore
per example to prevent tracking them, such that we are forced to keep the examples up to date.
It is recommended to use the libraries directly.
src/main.rs:1:1: 1:1 error: reached the recursion limit during monomorphization
src/main.rs:1
^
Could not compile `piston-example-sprite`.
Hi,
I could compile an start the example on the piston page. I had to add opengl(OpenGL::_2_1)
to the WindowSettings.
But I can't run the getting-started example.
I changed OpenGL::_3_2
to OpenGL::_2_1
:
let mut app = App {
gl: GlGraphics::new(OpenGL::_2_1),
rotation: 0.0
};
an run
woody@lappi:~/Schreibtisch/rust/Piston-Tutorials/getting-started$ cargo run
Running `target/debug/spinning-square`
[glutin] x error code=48 major=0 minor=0!
thread '<main>' panicked at 'called `Result::unwrap()` on an `Err` value: OsError("GL context creation failed")', ../src/libcore/result.rs:731
An unknown error occurred
To learn more, run the command again with --verbose.
woody@lappi:~/Schreibtisch/rust/Piston-Tutorials/getting-started$
No idea, what I can do now. My machine says:
woody@lappi:~$ uname -a
Linux lappi 3.13.0-55-generic #92-Ubuntu SMP Sun Jun 14 18:32:20 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
woody@lappi:~$ glxinfo | grep "OpenGL version"
OpenGL version string: 2.1 Mesa 10.1.3
woody@lappi:~$ rustc --version
rustc 1.2.0-nightly (2f5683913 2015-06-18)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.