Start porting to rust
This commit is contained in:
parent
cb4873e2ab
commit
ec74203e70
5
.gitignore
vendored
5
.gitignore
vendored
@ -1,3 +1,8 @@
|
||||
bin/*
|
||||
obj/*
|
||||
.vs
|
||||
|
||||
|
||||
# Added by cargo
|
||||
|
||||
/target
|
||||
|
7
Cargo.lock
generated
Normal file
7
Cargo.lock
generated
Normal file
@ -0,0 +1,7 @@
|
||||
# This file is automatically @generated by Cargo.
|
||||
# It is not intended for manual editing.
|
||||
version = 3
|
||||
|
||||
[[package]]
|
||||
name = "nmsrust"
|
||||
version = "0.1.0"
|
12
Cargo.toml
Normal file
12
Cargo.toml
Normal file
@ -0,0 +1,12 @@
|
||||
[package]
|
||||
name = "nmsrust"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
[lib]
|
||||
crate-type = ["staticlib"]
|
||||
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
2
Makefile
2
Makefile
@ -18,7 +18,7 @@ CFLAGS ?= -Wextra -Wall -O2
|
||||
.PHONY: all install uninstall clean
|
||||
|
||||
nms: $(OBJ)/input.o $(OBJ)/error.o $(OBJ)/nmscharset.o $(OBJ)/nmstermio.o $(OBJ)/nmseffect.o $(OBJ)/nms.o | $(BIN)
|
||||
$(CC) $(CFLAGS) -o $(BIN)/$@ $^
|
||||
$(CC) $(CFLAGS) -o $(BIN)/$@ $^ target/release/libnmsrust.a
|
||||
|
||||
sneakers: $(OBJ)/nmscharset.o $(OBJ)/nmstermio.o $(OBJ)/nmseffect.o $(OBJ)/sneakers.o | $(BIN)
|
||||
$(CC) $(CFLAGS) -o $(BIN)/$@ $^
|
||||
|
6
src/lib.rs
Normal file
6
src/lib.rs
Normal file
@ -0,0 +1,6 @@
|
||||
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn rust_main() {
|
||||
println!("Hello from rust");
|
||||
}
|
Loading…
Reference in New Issue
Block a user