Thanks to visit codestin.com
Credit goes to github.com

Skip to content
/ zorrow Public
forked from DutchGhost/zorrow

Borrowchecker in Zig

License

suirad/zorrow

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Zorrow

This is a userlevel implementation of borrowchk in Zig.

This system is not borrowchk, as it requires to pass in unique types for operations like acquiring a borrow, and reading from it. This library does not check for uniqueness of the types passed in, it's up to the programmer to do this correctly. An example of what is ment by unique type:

var cell = RefCell(usize).init(10);

var borrow = cell.borrow(.{});
defer borrow.release();

var value = borrow.read(.{});

Here we see .{} two times. it is required to pass those in.

Minimum supported Zig

master

Recent changes

  • 0.2
    • Allow the use of .{} where previously struct {} was required.
  • 0.1
    • Initial implementation

Contributors

About

Borrowchecker in Zig

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Zig 100.0%