WOWCube Docs logo
WOWCube Docs
Mission Control
Section Shortcuts
APIExamplesSourceWOWConnectChangelog
Filters
SDK and language defaults persist in cookies.
SDK version
Navigation Tree
Collapsed by default, focused on the active path.
Made byMcKay Seamons
GitHub
  1. Home
  2. Docs
  3. Examples
  4. main.rs
Mission NodeSDK 6.3RustbasicsProject Included

main.rs

Example: main.rs

Examples / SDK 6.3 / Rust / basics / Working with Emulator / project / src
main.rs
RUST
1#![no_main]
2//comment out the following lines to enable naming conventions-related warnings
3#![allow(non_snake_case)]
4#![allow(unused_imports)]
5#![allow(non_camel_case_types)]
6#![allow(non_upper_case_globals)]
7
8mod cubeapp;
9use wowcube_sdk;
10
11static mut APPLICATION: Option<cubeapp::WorkingWIthEmulator> = None;
12
13#[no_mangle]
14pub extern "C" fn on_init(cid: u32) {
15 let mut application = cubeapp::WorkingWIthEmulator::new();
16 wowcube_sdk::application::application_init(&mut application, cid);
17
18 unsafe {
19 APPLICATION = Some(application);
20 }
21}
22
23#[no_mangle]
24pub extern "C" fn run() {
25 let application = unsafe { APPLICATION.as_mut().unwrap() };
26 wowcube_sdk::application::application_run(application);
27}
28
Wrapped for easier reading. Turn wrap off to inspect exact line lengths.
Context Rail

Project files

This section gets modified automatically to match the settings of your project
project/Cargo.toml
cubeapp.rs
project/src/cubeapp.rs
main.rs
project/src/main.rs
wowcubeapp-build.json
project/wowcubeapp-build.json
Context Rail

Related nodes

cubeapp.rs
Examples / SDK 6.3 / Rust / basics / Working with Emulator / project / src
Working with Emulator
Examples / SDK 6.3 / Rust / basics
info.json
Examples / SDK 6.3 / Rust / basics / Working with Emulator
This section gets modified automatically to match the settings of your project
Examples / SDK 6.3 / Rust / basics / Working with Emulator / project
Previous Node
cubeapp.rs
Examples / SDK 6.3 / Rust / basics / Working with Emulator / project / src
Next Node
wowcubeapp-build.json
Examples / SDK 6.3 / Rust / basics / Working with Emulator / project