Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
raviqqe committed Jul 14, 2024
1 parent 4749ce1 commit 7eb36ed
Show file tree
Hide file tree
Showing 13 changed files with 30 additions and 16 deletions.
8 changes: 8 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ members = [
"process_context",
"profiler",
"sac",
"util",
"vm",
"wasm",
]
Expand Down
17 changes: 9 additions & 8 deletions cmd/minimal/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion cmd/minimal/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[workspace]
resolver = "2"
members = ["interpret", "run", "util"]
members = ["interpret", "run"]

[workspace.package]
edition = "2021"
Expand Down
2 changes: 1 addition & 1 deletion cmd/minimal/interpret/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ repository.workspace = true

[dependencies]
libc = { version = "0.2", default-features = false }
mstak-util = { version = "0.1.18", path = "../util" }
stak-util = { version = "0.1.18", path = "../../../util" }
stak-device = { version = "0.2.24", path = "../../../device", features = [
"libc",
] }
Expand Down
2 changes: 1 addition & 1 deletion cmd/minimal/interpret/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
#![cfg_attr(not(test), no_main)]

use core::{ffi::CStr, mem::size_of, slice};
use mstak_util::Mmap;
use stak_device::libc::{ReadWriteDevice, Stderr, Stdin, Stdout};
use stak_file::LibcFileSystem;
use stak_primitive::SmallPrimitiveSet;
use stak_process_context::VoidProcessContext;
use stak_util::Mmap;
use stak_vm::{Value, Vm};

const HEAP_SIZE: usize = 1 << 19;
Expand Down
3 changes: 2 additions & 1 deletion sac/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ readme.workspace = true
repository.workspace = true

[features]
libc = ["dep:libc", "stak-device/libc", "stak-file/libc"]
libc = ["dep:libc", "dep:stak-util", "stak-device/libc", "stak-file/libc"]
std = [
"dep:clap",
"stak-device/std",
Expand All @@ -29,4 +29,5 @@ stak-file = { version = "0.4.0", path = "../file" }
stak-macro = { version = "0.1.43", path = "../macro" }
stak-primitive = { version = "0.5.0", path = "../primitive" }
stak-process-context = { version = "0.2.0", path = "../process_context" }
stak-util = { version = "0.1.18", path = "../util", optional = true }
stak-vm = { version = "0.5.0", path = "../vm" }
7 changes: 5 additions & 2 deletions sac/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ pub mod __private {
pub use stak_macro;
pub use stak_primitive;
pub use stak_process_context;
#[cfg(feature = "libc")]
pub use stak_util;
pub use stak_vm;
#[cfg(feature = "std")]
pub use std;
Expand Down Expand Up @@ -99,6 +101,7 @@ macro_rules! libc_main {
stak_macro::include_r7rs,
stak_primitive::SmallPrimitiveSet,
stak_process_context::VoidProcessContext,
stak_util::Heap,
stak_vm::Vm,
};

Expand All @@ -110,9 +113,9 @@ macro_rules! libc_main {

#[cfg_attr(not(test), no_mangle)]
unsafe extern "C" fn main(argc: isize, argv: *const *const i8) -> isize {
let mut heap = [Default::default(); $heap_size];
let mut heap = Heap::new(DEFAULT_HEAP_SIZE, Default::default);
let mut vm = Vm::new(
&mut heap,
heap.as_slice_mut(),
SmallPrimitiveSet::new(
ReadWriteDevice::new(Stdin::new(), Stdout::new(), Stderr::new()),
LibcFileSystem::new(),
Expand Down
4 changes: 2 additions & 2 deletions cmd/minimal/util/Cargo.toml → util/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "mstak-util"
description = "Minimal Stak Scheme utilities"
name = "stak-util"
description = "Stak Scheme utilities"
version = "0.1.18"
edition.workspace = true
keywords.workspace = true
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 7eb36ed

Please sign in to comment.