Skip to content

Commit

Permalink
Merge pull request #958 from schungx/master
Browse files Browse the repository at this point in the history
Fix no-std example
  • Loading branch information
schungx authored Jan 25, 2025
2 parents a85b9c1 + f70bf36 commit 04c48d1
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions no_std/no_std_test/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
//! This is a bare-bones `no-std` application that evaluates
//! a simple expression and uses the result as the return value.
#![no_main]
#![no_std]
#![feature(alloc_error_handler, start, core_intrinsics, lang_items, link_cfg)]
#![feature(alloc_error_handler, core_intrinsics, lang_items, link_cfg)]

extern crate alloc;
extern crate wee_alloc;
Expand All @@ -18,8 +19,8 @@ extern "C" {}

use rhai::{Engine, INT};

#[start]
fn main(_argc: isize, _argv: *const *const u8) -> isize {
#[no_mangle]
pub extern "C" fn main(_argc: isize, _argv: *const *const u8) -> isize {
// Notice that this is a _raw_ engine.
// To do anything useful, load a few packages from `rhai::packages`.
let engine = Engine::new_raw();
Expand Down

0 comments on commit 04c48d1

Please sign in to comment.