- Updated posix/win32 stdlib namespacing

- Process stdlib
- Fix to void expression blocks
This commit is contained in:
Christoffer Lerno
2023-06-18 22:12:01 +02:00
committed by Christoffer Lerno
parent 5c9eb264e8
commit ab93389031
22 changed files with 835 additions and 187 deletions

View File

@@ -0,0 +1,16 @@
module test;
import std::os::process;
import std::io;
fn void! main()
{
String command = env::WIN32 ? "dir" : "ls";
SubProcess x = process::create({ command }, { .search_user_path = true })!!;
x.join()!;
Stream stream = x.stdout().as_stream();
while (try char b = stream.read_byte())
{
io::printf("%c", b);
}
io::printn("...Done");
}