rune-rs / Rune
Licence: other
An embeddable dynamic programming language for Rust.
Stars: ✭ 530
Labels
Projects that are alternatives of or similar to Rune
Azure Iot Sdk C
A C99 SDK for connecting devices to Microsoft Azure IoT services
Stars: ✭ 412 (-22.26%)
Mutual labels: embedded
Flutter Pi
A light-weight Flutter Engine Embedder for Raspberry Pi that runs without X.
Stars: ✭ 492 (-7.17%)
Mutual labels: embedded
Xkcptun
xkcptun is kcp tunnel for OpenWRT&LEDE, implemented in c language
Stars: ✭ 419 (-20.94%)
Mutual labels: embedded
Zephyr
Primary Git Repository for the Zephyr Project. Zephyr is a new generation, scalable, optimized, secure RTOS for multiple hardware architectures.
Stars: ✭ 5,335 (+906.6%)
Mutual labels: embedded
Tf Pose Estimation
Deep Pose Estimation implemented using Tensorflow with Custom Architectures for fast inference.
Stars: ✭ 3,856 (+627.55%)
Mutual labels: embedded
Z88dk
The development kit for over a hundred z80 family machines - c compiler, assembler, linker, libraries.
Stars: ✭ 490 (-7.55%)
Mutual labels: embedded
Platformio Atom Ide
PlatformIO IDE for Atom: The next generation integrated development environment for IoT
Stars: ✭ 475 (-10.38%)
Mutual labels: embedded
Awesome Embedded And Iot Security
A curated list of awesome embedded and IoT security resources.
Stars: ✭ 500 (-5.66%)
Mutual labels: embedded
Guilitesamples
✨Small interesting GUI effects could be reused everywhere
Stars: ✭ 409 (-22.83%)
Mutual labels: embedded
Jetson Inference
Hello AI World guide to deploying deep-learning inference networks and deep vision primitives with TensorRT and NVIDIA Jetson.
Stars: ✭ 5,191 (+879.43%)
Mutual labels: embedded
Eclipse Plugins
The Eclipse Embedded CDT plug-ins for Arm & RISC-V C/C++ developers (formerly known as the GNU MCU Eclipse plug-ins). Includes the archive of previous plug-ins versions, as Releases.
Stars: ✭ 507 (-4.34%)
Mutual labels: embedded
Cranium
🤖 A portable, header-only, artificial neural network library written in C99
Stars: ✭ 501 (-5.47%)
Mutual labels: embedded
Embedded Notes
嵌入式linux软件开发、嵌入式linux驱动开发、c语言、单片机开发、IOT开发等面试要点记录
Stars: ✭ 487 (-8.11%)
Mutual labels: embedded
rune
An embeddable dynamic programming language for Rust.
Contributing
If you want to help out, there should be a number of optimization tasks available in Future Optimizations. Or have a look at Open Issues.
Create an issue about the optimization you want to work on and communicate that you are working on it.
Highlights of Rune
- Clean Rust integration 💻.
- Memory safe through reference counting 📖.
- Template strings 📖.
- Try operators 📖.
- Pattern matching 📖.
- Structs and enums 📖 with associated data and functions.
- Dynamic vectors 📖, objects 📖, and tuples 📖 with built-in serde support 💻.
- First-class async support 📖.
- Generators 📖.
- Dynamic instance functions 📖.
- Stack isolation 📖 between function calls.
- Stack-based C FFI, like Lua's (TBD).
Rune scripts
You can run Rune programs with the bundled CLI:
cargo run --bin rune -- run scripts/hello_world.rn
If you want to see detailed diagnostics of your program while it's running, you can use:
cargo run --bin rune -- run scripts/hello_world.rn --dump-unit --trace --dump-vm
See --help
for more information.
Running scripts from Rust
You can find more examples in the
examples
folder.
The following is a complete example, including rich diagnostics using
termcolor
. It can be made much simpler if this is not needed.
use rune::termcolor::{ColorChoice, StandardStream};
use rune::EmitDiagnostics as _;
use runestick::{Vm, FromValue as _, Item, Source};
use std::error::Error;
use std::sync::Arc;
#[tokio::main]
async fn main() -> Result<(), Box<dyn Error>> {
let context = runestick::Context::with_default_modules()?;
let options = rune::Options::default();
let mut sources = rune::Sources::new();
sources.insert(Source::new(
"script",
r#"
pub fn calculate(a, b) {
println("Hello World");
a + b
}
"#,
));
let mut diagnostics = rune::Diagnostics::new();
let result = rune::load_sources(&context, &options, &mut sources, &mut diagnostics);
if !diagnostics.is_empty() {
let mut writer = StandardStream::stderr(ColorChoice::Always);
diagnostics.emit_diagnostics(&mut writer, &sources)?;
}
let unit = result?;
let vm = Vm::new(Arc::new(context.runtime()), Arc::new(unit));
let mut execution = vm.execute(&["calculate"], (10i64, 20i64))?;
let value = execution.async_complete().await?;
let value = i64::from_value(value)?;
println!("{}", value);
Ok(())
}
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].