mirror of
https://github.com/topjohnwu/Magisk.git
synced 2026-01-01 23:40:33 -08:00
Generate cxx binding in build.rs
This commit is contained in:
@@ -7,6 +7,9 @@ edition = "2021"
|
||||
crate-type = ["staticlib"]
|
||||
path = "lib.rs"
|
||||
|
||||
[build-dependencies]
|
||||
cxx-gen = { path = "../external/cxx-rs/gen/lib" }
|
||||
|
||||
[dependencies]
|
||||
base = { path = "../base" }
|
||||
cxx = "1.0.69"
|
||||
|
||||
8
native/src/init/build.rs
Normal file
8
native/src/init/build.rs
Normal file
@@ -0,0 +1,8 @@
|
||||
use crate::gen::gen_cxx_binding;
|
||||
|
||||
#[path = "../base/gen.rs"]
|
||||
mod gen;
|
||||
|
||||
fn main() {
|
||||
gen_cxx_binding("init-rs");
|
||||
}
|
||||
@@ -10,8 +10,6 @@
|
||||
|
||||
#include "init.hpp"
|
||||
|
||||
#include <init-rs.cpp>
|
||||
|
||||
using namespace std;
|
||||
|
||||
bool unxz(int fd, const uint8_t *buf, size_t size) {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include <base.hpp>
|
||||
#include <init-rs.hpp>
|
||||
|
||||
#include "init-rs.hpp"
|
||||
|
||||
using kv_pairs = std::vector<std::pair<std::string, std::string>>;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user