cli: bootstrap verified std bytes and math with source imports
This commit is contained in:
52 files changed
+1000
-22
No files matched your search
@@ -0,0 +1,14 @@
|
||||
module demo.standard
|
||||
import std.bytes;
|
||||
import std.math;
|
||||
|
||||
fn main() -> u64
|
||||
effects []
|
||||
{
|
||||
var data: [u8; 4] = zero;
|
||||
std.bytes.fill(mut data, 65);
|
||||
assert(std.bytes.equal(ref data, b"AAAA"));
|
||||
let index = std.bytes.find(ref data, 65);
|
||||
if index < data.len { assert(data[index] == 65); }
|
||||
return std.math.clamp_u64(42, 0, 100);
|
||||
}
|
||||
Reference in new issue
Block a user