diff --git a/rust/sled/sled.go b/rust/sled/sled.go new file mode 100644 index 00000000..b126443b --- /dev/null +++ b/rust/sled/sled.go @@ -0,0 +1,35 @@ +package sled + +import "github.com/goplus/llgo/c" + +// Write the .pc file for the dylib generated by the Rust library and copy it to pkg-config for proper location. +const ( + LLGoPackage = "link: $(pkg-config --libs sled); -lsled" +) + +type SledConfig struct { + Unused [8]byte +} + +type SledDb struct { + Unused [8]byte +} + +//llgo:link (*SledConfig).SetPath C.sled_config_set_path +func (conf *SledConfig) SetPath(char *c.Char) *SledConfig { + return nil +} + +//llgo:link (*SledConfig).OpenDB C.sled_open_db +func (conf *SledConfig) OpenDB(sledConfig *SledConfig) *SledDb { + return nil +} + +//llgo:link (*SledDb).Set C.sled_set +func (db *SledDb) Set(key *c.Char, keyLen c.Ulong, value *c.Char, valueLen c.Ulong) { +} + +//llgo:link (*SledDb).Get C.sled_get +func (db *SledDb) Get(key *c.Char, keyLen c.Ulong) *c.Char { + return nil +}