#metal #shaders #mac #render #api-bindings

shadertoy

Rust library wrapping the Shadertoy REST API to be able to easily search through and download Shadertoy assets

8 releases (4 breaking)

Uses old Rust 2015

0.6.1 Jun 2, 2018
0.6.0 May 13, 2018
0.5.0 Jan 5, 2018
0.4.1 Jan 3, 2018
0.1.2 Dec 31, 2017

#375 in Rendering

28 downloads per month
Used in shadertoy-browser

MIT/Apache

10KB
217 lines

Shadertoy API

Crate Docs.rs Build Status Build Status MIT/Apache

Rust library wrapping the Shadertoy REST API to be able to easily search through and download Shadertoy assets.

Usage

In Cargo.toml:

[dependencies]
shadertoy = "0.5"

Example usage:

extern crate shadertoy;

fn test() {
    let client = shadertoy::Client::new("Bd8tWD"); // insert your own API key here
    
	let search_params = shadertoy::SearchParams {
        string: "car",
        sort_order: shadertoy::SearchSortOrder::Love,
        filters: vec![],
    };

    match client.search(&search_params) {
        Ok(shader_ids) => println!("\"Car\" shadertoys: {:?}", shader_ids),
        Err(err) => println!("Search failed: {}", err),
    }
}

TODO

License

Licensed under either of the following, at your option:

Contribution

Contributions are welcome! Please note that your contributions are assumed to be dual-licensed under Apache-2.0/MIT.

Dependencies

~17–27MB
~487K SLoC