Build burrow library into iOS and macOS app
This commit adds a build script, build-rust.sh, which compiles the burrow crate from inside of Xcode. The network extension then links against this crate.
This commit is contained in:
parent
d966c0ff77
commit
4b0965b846
7 changed files with 129 additions and 4 deletions
|
|
@ -3,7 +3,8 @@ name = "burrow"
|
|||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
[lib]
|
||||
crate-type = ["lib", "staticlib"]
|
||||
|
||||
[dependencies]
|
||||
tokio = { version = "1.21", features = ["rt", "macros"] }
|
||||
|
|
|
|||
3
burrow/src/lib.rs
Normal file
3
burrow/src/lib.rs
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
pub fn hello_world() {
|
||||
println!("Hello, world!");
|
||||
}
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
use tokio::io::Result;
|
||||
use tun::TunInterface;
|
||||
|
||||
async fn lol() -> Result<()> {
|
||||
async fn try_main() -> Result<()> {
|
||||
let iface = TunInterface::new()?;
|
||||
println!("{:?}", iface.name());
|
||||
|
||||
|
|
@ -10,5 +10,5 @@ async fn lol() -> Result<()> {
|
|||
|
||||
#[tokio::main(flavor = "current_thread")]
|
||||
async fn main() {
|
||||
lol().await.unwrap();
|
||||
try_main().await.unwrap();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue