Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
#+TITLE: README | English | [[README_CN.org][中文]] |
-
Discription NGRS is a New Rust bindings for GNU Guile Scheme.
-
Overview
ngrsprovides both low-level raw bindings and high-level safe abstractions for embedding GNU Guile Scheme in Rust applications. This project enables seamless integration of Scheme scripting capabilities into Rust programs with a focus on memory safety and ergonomic APIs. -
Project Structure
- ngrs - High-level safe Rust wrappers with idiomatic interfaces, Contains raw.
- raw - Low-level FFI bindings to Guile's C API
- Features
- Make bindings and convert for base values.
- Quick Start #+begin_src rust use ngrs::{Runtime, with_guile};
fn main() { // Initialize Guile Runtime::initialize();
with_guile(|vm:Runtime| {
// Your Code Here
println!("Hello guile from Rust!");
let args = vec!["Test Guile".to_string(),];
vm.shell(args);
});
} #+end_src
** Initialization Before using any Guile functionality, you must initialize the Guile environment:
#+begin_src rust use ngrs::Runtime
fn main() { // Initialize Guile Runtime::initialize();
// Your code here
} #+end_src
*** Using with init
This way has Less platforms support.
#+begin_src rust
use ngrs::Runtime;
fn main() { Runtime::initialize(); let runtime = Runtime::new();
// Your Guile-dependent code here
} #+end_src
*** Using with with_guile
For more control over the Guile context:
#+begin_src rust
use ngrs::with_guile;
fn main() { Runtime::initialize();
with_guile(|vm:Runtime| {
// Your Guile-dependent code here
});
} #+end_src