Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix no-std example #958

Merged
merged 1 commit into from
Jan 25, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading