Closed nilslice closed 2 months ago
@mhmd-azeez if you wanted to set up similar "templates" for c-sharp and f-sharp (or any other languages!), take a look at the pdk-templates.json for the expected repo URL to host them :)
Nice!
I've set up most of the repos, everything seems to be working - having the templates available like this is super convenient!
@mhmd-azeez C#/F# are the only templates left, would you be able to set those up when you get the chance?
@nilslice the only task left is to fetch the repo list from the network instead of embedding it - did you have plans for that? should we just fetch the file from the repo?
@zshipko yes, I have some time this week
@zshipko ya I was thinking we'd just GET the file at some resolved path in the main
branch so it's always up to date when a CLI makes a request.
Sweet! F# and C# are now also available
P.S: currently the csproj/fsproj is always called Plugin
. Having interpolation is really important for .NET projects, as the assembly name depends on it and people are very particular about project names. But this can be done later on, for now it's a pretty good experience
@mhmd-azeez
P.S: currently the csproj/fsproj is always called Plugin. Having interpolation is really important for .NET projects, as the assembly name depends on it and people are very particular about project names. But this can be done later on, for now it's a pretty good experience
Is there a note or some call-out in these project README/code somewhere that indicates what needs to be changed, or does this just still work out of the box, and a user will likely know to change whatever they need to in order to fit their own needs?
@nilslice it works out of the box and people can easily change it. It just provides a nicer experience as people are most likely going to change it anyway
Awesome, thanks @mhmd-azeez!
P.S: currently the csproj/fsproj is always called Plugin. Having interpolation is really important for .NET projects, as the assembly name depends on it and people are very particular about project names. But this can be done later on, for now it's a pretty good experience
This is an issue with almost all the repos - next step would probably be to list out what needs to be changed in the READMEs like @nilslice mentioned, or adding some way to do search and replace with a standardized interpolation key for the project name.
Ok, I can't approve this since I opened it, but it LGTM and I'm fine w/ the embedded fallback.
Thanks for the great work on this!
you can also pass
-l
or-lang
with one of the pdk languages listed in pdk-templates.json to choose non-interactivelyThere is only one template implemented (and template is generous.. there's no interpolation etc, just clone) at https://github.com/extism/rust-pdk-template
(Update, now also JS https://github.com/extism/js-pdk-template, will update more down below in TODO list)
TODO:
ctrl-c
closing of the menu errors with fatal: repository '' does not exist Error: exit status 128//go:embed
the pdk-template.json, but rather fetch it via network once we merge it (so its dynamic based on our live repo list, since templates are too)--tag
param to pin the clone to a git tag of any of the template repos