gurs_core

package module
v0.0.0-...-fac8ef7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 18, 2024 License: MIT Imports: 2 Imported by: 0

README

Gurs Core

Go Reference

[!WARNING]
Still on development ... 🚧

🏴 Languages

Prerequisites for use:

  • Go
  • Cargo
  • CGo (only in project)

🤯 What is gurs-core ?

Library that parses rust code & create an interface to use on your golang projects (intended to be used by a cli running on windows/linux/osx):

Use text/template to have a template with golang code that will be embedded in the build of the package and that at runtime will substitute the necessary values to make it run according to the options chosen later in the cli

More Documentation:

OS Support

Windows Linux MacOS FreeBSD

Documentation

Overview

🦀 Rust code parser & type-safe interface for Golang. ✨

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExploreFolder

func ExploreFolder(folderPath string) ([]string, error)

ExploreFolder gets the rootFolder path and returns the filePath of all the .rs files located on the folder

func GetFunctions

func GetFunctions(filePaths []string) []parser.Rustfn

GetFunctions parse the files according to the slice of filePaths from the arguments. It returns an slice of Rustfn(structs) that stores the name, parameter (with types) & the returned values (with types)

Types

type Gofunc

type Gofunc = parser.Gofunc

func ConvertRsFnSliceToGo

func ConvertRsFnSliceToGo(fns *[]parser.Rustfn) (goFuncs []Gofunc)

ConvertRsFnSliceToGo gets an slice of RustFn and returns the corresponding transpilation to Gofunc slice. For individual implementation is a Rustfn struct method (Rustfn -> Gofunc)

Directories

Path Synopsis
gurs-core sub-package that parses: files / functions (fn) / needed structs
gurs-core sub-package that parses: files / functions (fn) / needed structs

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL