Skip to content

Commit 04c48d1

Browse files
authored
Merge pull request #958 from schungx/master
Fix no-std example
2 parents a85b9c1 + f70bf36 commit 04c48d1

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

no_std/no_std_test/src/main.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
//! This is a bare-bones `no-std` application that evaluates
22
//! a simple expression and uses the result as the return value.
33
4+
#![no_main]
45
#![no_std]
5-
#![feature(alloc_error_handler, start, core_intrinsics, lang_items, link_cfg)]
6+
#![feature(alloc_error_handler, core_intrinsics, lang_items, link_cfg)]
67

78
extern crate alloc;
89
extern crate wee_alloc;
@@ -18,8 +19,8 @@ extern "C" {}
1819

1920
use rhai::{Engine, INT};
2021

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

0 commit comments

Comments
 (0)