about summary refs log tree commit diff
path: root/src/rt/rust_builtin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/rt/rust_builtin.cpp')
-rw-r--r--src/rt/rust_builtin.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/rt/rust_builtin.cpp b/src/rt/rust_builtin.cpp
index 91c5760d3e9..5baa95c7323 100644
--- a/src/rt/rust_builtin.cpp
+++ b/src/rt/rust_builtin.cpp
@@ -180,6 +180,11 @@ rand_new_seeded(rust_vec_box* seed) {
     return rctx;
 }
 
+extern "C" CDECL void *
+rand_new_seeded2(rust_vec_box** seed) {
+    return rand_new_seeded(*seed);
+}
+
 extern "C" CDECL size_t
 rand_next(randctx *rctx) {
     return isaac_rand(rctx);
@@ -371,6 +376,11 @@ rust_list_files(rust_str *path) {
   return vec;
 }
 
+extern "C" CDECL rust_vec_box*
+rust_list_files2(rust_str **path) {
+    return rust_list_files(*path);
+}
+
 extern "C" CDECL int
 rust_path_is_dir(char *path) {
     struct stat buf;
@@ -578,6 +588,18 @@ rust_num_threads() {
     return task->kernel->env->num_sched_threads;
 }
 
+extern "C" CDECL int
+rust_get_argc() {
+    rust_task *task = rust_get_current_task();
+    return task->kernel->env->argc;
+}
+
+extern "C" CDECL char**
+rust_get_argv() {
+    rust_task *task = rust_get_current_task();
+    return task->kernel->env->argv;
+}
+
 extern "C" CDECL rust_sched_id
 rust_new_sched(uintptr_t threads) {
     rust_task *task = rust_get_current_task();