8000 GitHub - ReactorScram/cruel_ruin: Template / reference for the ugly way to call Rust code from a C++ executable
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Template / reference for the ugly way to call Rust code from a C++ executable

Notifications You must be signed in to change notification settings

ReactorScram/cruel_ruin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cruel Ruin

A downloadable bad idea, named for the party-wiping final boss attack in Golden Sun.

#[no_mangle]
pub extern "C" fn wow_rs () {
	println! ("Wow, it's Rust");
}
extern "C" {
	void wow_rs ();
}

void wow_cpp () {
	cout << "Wow, it's C++\n";
	wow_rs ();
}

This is a template / reference for manually binding a Rust library to a C++ executable, because I keep forgetting the exact CMake and Cargo syntax to use, and how to pass strings each way.

About

Template / reference for the ugly way to call Rust code from a C++ executable

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0