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

libc SAC #1334

Merged
merged 33 commits into from
Jul 15, 2024
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ jobs:
tags: not @library
- name: stak-tools
- name: mstak
tags: not @command-line and not @environment-variable and not @library
tags: not @environment-variable and not @library
- name: mstak-tools
tags: not @environment-variable
exclude:
Expand Down
9 changes: 9 additions & 0 deletions Cargo.lock

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

16 changes: 11 additions & 5 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 Expand Up @@ -61,6 +62,12 @@ codegen-units = 1
lto = true
panic = "abort"

[profile.release_test]
inherits = "release"
debug = "line-tables-only"
debug-assertions = true
overflow-checks = true

[profile.dev.build-override]
opt-level = 3
debug-assertions = false
Expand All @@ -71,8 +78,7 @@ opt-level = 3
debug-assertions = false
overflow-checks = false

[profile.release_test]
inherits = "release"
debug = "line-tables-only"
debug-assertions = true
overflow-checks = true
[profile.release_test.build-override]
opt-level = 3
debug-assertions = false
overflow-checks = false
2 changes: 1 addition & 1 deletion cmd/compile/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ readme.workspace = true
repository.workspace = true

[dependencies]
stak-sac = { version = "0.1", path = "../../sac" }
stak-sac = { version = "0.1", path = "../../sac", features = ["std"] }

[lints]
workspace = true
2 changes: 1 addition & 1 deletion cmd/minify/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ readme.workspace = true
repository.workspace = true

[dependencies]
stak-sac = { version = "0.1.44", path = "../../sac" }
stak-sac = { version = "0.1.44", path = "../../sac", features = ["std"] }

[lints]
workspace = true
99 changes: 87 additions & 12 deletions cmd/minimal/Cargo.lock

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

18 changes: 14 additions & 4 deletions 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 All @@ -23,13 +23,23 @@ todo = "deny"
unimplemented = "deny"
use_self = "deny"

[profile.dev]
lto = true
opt-level = 3
panic = "abort"

[profile.release]
codegen-units = 1
lto = true
panic = "abort"
strip = true

[profile.dev]
lto = true
[profile.dev.build-override]
opt-level = 3
panic = "abort"
debug-assertions = false
overflow-checks = false

[profile.release.build-override]
opt-level = 3
debug-assertions = false
overflow-checks = false
10 changes: 5 additions & 5 deletions 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 All @@ -24,12 +24,12 @@ stak-vm = { version = "0.5.0", path = "../../../vm" }
[lints]
workspace = true

[profile.release]
codegen-units = 1
[profile.dev]
lto = true
opt-level = 3
panic = "abort"

[profile.dev]
[profile.release]
codegen-units = 1
lto = true
opt-level = 3
panic = "abort"
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::LibcProcessContext;
use stak_util::Mmap;
use stak_vm::{Value, Vm};

const HEAP_SIZE: usize = 1 << 19;
Expand Down
19 changes: 5 additions & 14 deletions cmd/minimal/run/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,17 @@ readme.workspace = true
repository.workspace = true

[dependencies]
libc = { version = "0.2", default-features = false }
mstak-util = { version = "0.1.18", path = "../util" }
stak-configuration = { version = "0.1.20", path = "../../../configuration" }
stak-device = { version = "0.2.24", path = "../../../device", features = [
"libc",
] }
stak-file = { version = "0.4.0", path = "../../../file", features = ["libc"] }
stak-primitive = { version = "0.5.0", path = "../../../primitive" }
stak-process-context = { version = "0.2.0", path = "../../../process_context" }
stak-vm = { version = "0.5.0", path = "../../../vm" }
stak-sac = { version = "0.1.44", path = "../../../sac", features = ["libc"] }

[lints]
workspace = true

[profile.release]
codegen-units = 1
[profile.dev]
lto = true
opt-level = 3
panic = "abort"

[profile.dev]
[profile.release]
codegen-units = 1
lto = true
opt-level = 3
panic = "abort"
Loading
Loading