feat(rust): implement sled support
Signed-off-by: hackerchai <i@hackerchai.com>
This commit is contained in:
35
rust/sled/sled.go
Normal file
35
rust/sled/sled.go
Normal file
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user