Files
llgo/rust/sled/sled.go
hackerchai 2c14dc16dd feat(rust): implement sled support
Signed-off-by: hackerchai <i@hackerchai.com>
2024-07-09 09:27:23 +08:00

36 lines
812 B
Go

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
}