Merge branch 'master' of git.e3t.cc:core/trifid

This commit is contained in:
core 2023-09-25 18:22:53 -04:00
commit 648ef9a38e
Signed by: core
GPG Key ID: FDBF740DADDCEECF
3 changed files with 6 additions and 7 deletions

View File

@ -7,13 +7,12 @@ use std::path::Path;
fn main() {
// Find compiler: if /usr/local/go/bin/go exists, use that
// otherwise, rely on PATH
let compiler;
if Path::new("/usr/local/go/bin/go").exists() {
let compiler = if Path::new("/usr/local/go/bin/go").exists() {
println!("Using /usr/local/go/bin/go");
compiler = "/usr/local/go/bin/go";
"/usr/local/go/bin/go"
} else {
compiler = "go";
}
"go"
};
gobuild::Build::new().compiler(compiler).buildmode(BuildMode::CArchive).file("main.go").compile("nebulaffi");

View File

@ -1,5 +1,5 @@
//! # 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
//! `nebula` binary functions.
//! ## Versioning

View File

@ -160,7 +160,7 @@ pub async fn create_role(name: String, description: String, rules_json: String,
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,
description,
firewall_rules: rules,