mirror of
https://github.com/thepigeongenerator/mcaselector-lite.git
synced 2025-12-17 11:05:45 +01:00
remove rust/cargo from compilation
it has become clear that incorperating rust in this project was a mistake, since I don't understand it well enough for it to be useful, and at this rate it'd be faster to use GLFW in C than in rust.
This commit is contained in:
33
src/error.rs
33
src/error.rs
@@ -1,33 +0,0 @@
|
||||
unsafe extern "C" {
|
||||
pub fn debug(fmt: *const u8, ...);
|
||||
pub fn info(fmt: *const u8, ...);
|
||||
pub fn warn(fmt: *const u8, ...);
|
||||
pub fn error(fmt: *const u8, ...);
|
||||
pub fn fatal(fmt: *const u8, ...);
|
||||
}
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! debug {
|
||||
($fmt:expr) => {{ $crate::error::debug($fmt.as_ptr()); }};
|
||||
($fmt:expr, $($arg:expr),*) => {{ $crate::error::debug($fmt.as_ptr(), ($($arg),*)); }};
|
||||
}
|
||||
#[macro_export]
|
||||
macro_rules! info {
|
||||
($fmt:expr) => {{ $crate::error::info($fmt.as_ptr()); }};
|
||||
($fmt:expr, $($arg:expr),*) => {{ $crate::error::info($fmt.as_ptr(), ($($arg),*)); }};
|
||||
}
|
||||
#[macro_export]
|
||||
macro_rules! warn {
|
||||
($fmt:expr) => {{ $crate::error::warn($fmt.as_ptr()); }};
|
||||
($fmt:expr, $($arg:expr),*) => {{ $crate::error::warn($fmt.as_ptr(), ($($arg),*)); }};
|
||||
}
|
||||
#[macro_export]
|
||||
macro_rules! error {
|
||||
($fmt:expr) => {{ $crate::error::error($fmt.as_ptr()); }};
|
||||
($fmt:expr, $($arg:expr),*) => {{ $crate::error::error($fmt.as_ptr(), ($($arg),*)); }};
|
||||
}
|
||||
#[macro_export]
|
||||
macro_rules! fatal {
|
||||
($fmt:expr) => {{ $crate::error::fatal($fmt.as_ptr()); }};
|
||||
($fmt:expr, $($arg:expr),*) => {{ $crate::error::fatal($fmt.as_ptr(), ($($arg),*)); }};
|
||||
}
|
||||
21
src/lib.rs
21
src/lib.rs
@@ -1,21 +0,0 @@
|
||||
#![cfg_attr(not(test), no_std)]
|
||||
|
||||
#[cfg(not(test))]
|
||||
#[panic_handler]
|
||||
fn panic(_info: &core::panic::PanicInfo) -> ! {
|
||||
loop {}
|
||||
}
|
||||
|
||||
// contains all publicly facing functions
|
||||
|
||||
mod error;
|
||||
|
||||
pub extern "C" fn test() {
|
||||
unsafe {
|
||||
debug!("%s", "hi");
|
||||
info!("%s", "hi");
|
||||
warn!("%s", "hi");
|
||||
error!("%s", "hi");
|
||||
fatal!("%s", "hi");
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,10 @@
|
||||
#include "error.h"
|
||||
|
||||
extern void test(void);
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
(void)argc, (void)argv;
|
||||
test();
|
||||
debug("owo");
|
||||
debug("%s", "owo");
|
||||
info("%s", "owo");
|
||||
warn("%s", "owo");
|
||||
error("%s", "owo");
|
||||
fatal("%s", "owo");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user