Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple namespaces #5957

Open
TACIXAT opened this issue Dec 29, 2024 · 1 comment
Open

Multiple namespaces #5957

TACIXAT opened this issue Dec 29, 2024 · 1 comment

Comments

@TACIXAT
Copy link

TACIXAT commented Dec 29, 2024

One thing is under slang, another under Slang, and SlangResult is not under any namespace. Is there an intuition I could build for which namespace something would be under? Any goals to unify these all to a single namespace?

#include <print>
#include <slang.h>
#include <slang-com-ptr.h>

int main() {
  std::println("Initializing global session...");
  Slang::ComPtr<slang::IGlobalSession> global_session;
  SlangResult result = 
    slang::createGlobalSession(global_session.writeRef());
  if (result != SLANG_OK) {
    std::println("Error creating global session.");
    return 1;
  }

  std::println("Initializing local session...");
  slang::SessionDesc session_desc{};
  Slang::ComPtr<slang::ISession> session;
  result = global_session->createSession(session_desc, session.writeRef());
  if (result != SLANG_OK) {
    std::println("Error creating local session.");
    return 1;
  }

  return 0;
}
@TACIXAT TACIXAT changed the title Multiple namespaces (and lack thereof) Multiple namespaces Dec 29, 2024
@TACIXAT
Copy link
Author

TACIXAT commented Jan 2, 2025

Follow up. I am looking at the ProgramLayout struct (or whatever that name is aliased from). I went to look at the implementation and I see that the function that toJson calls is in slang-deprecated.h. Does this mean that the toJson function is also deprecated? I see a few other of the member functions call into other deprecated functions as well. Are these all OK to use?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant