Skip to content

(prototype) providing openwrt ubus functionallity in Rust

Notifications You must be signed in to change notification settings

wangjuyunlian/ubus-rs

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ubus-rs

(prototype)

Expose ubus library to build OpenWRT Rust apps.

Compile the project

Requires cross installed.

⚠️ Has git submodules. ⚠️

Tested on:

  • Windows WSL (requires Docker)
  • Windows (does not work/requires Docker)
cross build --target mips-unknown-linux-musl -p ubus-cli

Then scp the executable files on target/mips-unknown-linux-musl

Using this as a library to build other projects

Add this as a dependency:

[dependencies]
ubus-sys = { git = "https://github.com/bltavares/ubus-rs" }

Copy the custom Cross.toml file from this project to yours, in order to use an image that works with OpenWRT for cross-compilation.

Then it should be possible to run:

cross build --target mips-unknown-linux-musl

No promises there...

Release

cross build --target mips-unknown-linux-musl -p ubus-cli --release
docker run --rm -v ${PWD}/target/mips-unknown-linux-musl/release:/target bltavares/rust-cross-mips-openwrt mips-linux-muslsf-strip /target/ubus-cli
scp target/mips-unknown-linux-musl/release/ubus-cli root@router.ip:~/ubus-cli

About

(prototype) providing openwrt ubus functionallity in Rust

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • RenderScript 91.6%
  • Rust 8.3%
  • C 0.1%