blob: 1788ceae07e4120180523187ccf2c22af60f74b0 [file] [log] [blame]
// Copyright 2019 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
library zx;
alias mutable_vector_void = vector<byte>;
alias voidptr = uint64;
@transport("Syscall")
protocol Rust {
// Simple out ptr.
SimpleCase() -> (struct {
time time;
});
MultipleInHandles(resource struct {
handles vector<handle>;
}) -> (struct {
status status;
});
// noreturn handled properly.
@noreturn
ANoRetFunc();
// Function withot return handled properly too.
NoReturnValue(struct {
x uint32;
});
// |buffer| treated mutable.
InoutArgs(resource struct {
handle handle:VMO;
op uint32;
offset uint64;
size uint64;
buffer mutable_vector_void;
}) -> (struct {
status status;
});
// |input| treated const
ConstInput(struct {
input vector<byte>;
}) -> (struct {
status status;
});
VariousBasicTypeNames(struct {
a bool;
b byte;
d int32;
e int64;
f uint16;
g uint32;
h uint64;
i usize;
j uintptr;
k voidptr;
l time;
m ticks;
});
};