# Resistation Rust SDK This crate provides a library for building programs and games for the [Resistation platform](https://resistation.com). Resistation is a playful, WASM-powered platform for developing, sharing, and preserving little programs and games. This SDK offers all the necessary APIs to interact with the Resistation runtime environment. For a complete guide on getting started with Resistation and the SDK, refer to the [official guide](https://resistation.com/guide). ## Setup To use the SDK, ensure that you have the necessary toolchain installed for compiling to WebAssembly (`wasm32-unknown-unknown`). You can install it with the following command: ```bash rustup target add wasm32-unknown-unknown ``` Create a new Rust library project using Cargo, and then specify _C dynamic library_ as create type and add the Resistation SDK as a dependency in your `Cargo.toml`: ```toml [lib] crate-type = ["cdylib"] [dependencies] resistation = "0.1" ``` To specify `wasm32-unknown-unknown` as your build target, create a `.cargo/cargo.toml` in your project's root with this content: ```toml [build] target = "wasm32-unknown-unknown" ``` Once set up, you can start building your program by importing the SDK's modules and using its APIs. To run the program in Resistation on macOS, enter the following command on the terminal from your project's root folder: ```bash > open -a Resistation target/wasm32-unknown-unknown/release/.wasm ``` On other Linux or Windows, use the following command instead: ```bash > --program=target/wasm32-unknown-unknown/release/.wasm ``` ## Examples Here is a simple example to get started with a basic "Hello, World!" program for Resistation: ```rust use resistation::println; #[no_mangle] extern "C" fn main() { println!("Hello, Resistation!"); } ``` This program uses the SDK's `println!` macro to display a message on the screen. For more comprehensive examples and tutorials, refer to the [official guide](https://resistation.com/guide). ## License The source code for this crate is released under the [3-Clause BSD license](LICENSE.txt).