Merge branch 'master' of git.e3t.cc:core/trifid
This commit is contained in:
commit
648ef9a38e
|
@ -7,13 +7,12 @@ use std::path::Path;
|
||||||
fn main() {
|
fn main() {
|
||||||
// Find compiler: if /usr/local/go/bin/go exists, use that
|
// Find compiler: if /usr/local/go/bin/go exists, use that
|
||||||
// otherwise, rely on PATH
|
// otherwise, rely on PATH
|
||||||
let compiler;
|
let compiler = if Path::new("/usr/local/go/bin/go").exists() {
|
||||||
if Path::new("/usr/local/go/bin/go").exists() {
|
|
||||||
println!("Using /usr/local/go/bin/go");
|
println!("Using /usr/local/go/bin/go");
|
||||||
compiler = "/usr/local/go/bin/go";
|
"/usr/local/go/bin/go"
|
||||||
} else {
|
} else {
|
||||||
compiler = "go";
|
"go"
|
||||||
}
|
};
|
||||||
|
|
||||||
gobuild::Build::new().compiler(compiler).buildmode(BuildMode::CArchive).file("main.go").compile("nebulaffi");
|
gobuild::Build::new().compiler(compiler).buildmode(BuildMode::CArchive).file("main.go").compile("nebulaffi");
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
//! # nebula-ffi
|
//! # nebula-ffi
|
||||||
//! nebula-ffi is a crate for interacting with the Nebula project via a CGo compatability layer.
|
//! nebula-ffi is a crate for interacting with the Nebula project via a `CGo` compatability layer.
|
||||||
//! It provides support for running a Nebula VPN directly from a Rust binary, liken to how the default
|
//! It provides support for running a Nebula VPN directly from a Rust binary, liken to how the default
|
||||||
//! `nebula` binary functions.
|
//! `nebula` binary functions.
|
||||||
//! ## Versioning
|
//! ## Versioning
|
||||||
|
|
|
@ -160,7 +160,7 @@ pub async fn create_role(name: String, description: String, rules_json: String,
|
||||||
|
|
||||||
let token = format!("{} {}", session_token, auth_token);
|
let token = format!("{} {}", session_token, auth_token);
|
||||||
|
|
||||||
let res = client.post(server.join(&format!("/v1/roles"))?).json(&RoleCreateBody {
|
let res = client.post(server.join("/v1/roles")?).json(&RoleCreateBody {
|
||||||
name,
|
name,
|
||||||
description,
|
description,
|
||||||
firewall_rules: rules,
|
firewall_rules: rules,
|
||||||
|
|
Loading…
Reference in New Issue