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

Syscalls, STD library & Conditional Compilation #35

Merged
merged 7 commits into from Feb 26, 2023

Conversation

H1ghBre4k3r
Copy link
Owner

@H1ghBre4k3r H1ghBre4k3r commented Feb 26, 2023

This PR aims to provide an abstraction over common syscalls to reduce the number of builtin functions.

These abstractions are encapsulated within a new std.why module.

Furthermore, this PR introduces conditional compilation via compiler directives (currently, this only works for depending on different operating systems):

#[os == "linux"]
let value := "We are on linux"

#[os == "macos"]
let value := "We are on macOS"

This feature is currently used to distinguish different syscalls on macOS and Linux.

Closes #29

@H1ghBre4k3r H1ghBre4k3r added enhancement New feature or request compiler Something related to the compiler labels Feb 26, 2023
@H1ghBre4k3r H1ghBre4k3r added this to the v0.2.0 milestone Feb 26, 2023
@H1ghBre4k3r H1ghBre4k3r self-assigned this Feb 26, 2023
@H1ghBre4k3r H1ghBre4k3r changed the title Syscall abstraction Syscalls, STD library & Conditional Compilation Feb 26, 2023
@H1ghBre4k3r H1ghBre4k3r marked this pull request as ready for review February 26, 2023 16:02
@H1ghBre4k3r H1ghBre4k3r merged commit f17965d into main Feb 26, 2023
@H1ghBre4k3r H1ghBre4k3r deleted the syscall-abstraction branch February 26, 2023 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler Something related to the compiler enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Standard Library
1 participant